lkml.org 
[lkml]   [2022]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH RESEND v11] platform/chrome: Add ChromeOS ACPI device driver
From
On 5/11/22 9:23 PM, Guenter Roeck wrote:
> On Wed, May 11, 2022 at 8:59 AM Muhammad Usama Anjum
> <usama.anjum@collabora.com> wrote:
>>>> +#define GPIO_ATTR_GROUP(_group, _name, _num) \
>>>> + static umode_t attr_is_visible_gpio_##_num(struct kobject *kobj, \
>>>> + struct attribute *attr, int n) \
>>>> + { \
>>>> + if (_num < chromeos_acpi_gpio_groups) \
>>>> + return attr->mode; \
>>>
>>>> + else \
>>>
>>> Redundant.
>> We are deciding on run time that how many GPIO attribute groups need to
>> be shown. chromeos_acpi_gpio_groups is set at run time. I don't see why
>> `else` can be redundant here.
>>
>
> else after return is _always_ unnecessary (and results in static
> analyzer messages).
>
Got it. I'll update. Thank you.

--
Muhammad Usama Anjum

\
 
 \ /
  Last update: 2022-09-17 16:22    [W:0.066 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site