[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210731104112.512449-1-jordy@pwning.systems>
Date: Sat, 31 Jul 2021 12:41:12 +0200
From: Jordy Zomer <jordy@...ing.systems>
To: linux-kernel@...r.kernel.org, linux1394-devel@...ts.sourceforge.net
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jordy Zomer <jordy@...ing.systems>,
Stefan Richter <stefanr@...6.in-berlin.de>
Subject: [PATCH] firewire: ohci: make reg_(read|write) unsigned
The reg_(read|write) functions used to
take a signed integer as an offset parameter.
The callers of this function only pass an unsigned integer to it.
Therefore to make it obviously safe, let's just make this an unsgined
integer as this is used in pointer arithmetics.
Signed-off-by: Jordy Zomer <jordy@...ing.systems>
---
drivers/firewire/ohci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 17c9d825188b..0119aa9cbc7c 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -524,12 +524,12 @@ static void log_ar_at_event(struct fw_ohci *ohci,
}
}
-static inline void reg_write(const struct fw_ohci *ohci, int offset, u32 data)
+static inline void reg_write(const struct fw_ohci *ohci, u32 offset, u32 data)
{
writel(data, ohci->registers + offset);
}
-static inline u32 reg_read(const struct fw_ohci *ohci, int offset)
+static inline u32 reg_read(const struct fw_ohci *ohci, u32 offset)
{
return readl(ohci->registers + offset);
}
--
2.27.0
Powered by blists - more mailing lists