Skip to contentSkip to conversation

staging: nvec: Fix incorrect type of i2c address

PATCH In review Franck Demathieu 2 participants 2 messages Feb 13, 2017 – Feb 14, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: nvec: Fix incorrect type of i2c address

From: Franck Demathieu <[email protected]>

The i2c address is unsigned according to the dt-bindings. Fix sparse issue (-Wtypesign):

drivers/staging/nvec/nvec.c:781:35: warning: incorrect type in argument 3 (different signedness)
drivers/staging/nvec/nvec.c:781:35: expected unsigned int [usertype] *out_value
drivers/staging/nvec/nvec.c:781:35: got int *<noident>

---
 drivers/staging/nvec/nvec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/nvec/nvec.h +1 -1
index c03ca8d..aa7c70e 100644
@@ -138,7 +138,7 @@ struct nvec_chip {
 	struct device *dev;
 	int gpio;
 	int irq;
-	int i2c_addr;
+	u32 i2c_addr;
 	void __iomem *base;
 	struct clk *i2c_clk;
 	struct reset_control *rst;
Signature · 1 line
2.8.1
maintainer Acked-by on v1 1/1
#1 lore raw

Am Montag, 13. Februar 2017, 09:35:19 CET schrieb Franck Demathieu:

Quoted 11 lines

From: Franck Demathieu <[email protected]>

The i2c address is unsigned according to the dt-bindings. Fix sparse issue (-Wtypesign):

drivers/staging/nvec/nvec.c:781:35: warning: incorrect type in argument 3
(different signedness) drivers/staging/nvec/nvec.c:781:35: expected
unsigned int [usertype] *out_value drivers/staging/nvec/nvec.c:781:35:
got int *<noident>

looks correct. Thanks!

Quoted 9 lines
---
 drivers/staging/nvec/nvec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/nvec/nvec.h +0 -0
index c03ca8d..aa7c70e 100644

drivers/staging/nvec/nvec.h struct nvec_chip { · line 144

Quoted 8 lines
drivers/staging/nvec/nvec.h +1 -1
@@ -138,7 +138,7 @@ struct nvec_chip {
 	struct device *dev;
 	int gpio;
 	int irq;
-	int i2c_addr;
+	u32 i2c_addr;
 	void __iomem *base;
 	struct clk *i2c_clk;
 	struct reset_control *rst;

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel