[PATCHv3 1/3] Add support for GMT G762/G763 PWM fan controller

Arnaud Ebalard arno at natisbad.org
Tue Jun 4 02:54:23 EDT 2013


Hi,

Guenter Roeck <linux at roeck-us.net> writes:

> On Sun, Jun 02, 2013 at 10:14:19PM +0200, Arnaud Ebalard wrote:
>> 
>> Signed-off-by: Arnaud Ebalard <arno at natisbad.org>
>> ---
>>  drivers/hwmon/Kconfig              |   10 +
>>  drivers/hwmon/Makefile             |    1 +
>>  drivers/hwmon/g762.c               | 1179 ++++++++++++++++++++++++++++++++++++
>>  include/linux/platform_data/g762.h |   51 ++
>>  4 files changed, 1241 insertions(+)
>>  create mode 100644 drivers/hwmon/g762.c
>>  create mode 100644 include/linux/platform_data/g762.h
>> 
> [ ... ]
>
>> +static inline int g762_read_byte(const struct i2c_client *client, u8 reg,
>> +				 u8 *dest)
>> +{
>> +	int ret;
>> +
>> +	ret = i2c_smbus_read_byte_data(client, reg);
>> +	if (ret < 0) {
>> +		dev_err(&client->dev, "failed to read reg %x02x, err %d\n",
>> +			(int)reg, ret);
>
> I would suggest to write a piece of test code for the above statement and
> observe its output. "printf("%x02x\n", 0x1234);" should do.

good catch. s/%x02x/0x%02x/.

> Is the error message really needed ? If there is a persistent error,
> it will clog the log.

I removed it in v4 to come.

Cheers,

a+



More information about the linux-arm-kernel mailing list