[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4bcd4fd7-ff81-b480-6ad6-ae027e268c7e@collabora.com>
Date: Wed, 11 May 2022 21:29:46 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Guenter Roeck <groeck@...gle.com>,
Andy Shevchenko <andy.shevchenko@...il.com>
Cc: usama.anjum@...labora.com, "Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>,
Hans de Goede <hdegoede@...hat.com>,
Mark Gross <markgross@...nel.org>,
Benson Leung <bleung@...omium.org>,
Enric Balletbo i Serra <eballetbo@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Collabora Kernel ML <kernel@...labora.com>,
Guenter Roeck <groeck@...omium.org>,
Dmitry Torokhov <dtor@...omium.org>,
Gwendal Grignou <gwendal@...omium.org>, vbendeb@...omium.org,
Andy Shevchenko <andy@...radead.org>,
Ayman Bagabas <ayman.bagabas@...il.com>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Blaž Hrastnik <blaz@...n.io>,
Darren Hart <dvhart@...radead.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Jeremy Soller <jeremy@...tem76.com>,
Mattias Jacobsson <2pi@....nu>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
Rajat Jain <rajatja@...gle.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
chrome-platform@...ts.linux.dev
Subject: Re: [PATCH RESEND v11] platform/chrome: Add ChromeOS ACPI device
driver
On 5/11/22 9:23 PM, Guenter Roeck wrote:
> On Wed, May 11, 2022 at 8:59 AM Muhammad Usama Anjum
> <usama.anjum@...labora.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
Powered by blists - more mailing lists