* [PATCH] platform: x86: dell-smo8800: remove redundant assignments to byte_data
@ 2017-10-31 11:03 Colin King
2017-10-31 13:47 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Colin King @ 2017-10-31 11:03 UTC (permalink / raw)
To: Pali Rohár, Darren Hart, Andy Shevchenko, platform-driver-x86
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable byte_data is being initialized and re-assigned with values that
are never read. Remove these as these redundant assignments. Cleans up
clang warning:
drivers/platform/x86/dell-smo8800.c:106:2: warning: Value stored to 'byte_data'
is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/platform/x86/dell-smo8800.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/x86/dell-smo8800.c b/drivers/platform/x86/dell-smo8800.c
index 37e646034ef8..1d87237bc731 100644
--- a/drivers/platform/x86/dell-smo8800.c
+++ b/drivers/platform/x86/dell-smo8800.c
@@ -90,7 +90,7 @@ static ssize_t smo8800_misc_read(struct file *file, char __user *buf,
struct smo8800_device, miscdev);
u32 data = 0;
- unsigned char byte_data = 0;
+ unsigned char byte_data;
ssize_t retval = 1;
if (count < 1)
@@ -103,7 +103,6 @@ static ssize_t smo8800_misc_read(struct file *file, char __user *buf,
if (retval)
return retval;
- byte_data = 1;
retval = 1;
if (data < 255)
--
2.14.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] platform: x86: dell-smo8800: remove redundant assignments to byte_data
2017-10-31 11:03 [PATCH] platform: x86: dell-smo8800: remove redundant assignments to byte_data Colin King
@ 2017-10-31 13:47 ` Andy Shevchenko
2017-10-31 13:55 ` Pali Rohár
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2017-10-31 13:47 UTC (permalink / raw)
To: Colin King
Cc: Pali Rohár, Darren Hart, Andy Shevchenko, Platform Driver,
kernel-janitors, linux-kernel
On Tue, Oct 31, 2017 at 1:03 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable byte_data is being initialized and re-assigned with values that
> are never read. Remove these as these redundant assignments. Cleans up
> clang warning:
>
> drivers/platform/x86/dell-smo8800.c:106:2: warning: Value stored to 'byte_data'
> is never read
Thanks for the patch.
As I read a code it was from the beginning like this. I dunno what was
a motivation of this pieces, thus I would like to hear Pali.
Per se patch looks pretty much good to me.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] platform: x86: dell-smo8800: remove redundant assignments to byte_data
2017-10-31 13:47 ` Andy Shevchenko
@ 2017-10-31 13:55 ` Pali Rohár
2017-10-31 14:07 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2017-10-31 13:55 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Colin King, Darren Hart, Andy Shevchenko, Platform Driver,
kernel-janitors, linux-kernel
On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
> On Tue, Oct 31, 2017 at 1:03 PM, Colin King <colin.king@canonical.com> wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > Variable byte_data is being initialized and re-assigned with values that
> > are never read. Remove these as these redundant assignments. Cleans up
> > clang warning:
> >
> > drivers/platform/x86/dell-smo8800.c:106:2: warning: Value stored to 'byte_data'
> > is never read
>
> Thanks for the patch.
>
> As I read a code it was from the beginning like this. I dunno what was
> a motivation of this pieces, thus I would like to hear Pali.
IIRC this part of code comes from the lis3lv* driver which was used for
HP EliteBook machines. As both drivers provides similar interface for
userspace.
> Per se patch looks pretty much good to me.
>
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] platform: x86: dell-smo8800: remove redundant assignments to byte_data
2017-10-31 13:55 ` Pali Rohár
@ 2017-10-31 14:07 ` Andy Shevchenko
2017-10-31 14:13 ` Pali Rohár
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2017-10-31 14:07 UTC (permalink / raw)
To: Pali Rohár
Cc: Colin King, Darren Hart, Andy Shevchenko, Platform Driver,
kernel-janitors, linux-kernel
On Tue, Oct 31, 2017 at 3:55 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
>> On Tue, Oct 31, 2017 at 1:03 PM, Colin King <colin.king@canonical.com> wrote:
>> > From: Colin Ian King <colin.king@canonical.com>
>> >
>> > Variable byte_data is being initialized and re-assigned with values that
>> > are never read. Remove these as these redundant assignments. Cleans up
>> > clang warning:
>> >
>> > drivers/platform/x86/dell-smo8800.c:106:2: warning: Value stored to 'byte_data'
>> > is never read
>>
>> Thanks for the patch.
>>
>> As I read a code it was from the beginning like this. I dunno what was
>> a motivation of this pieces, thus I would like to hear Pali.
>
> IIRC this part of code comes from the lis3lv* driver which was used for
> HP EliteBook machines. As both drivers provides similar interface for
> userspace.
OK, though it doesn't clarify the intention of the byte_data
(useless?) assignments.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] platform: x86: dell-smo8800: remove redundant assignments to byte_data
2017-10-31 14:07 ` Andy Shevchenko
@ 2017-10-31 14:13 ` Pali Rohár
2017-10-31 18:08 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2017-10-31 14:13 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Colin King, Darren Hart, Andy Shevchenko, Platform Driver,
kernel-janitors, linux-kernel
On Tuesday 31 October 2017 16:07:25 Andy Shevchenko wrote:
> On Tue, Oct 31, 2017 at 3:55 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> > On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
> >> On Tue, Oct 31, 2017 at 1:03 PM, Colin King <colin.king@canonical.com> wrote:
> >> > From: Colin Ian King <colin.king@canonical.com>
> >> >
> >> > Variable byte_data is being initialized and re-assigned with values that
> >> > are never read. Remove these as these redundant assignments. Cleans up
> >> > clang warning:
> >> >
> >> > drivers/platform/x86/dell-smo8800.c:106:2: warning: Value stored to 'byte_data'
> >> > is never read
> >>
> >> Thanks for the patch.
> >>
> >> As I read a code it was from the beginning like this. I dunno what was
> >> a motivation of this pieces, thus I would like to hear Pali.
> >
> > IIRC this part of code comes from the lis3lv* driver which was used for
> > HP EliteBook machines. As both drivers provides similar interface for
> > userspace.
>
> OK, though it doesn't clarify the intention of the byte_data
> (useless?) assignments.
Probably similar code pattern exists in that lis3lv* driver...
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] platform: x86: dell-smo8800: remove redundant assignments to byte_data
2017-10-31 14:13 ` Pali Rohár
@ 2017-10-31 18:08 ` Andy Shevchenko
2017-10-31 18:41 ` Pali Rohár
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2017-10-31 18:08 UTC (permalink / raw)
To: Pali Rohár
Cc: Colin King, Darren Hart, Andy Shevchenko, Platform Driver,
kernel-janitors, linux-kernel
On Tue, Oct 31, 2017 at 4:13 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> On Tuesday 31 October 2017 16:07:25 Andy Shevchenko wrote:
>> On Tue, Oct 31, 2017 at 3:55 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>> > On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
>> >> On Tue, Oct 31, 2017 at 1:03 PM, Colin King <colin.king@canonical.com> wrote:
>> OK, though it doesn't clarify the intention of the byte_data
>> (useless?) assignments.
>
> Probably similar code pattern exists in that lis3lv* driver...
So, it seems to me OK to apply the patch. No objections?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] platform: x86: dell-smo8800: remove redundant assignments to byte_data
2017-10-31 18:08 ` Andy Shevchenko
@ 2017-10-31 18:41 ` Pali Rohár
2017-11-03 12:37 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2017-10-31 18:41 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Colin King, Darren Hart, Andy Shevchenko, Platform Driver,
kernel-janitors, linux-kernel
On Tuesday 31 October 2017 20:08:45 Andy Shevchenko wrote:
> On Tue, Oct 31, 2017 at 4:13 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> > On Tuesday 31 October 2017 16:07:25 Andy Shevchenko wrote:
> >> On Tue, Oct 31, 2017 at 3:55 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> >> > On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
> >> >> On Tue, Oct 31, 2017 at 1:03 PM, Colin King <colin.king@canonical.com> wrote:
>
> >> OK, though it doesn't clarify the intention of the byte_data
> >> (useless?) assignments.
> >
> > Probably similar code pattern exists in that lis3lv* driver...
>
> So, it seems to me OK to apply the patch. No objections?
No objections, you can add my:
Acked-by: Pali Rohár <pali.rohar@gmail.com>
--
Pali Rohár
pali.rohar@gmail.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] platform: x86: dell-smo8800: remove redundant assignments to byte_data
2017-10-31 18:41 ` Pali Rohár
@ 2017-11-03 12:37 ` Andy Shevchenko
0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2017-11-03 12:37 UTC (permalink / raw)
To: Pali Rohár
Cc: Colin King, Darren Hart, Andy Shevchenko, Platform Driver,
kernel-janitors, linux-kernel
On Tue, Oct 31, 2017 at 8:41 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
> On Tuesday 31 October 2017 20:08:45 Andy Shevchenko wrote:
>> On Tue, Oct 31, 2017 at 4:13 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>> > On Tuesday 31 October 2017 16:07:25 Andy Shevchenko wrote:
>> >> On Tue, Oct 31, 2017 at 3:55 PM, Pali Rohár <pali.rohar@gmail.com> wrote:
>> >> > On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
>> >> >> On Tue, Oct 31, 2017 at 1:03 PM, Colin King <colin.king@canonical.com> wrote:
>>
>> >> OK, though it doesn't clarify the intention of the byte_data
>> >> (useless?) assignments.
>> >
>> > Probably similar code pattern exists in that lis3lv* driver...
>>
>> So, it seems to me OK to apply the patch. No objections?
>
> No objections, you can add my:
>
> Acked-by: Pali Rohár <pali.rohar@gmail.com>
Applied to my review and testing queue, thanks!
>
> --
> Pali Rohár
> pali.rohar@gmail.com
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-11-03 12:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 11:03 [PATCH] platform: x86: dell-smo8800: remove redundant assignments to byte_data Colin King
2017-10-31 13:47 ` Andy Shevchenko
2017-10-31 13:55 ` Pali Rohár
2017-10-31 14:07 ` Andy Shevchenko
2017-10-31 14:13 ` Pali Rohár
2017-10-31 18:08 ` Andy Shevchenko
2017-10-31 18:41 ` Pali Rohár
2017-11-03 12:37 ` Andy Shevchenko
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).