lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 23 May 2017 19:37:36 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Ike Panhc <ike.pan@...onical.com>,
        Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Michał Kępień <kernel@...pniu.pl>,
        Brian Masney <masneyb@...tation.org>,
        Ritesh Raj Sarraf <rrs@...ian.org>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform/x86: ideapad-laptop: hide unused 'touchpad_store'

On Mon, May 22, 2017 at 11:36 PM, Arnd Bergmann <arnd@...db.de> wrote:
> On Mon, May 22, 2017 at 7:02 PM, Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
>> On Mon, May 22, 2017 at 4:07 PM, Arnd Bergmann <arnd@...db.de> wrote:
>>> A readonly sysfs property must not have a 'store' function:
>>>
>>> drivers/platform/x86/ideapad-laptop.c:438:16: error: 'touchpad_store' defined but not used [-Werror=unused-function]
>>>
>>> We can either comment it out or remove the function entirely,
>>> without a good reason one or or another I picked the second option.
>>
>> Hmm... I was expecting something like this but didn't get a single
>> error from kbuild bot.
>>
>>>
>>> Fixes: 7f363145992c ("platform/x86: ideapad-laptop: Switch touchpad attribute to be RO")
>>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>>> ---
>>>  drivers/platform/x86/ideapad-laptop.c | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
>>> index f7a4608cc60b..c4c7ae3179c0 100644
>>> --- a/drivers/platform/x86/ideapad-laptop.c
>>> +++ b/drivers/platform/x86/ideapad-laptop.c
>>> @@ -435,6 +435,8 @@ static ssize_t touchpad_show(struct device *dev,
>>>         return sprintf(buf, "%lu\n", result);
>>>  }
>>>
>>> +#if 0
>>> +/* Switch to RO for now: It might be revisited in the future */
>>
>> Can we use __maybe_unused instead?
>
> Sure, whichever you prefer. I guess you'll just commit that patch yourself then?

Updated version pushed to testing, thanks.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ