mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Colin King <colin.king@canonical.com>
To: "Pali Rohár" <pali.rohar@gmail.com>,
	"Darren Hart" <dvhart@infradead.org>,
	"Andy Shevchenko" <andy@infradead.org>,
	platform-driver-x86@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] platform: x86: dell-smo8800: remove redundant assignments to byte_data
Date: Tue, 31 Oct 2017 11:03:18 +0000	[thread overview]
Message-ID: <20171031110318.20985-1-colin.king@canonical.com> (raw)

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

             reply	other threads:[~2017-10-31 11:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 11:03 Colin King [this message]
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

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=20171031110318.20985-1-colin.king@canonical.com \
    --to=colin.king@canonical.com \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.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

all inboxes | Powered by JetHome®