Skip to contentSkip to conversation

i2c-eg20t: fix sparse warnings

PATCH New Stephen Hemminger 1 participant 1 message Feb 20, 2011 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c-eg20t: fix sparse warnings

drivers/i2c/busses/i2c-eg20t.c:477:5: warning: symbol 'pch_i2c_readbytes' was not declared. Should it be static? drivers/i2c/busses/i2c-eg20t.c:804:42: warning: Using plain integer as NULL pointer

drivers/i2c/busses/i2c-eg20t.c +3 -3
@@ -474,8 +474,8 @@ static void pch_i2c_sendnack(struct i2c_
  * @last:	specifies whether last message or not.
  * @first:	specifies whether first message or not.
  */
-s32 pch_i2c_readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs,
-		  u32 last, u32 first)
+static s32 pch_i2c_readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs,
+			     u32 last, u32 first)
 {
 	struct i2c_algo_pch_data *adap = i2c_adap->algo_data;
 
@@ -801,7 +801,7 @@ static void __devexit pch_i2c_remove(str
 
 	if (adap_info->pch_data.pch_base_address) {
 		pci_iounmap(pdev, adap_info->pch_data.pch_base_address);
-		adap_info->pch_data.pch_base_address = 0;
+		adap_info->pch_data.pch_base_address = NULL;
 	}
 
 	pci_set_drvdata(pdev, NULL);