Re: [PATCH 6/7] iio: magnetometer: yas530: Remove redundant defaults on switch devid

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

 



On Thu, Jun 9, 2022 at 1:44 AM Jakob Hauser <jahau@xxxxxxxxxxxxxx> wrote:
>
> This is a preparation for adding YAS537 variant.
>
> In function yas5xx_probe(), there is a switch statement checking for device
> IDs. If the ID is unknown, it exits with a device error. In later functions,
> it's not neccessary to check the validity of the device IDs again.
>
> When adding YAS537 in a later patch, several of such switch statements will be
> added. To make it more uniform, the redundant ones in YAS530/532 get herby
> removed. This is done in a separate patch for better history control.

...

> -       default:

Please, leave it. Some static analyzers or weird compiler versions may
complain on this.

> -               dev_err(yas5xx->dev, "unknown data format\n");
> -               ret = -EINVAL;

> -               break;

So leave this.

>         }

Ditto for the rest.

-- 
With Best Regards,
Andy Shevchenko



[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