Re: [PATCH RESEND v11] platform/chrome: Add ChromeOS ACPI device driver

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

 



On 5/11/22 9:23 PM, Guenter Roeck wrote:
> On Wed, May 11, 2022 at 8:59 AM Muhammad Usama Anjum
> <usama.anjum@xxxxxxxxxxxxx> 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



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux