hwmon - lm78, lm85 sparse fixes
Subsystems (2)
PATCH 1/1 hwmon - lm78, lm85 sparse fixes
lm78.c and lm85.c have a number of items declared static then implemented without the static on them. The following patch fixes the sparse errors below
CHECK drivers/hwmon/lm78.cdrivers/hwmon/lm78.c:483:5: warning: symbol 'lm78_detect' was not declared. Should it be static?
CHECK drivers/hwmon/lm85.cdrivers/hwmon/lm85.c:1010:5: warning: symbol 'lm85_attach_adapter' was not declared. Should it be static? drivers/hwmon/lm85.c:1017:5: warning: symbol 'lm85_detect' was not declared. Should it be static? drivers/hwmon/lm85.c:1239:5: warning: symbol 'lm85_detach_client' was not declared. Should it be static? drivers/hwmon/lm85.c:1249:5: warning: symbol 'lm85_read_value' was not declared. Should it be static? drivers/hwmon/lm85.c:1279:5: warning: symbol 'lm85_write_value' was not declared. Should it be static? drivers/hwmon/lm85.c:1308:6: warning: symbol 'lm85_init_client' was not declared. Should it be static?
-------------- next part --------------
drivers/hwmon/lm78.c +1 -1
@@ -480,7 +480,7 @@ static int lm78_isa_attach_adapter(struc }/* This function is called by i2c_probe */ -int lm78_detect (struct i2c_adapter *adapter,int address,int kind) +static int lm78_detect (struct i2c_adapter *adapter,int address,int kind) {int i, err;struct i2c_client *new_client;
drivers/hwmon/lm85.c +6 -6
@@ -1007,14 +1007,14 @@ temp_auto(1);temp_auto (2 );temp_auto (3 ); -int lm85_attach_adapter (struct i2c_adapter *adapter) +static int lm85_attach_adapter (struct i2c_adapter *adapter) {if (!(adapter->class &I2C_CLASS_HWMON ))return 0 ;return i2c_probe (adapter, &addr_data, lm85_detect); } -int lm85_detect (struct i2c_adapter *adapter,int address, +static int lm85_detect (struct i2c_adapter *adapter,int address,int kind) {int company, verstep ;
@@ -1236,7 +1236,7 @@ int lm85_detect(struct i2c_adapter *adapreturn err; } -int lm85_detach_client (struct i2c_client *client) +static int lm85_detach_client (struct i2c_client *client) {struct lm85_data *data =i2c_get_clientdata (client);hwmon_device_unregister (data->class_dev);
@@ -1246,7 +1246,7 @@ int lm85_detach_client(struct i2c_client } -int lm85_read_value (struct i2c_client *client,u8 reg) +static int lm85_read_value (struct i2c_client *client,u8 reg) {int res;
@@ -1276,7 +1276,7 @@ int lm85_read_value(struct i2c_client *creturn res ; } -int lm85_write_value (struct i2c_client *client,u8 reg,int value) +static int lm85_write_value (struct i2c_client *client,u8 reg,int value) {int res ;
@@ -1305,7 +1305,7 @@ int lm85_write_value(struct i2c_client *return res ; } -void lm85_init_client (struct i2c_client *client) +static void lm85_init_client (struct i2c_client *client) {int value;struct lm85_data *data =i2c_get_clientdata (client);
PATCH 1/1 hwmon - lm78, lm85 sparse fixes
Quoted 4 lines
lm78.candlm85.chave a number of items declared static then implemented without the static on them. The following patch fixes the sparse errors below
Quoted 9 lines
CHECK
drivers/hwmon/lm78.cdrivers/hwmon/lm78.c:483:5: warning: symbol 'lm78_detect' was not declared. Should it be static?
CHECKdrivers/hwmon/lm85.cdrivers/hwmon/lm85.c:1010:5: warning: symbol 'lm85_attach_adapter' was not declared. Should it be static?drivers/hwmon/lm85.c:1017:5: warning: symbol 'lm85_detect' was not declared. Should it be static?drivers/hwmon/lm85.c:1239:5: warning: symbol 'lm85_detach_client' was not declared. Should it be static?drivers/hwmon/lm85.c:1249:5: warning: symbol 'lm85_read_value' was not declared. Should it be static?drivers/hwmon/lm85.c:1279:5: warning: symbol 'lm85_write_value' was not declared. Should it be static?drivers/hwmon/lm85.c:1308:6: warning: symbol 'lm85_init_client' was not declared. Should it be static?
Correct, applied, thanks.
Signature · 1 line
Jean Delvare
PATCH 1/1 hwmon - lm78, lm85 sparse fixes
In reply to Ben DooksHi again Ben,
Quoted 5 lines
Quoted 3 lines
lm78.candlm85.chave a number of items declared static then implemented without the static on them. The following patch fixes the sparse errors below(...)
Correct, applied, thanks.
BTW, there seems to be many more missing statics in hwmon and i2c drivers. I wonder why you did only report these for the eeprom, lm78 and lm85 drivers. Care to provide patches for the other drivers as well?
Thanks,
Signature · 1 line
Jean Delvare