From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Ike Panhc" <ike.pan@canonical.com>,
"Darren Hart" <dvhart@infradead.org>,
"Andy Shevchenko" <andy@infradead.org>,
"Michał Kępień" <kernel@kempniu.pl>,
"Brian Masney" <masneyb@onstation.org>,
"Ritesh Raj Sarraf" <rrs@debian.org>,
"Mika Westerberg" <mika.westerberg@linux.intel.com>,
"Platform Driver" <platform-driver-x86@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: ideapad-laptop: hide unused 'touchpad_store'
Date: Mon, 22 May 2017 20:02:43 +0300 [thread overview]
Message-ID: <CAHp75Ve5cN4bkA1Q2-6_N6wz0ZCsps3fOnb1Kobi_wK5=Hn4Jg@mail.gmail.com> (raw)
In-Reply-To: <20170522130709.242445-1-arnd@arndb.de>
On Mon, May 22, 2017 at 4:07 PM, Arnd Bergmann <arnd@arndb.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@arndb.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?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2017-05-22 17:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 13:07 [PATCH] platform/x86: ideapad-laptop: hide unused 'touchpad_store' Arnd Bergmann
2017-05-22 17:02 ` Andy Shevchenko [this message]
2017-05-22 20:36 ` Arnd Bergmann
2017-05-23 16:37 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHp75Ve5cN4bkA1Q2-6_N6wz0ZCsps3fOnb1Kobi_wK5=Hn4Jg@mail.gmail.com' \
--to=andy.shevchenko@gmail.com \
--cc=andy@infradead.org \
--cc=arnd@arndb.de \
--cc=dvhart@infradead.org \
--cc=ike.pan@canonical.com \
--cc=kernel@kempniu.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=masneyb@onstation.org \
--cc=mika.westerberg@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rrs@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).