Skip to contentSkip to conversation

Make i2c list terminators explicitely unsigned

PATCH New Jean Delvare 2 participants 2 messages May 19, 2005 I2C

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make i2c list terminators explicitely unsigned

Hi Greg,

Shouldn't the i2c list terminators be explicitely declared as unsigned? I'd hope it to help code analysis tools and possibly avoid false positives. Coverity's SWAT pointed my attention to these constants.

Thanks.

include/linux/i2c.h renamed from include/linux/i2c.h.orig +2 -2
@@ -302,8 +302,8 @@
 };
 
 /* Internal numbers to terminate lists */
-#define I2C_CLIENT_END		0xfffe
-#define I2C_CLIENT_ISA_END	0xfffefffe
+#define I2C_CLIENT_END		0xfffeU
+#define I2C_CLIENT_ISA_END	0xfffefffeU
 
 /* The numbers to use to set I2C bus address */
 #define ANY_I2C_BUS		0xffff
Signature · 1 line
Jean Delvare
Applied
#1 lore raw

PATCH 1/1 Make i2c list terminators explicitely unsigned

Quoted 9 lines · Jean Delvare

Hi Greg,

Shouldn't the i2c list terminators be explicitely declared as unsigned? I'd hope it to help code analysis tools and possibly avoid false positives. Coverity's SWAT pointed my attention to these constants.

Thanks.

Applied, thanks.

greg k-h