platform: x86: dell-smo8800: remove redundant assignments to byte_data
Subsystems (2)
PATCH 1/1 platform: x86: dell-smo8800: remove redundant assignments to byte_data
From: Colin Ian King <[email protected]>
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
--- drivers/platform/x86/dell-smo8800.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/x86/dell-smo8800.c +1 -2
@@ -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 )
Signature · 1 line
2.14.1
Quoted 8 lines · Colin King
From: Colin Ian King <[email protected]>
Variable
byte_datais 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.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 7 lines · On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
Quoted 6 lines · Colin King
From: Colin Ian King <[email protected]>
Variable
byte_datais being initialized and re-assigned with values that are never read. Remove these as these redundant assignments. Cleans up clang warning:
Quoted 7 lines
Quoted 2 lines
drivers/platform/x86/dell-smo8800.c:106:2: warning: Value stored to 'byte_data' is never readThanks 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.
Quoted 2 lines
Per se patch looks pretty much good to me.
Signature · 6 lines
Pali Rohár [email protected] -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Pali Rohár
Quoted 10 lines · On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
Quoted 8 lines · Colin King
From: Colin Ian King <[email protected]>
Variable
byte_datais 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
Quoted 8 lines
Quoted 4 lines
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.
Signature · 6 lines
With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 17 lines · On Tuesday 31 October 2017 16:07:25 Andy Shevchenko wrote:
Quoted 16 lines · Pali Rohár
Quoted 14 lines · On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
Quoted 8 lines · Colin King
From: Colin Ian King <[email protected]>
Variable
byte_datais 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 readThanks 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.
Quoted 6 lines
Quoted 3 lines
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...
Signature · 2 lines
Pali Rohár [email protected]
Quoted 9 lines · Pali Rohár
Quoted 6 lines · On Tuesday 31 October 2017 16:07:25 Andy Shevchenko wrote:
Quoted 2 lines · Pali Rohár
Quoted 1 line · On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
On Tue, Oct 31, 2017 at 1:03 PM, Colin King <[email protected]> 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?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Pali Rohár
Acked-byQuoted 4 lines · On Tuesday 31 October 2017 20:08:45 Andy Shevchenko wrote:
Quoted 3 lines · Pali Rohár
Quoted 2 lines · On Tuesday 31 October 2017 16:07:25 Andy Shevchenko wrote:
Quoted 1 line · Pali Rohár
On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line · Colin King
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:
Signature · 2 lines
Pali Rohár [email protected]
Quoted 10 lines · Pali Rohár
Quoted 9 lines · On Tuesday 31 October 2017 20:08:45 Andy Shevchenko wrote:
Quoted 8 lines · Pali Rohár
Quoted 6 lines · On Tuesday 31 October 2017 16:07:25 Andy Shevchenko wrote:
Quoted 2 lines · Pali Rohár
Quoted 1 line · On Tuesday 31 October 2017 15:47:58 Andy Shevchenko wrote:
On Tue, Oct 31, 2017 at 1:03 PM, Colin King <[email protected]> wrote:
OK, though it doesn't clarify the intention of the
byte_data(useless?) assignments.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
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 <[email protected]>
Applied to my review and testing queue, thanks!
Quoted 4 lines
--
Pali Rohár
[email protected]
Signature · 2 lines
With Best Regards, Andy Shevchenko