Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1646861 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-05-22 15:10 +0200 |
| Last post | 2017-05-23 18:40 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] platform/x86: ideapad-laptop: hide unused 'touchpad_store' Arnd Bergmann <arnd@arndb.de> - 2017-05-22 15:10 +0200
Re: [PATCH] platform/x86: ideapad-laptop: hide unused 'touchpad_store' Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-22 19:10 +0200
Re: [PATCH] platform/x86: ideapad-laptop: hide unused 'touchpad_store' Arnd Bergmann <arnd@arndb.de> - 2017-05-22 22:40 +0200
Re: [PATCH] platform/x86: ideapad-laptop: hide unused 'touchpad_store' Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-23 18:40 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-05-22 15:10 +0200 |
| Subject | [PATCH] platform/x86: ideapad-laptop: hide unused 'touchpad_store' |
| Message-ID | <tJVfX-68S-7@gated-at.bofh.it> |
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.
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 */
static ssize_t touchpad_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
@@ -453,7 +455,7 @@ static ssize_t touchpad_store(struct device *dev,
return count;
}
-/* Switch to RO for now: It might be revisited in the future */
+#endif
static DEVICE_ATTR_RO(touchpad);
static struct attribute *ideapad_attributes[] = {
--
2.9.0
[toc] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-05-22 19:10 +0200 |
| Message-ID | <tJZ0e-8sT-27@gated-at.bofh.it> |
| In reply to | #1646861 |
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
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-05-22 22:40 +0200 |
| Message-ID | <tK2ht-1Tl-41@gated-at.bofh.it> |
| In reply to | #1647197 |
On Mon, May 22, 2017 at 7:02 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> 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?
Sure, whichever you prefer. I guess you'll just commit that patch yourself then?
Arnd
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-05-23 18:40 +0200 |
| Message-ID | <tKl0L-5Ft-31@gated-at.bofh.it> |
| In reply to | #1647366 |
On Mon, May 22, 2017 at 11:36 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Mon, May 22, 2017 at 7:02 PM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
>> 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?
>
> 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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web