Re: [PATCH v6 3/5] i2c: add support for HiSilicon I2C controller

From: Yicong Yang
Date: Wed Apr 07 2021 - 04:18:50 EST


On 2021/4/7 4:02, Wolfram Sang wrote:
>
> Only super minor stuff. Thanks to all the contributors and reviewers!
>
>> +#define HZ_PER_KHZ 1000
>
> KHZ_PER_HZ?

that doesn't match what we want. we want the count of HZs per one KHZ.

>
>> + ret = devm_i2c_add_adapter(dev, adapter);
>> + if (ret) {
>> + dev_err(dev, "failed to add i2c adapter, ret = %d\n", ret);
>
> No need to print that. The core prints messages on failures.
>

i check the code and find a little difference. the print in the core doesn't
have the device prefix so it may not tell us which device's registeration fails.
but considering we have device name embedded in the adapter name for this
driver, it's ok to remove this message.