From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760421AbdEVRCz (ORCPT ); Mon, 22 May 2017 13:02:55 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:36727 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757323AbdEVRCp (ORCPT ); Mon, 22 May 2017 13:02:45 -0400 MIME-Version: 1.0 In-Reply-To: <20170522130709.242445-1-arnd@arndb.de> References: <20170522130709.242445-1-arnd@arndb.de> From: Andy Shevchenko Date: Mon, 22 May 2017 20:02:43 +0300 Message-ID: Subject: Re: [PATCH] platform/x86: ideapad-laptop: hide unused 'touchpad_store' To: Arnd Bergmann Cc: Ike Panhc , Darren Hart , Andy Shevchenko , =?UTF-8?B?TWljaGHFgiBLxJlwaWXFhA==?= , Brian Masney , Ritesh Raj Sarraf , Mika Westerberg , Platform Driver , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 22, 2017 at 4:07 PM, Arnd Bergmann 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 > --- > 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