Home
last modified time | relevance | path

Searched hist:"1 cef8b5019769d46725932eeace7a383bca97905" (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/drivers/gpio/
H A Dgpiolib-cdev.cdiff 1cef8b5019769d46725932eeace7a383bca97905 Wed Mar 30 10:06:20 CDT 2022 Andy Shevchenko <andriy.shevchenko@linux.intel.com> gpiolib: Get rid of redundant 'else'

In the snippets like the following

if (...)
return / goto / break / continue ...;
else
...

the 'else' is redundant. Get rid of it. In case of IOCTLs use
switch-case pattern that seems the usual in such cases.

While at it, clarify necessity of else in gpiod_direction_output()
by attaching else if to the closing curly brace on a previous line.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
H A Dgpiolib.cdiff 1cef8b5019769d46725932eeace7a383bca97905 Wed Mar 30 10:06:20 CDT 2022 Andy Shevchenko <andriy.shevchenko@linux.intel.com> gpiolib: Get rid of redundant 'else'

In the snippets like the following

if (...)
return / goto / break / continue ...;
else
...

the 'else' is redundant. Get rid of it. In case of IOCTLs use
switch-case pattern that seems the usual in such cases.

While at it, clarify necessity of else in gpiod_direction_output()
by attaching else if to the closing curly brace on a previous line.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>