* [PATCH] i2c: microchip: pci1xxxx: Use signed variable
@ 2022-10-04 7:26 Muhammad Usama Anjum
2022-10-05 18:54 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Muhammad Usama Anjum @ 2022-10-04 7:26 UTC (permalink / raw)
To: Tharun Kumar P, Kumaravel Thiagarajan, Microchip Linux Driver Support
Cc: Muhammad Usama Anjum, kernel, kernel-janitors, linux-i2c, linux-kernel
Use signed variable to store the negative values correctly to compare
them later with negative values.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
drivers/i2c/busses/i2c-mchp-pci1xxxx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-mchp-pci1xxxx.c b/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
index b2b7dbff5ef4..f3c497391d13 100644
--- a/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
+++ b/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
@@ -708,7 +708,7 @@ static void pci1xxxx_i2c_init(struct pci1xxxx_i2c *i2c)
void __iomem *p2 = i2c->i2c_base + SMBUS_STATUS_REG_OFF;
void __iomem *p1 = i2c->i2c_base + SMB_GPR_REG;
u8 regval;
- u8 ret;
+ s8 ret;
ret = set_sys_lock(i2c);
if (ret == -EPERM) {
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: microchip: pci1xxxx: Use signed variable
2022-10-04 7:26 [PATCH] i2c: microchip: pci1xxxx: Use signed variable Muhammad Usama Anjum
@ 2022-10-05 18:54 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2022-10-05 18:54 UTC (permalink / raw)
To: Muhammad Usama Anjum
Cc: Tharun Kumar P, Kumaravel Thiagarajan,
Microchip Linux Driver Support, kernel, kernel-janitors,
linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 428 bytes --]
On Tue, Oct 04, 2022 at 12:26:15PM +0500, Muhammad Usama Anjum wrote:
> Use signed variable to store the negative values correctly to compare
> them later with negative values.
>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Thank you, but I appled a better fix (taking care of types) instead:
http://patchwork.ozlabs.org/project/linux-i2c/patch/20221004192715.173210-1-colin.i.king@gmail.com/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-05 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04 7:26 [PATCH] i2c: microchip: pci1xxxx: Use signed variable Muhammad Usama Anjum
2022-10-05 18:54 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).