Skip to contentSkip to conversation

hwmon: (ltc4261) Fix error message format

PATCH Applied Jean Delvare 2 participants 7 messages Nov 5, 2010 – Nov 6, 2010 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (ltc4261) Fix error message format

adapter->id is deprecated and not set by any adapter driver, so this was certainly not what the author wanted to use. adapter->nr maybe, but as dev_err() already includes this value, as well as the client's address, there's no point repeating them. Better print a simple error message in plain English words.

---
 drivers/hwmon/ltc4261.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/hwmon/ltc4261.c +1 -2
@@ -230,8 +230,7 @@ static int ltc4261_probe(struct i2c_clie
 		return -ENODEV;
 
 	if (i2c_smbus_read_byte_data(client, LTC4261_STATUS) < 0) {
-		dev_err(&client->dev, "Failed to read register %d:%02x:%02x\n",
-			adapter->id, client->addr, LTC4261_STATUS);
+		dev_err(&client->dev, "Failed to read status register\n");
 		return -ENODEV;
 	}
 
Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jean Delvare

adapter->id is deprecated and not set by any adapter driver, so this was certainly not what the author wanted to use. adapter->nr maybe, but as dev_err() already includes this value, as well as the client's address, there's no point repeating them. Better print a simple error message in plain English words.

No idea where I got that from.

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#2 lore raw
In reply to Jean Delvare
Quoted 7 lines · Guenter Roeck
Quoted 6 lines · Jean Delvare

adapter->id is deprecated and not set by any adapter driver, so this was certainly not what the author wanted to use. adapter->nr maybe, but as dev_err() already includes this value, as well as the client's address, there's no point repeating them. Better print a simple error message in plain English words.

Quoted 6 lines
Quoted 2 lines

No idea where I got that from.

Do you want to take this patch in your tree, or shall I?

In both cases, I would like to get this patch in 2.6.37, as I am about to formally deprecate i2c-adapter.id, so the current code will trigger a build-time warning.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#3 lore raw
In reply to Jean Delvare
Quoted 8 lines · Jean Delvare
Quoted 7 lines · Guenter Roeck
Quoted 6 lines · Jean Delvare

adapter->id is deprecated and not set by any adapter driver, so this was certainly not what the author wanted to use. adapter->nr maybe, but as dev_err() already includes this value, as well as the client's address, there's no point repeating them. Better print a simple error message in plain English words.

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

No idea where I got that from.

Do you want to take this patch in your tree, or shall I?

Let me take it into my tree. I have another one-line patch for the same driver in there already anyway, so we can avoid conflicts.

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#4 lore raw
In reply to Jean Delvare
Quoted 8 lines · Jean Delvare

adapter->id is deprecated and not set by any adapter driver, so this was certainly not what the author wanted to use. adapter->nr maybe, but as dev_err() already includes this value, as well as the client's address, there's no point repeating them. Better print a simple error message in plain English words.

Applied.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#5 lore raw
In reply to Jean Delvare
Quoted 11 lines · Guenter Roeck
Quoted 8 lines · Jean Delvare

adapter->id is deprecated and not set by any adapter driver, so this was certainly not what the author wanted to use. adapter->nr maybe, but as dev_err() already includes this value, as well as the client's address, there's no point repeating them. Better print a simple error message in plain English words.

Applied.

Thanks. Can you please update the LTC4261 entry in wiki/Devices too?

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#6 lore raw
In reply to Jean Delvare
Quoted 8 lines · Jean Delvare
Quoted 7 lines · Guenter Roeck
Quoted 6 lines · Jean Delvare

adapter->id is deprecated and not set by any adapter driver, so this was certainly not what the author wanted to use. adapter->nr maybe, but as dev_err() already includes this value, as well as the client's address, there's no point repeating them. Better print a simple error message in plain English words.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Applied.

Thanks. Can you please update the LTC4261 entry in wiki/Devices too?

Done.

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors