Re: [PATCH v5 09/14] iio: magnetometer: yas530: Introduce "chip_info" structure

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

 



Hi Andy,

On 08.08.22 13:22, Andy Shevchenko wrote:
> On Mon, Aug 8, 2022 at 1:07 AM Jakob Hauser <jahau@xxxxxxxxxxxxxx> wrote:
>>
>> This commit introduces the "chip_info" structure approach for better variant
>> handling.
> 
> Read "Submitting Patches" in the chapter which mentions "This patch"
> pattern and fix the above accordingly.

I'll change the sentence to imperative mood.

>> The variant to be used is now chosen by the Device Tree (enum "chip_ids"),
>> not by the chip ID in the register. However, there is a check to make sure
>> they match (using integer "id_check").

...

>> +       if (id_check != yas5xx->chip_info->devid) {
> 
>> +       switch (yas5xx->chip_info->devid) {
> 
> You can make these kind of lines shorter by introducing a temporary variable:
> 
>    struct ... *ci = yaas5xx->chip_info;
> 

Everywhere? OK. There will be many changes, this also affects the
following patches.

I hope "ci" for chip_info and "c" for calibration is not too confusing.
Though I guess it's ok.

Kind regards,
Jakob



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux