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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Guenter Roeck <linux@xxxxxxxxxxxx> writes:

> On Sun, Jun 02, 2013 at 10:14:19PM +0200, Arnaud Ebalard wrote:
>> 
>> Signed-off-by: Arnaud Ebalard <arno@xxxxxxxxxxxx>
>> ---
>>  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+
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux