From: Devendra Naga <devendra.aaru@gmail.com>
To: linux-fbdev@vger.kernel.org
Subject: [PATCH 1/3] video: backlight: adp5520: fix compiler warning in adp5520_show
Date: Fri, 08 Mar 2013 19:31:07 +0000 [thread overview]
Message-ID: <1362771069-16345-1-git-send-email-devendra.aaru@gmail.com> (raw)
while compiling with make W=1 (gcc gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8))
found the following warning
drivers/video/backlight/adp5520_bl.c: In function ‘adp5520_show’:
drivers/video/backlight/adp5520_bl.c:146:6: warning: variable ‘error’ set but not used [-Wunused-but-set-variable]
fixed by removing the variable
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
drivers/video/backlight/adp5520_bl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/backlight/adp5520_bl.c b/drivers/video/backlight/adp5520_bl.c
index a1e41d4..9f8b20b 100644
--- a/drivers/video/backlight/adp5520_bl.c
+++ b/drivers/video/backlight/adp5520_bl.c
@@ -143,11 +143,10 @@ static int adp5520_bl_setup(struct backlight_device *bl)
static ssize_t adp5520_show(struct device *dev, char *buf, int reg)
{
struct adp5520_bl *data = dev_get_drvdata(dev);
- int error;
uint8_t reg_val;
mutex_lock(&data->lock);
- error = adp5520_read(data->master, reg, ®_val);
+ adp5520_read(data->master, reg, ®_val);
mutex_unlock(&data->lock);
return sprintf(buf, "%u\n", reg_val);
--
1.8.1.2
next reply other threads:[~2013-03-08 19:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 19:31 Devendra Naga [this message]
2013-03-08 21:01 ` [PATCH 1/3] video: backlight: adp5520: fix compiler warning in adp5520_show Andrew Morton
2013-03-11 0:56 ` Jingoo Han
2013-03-11 6:16 ` devendra.aaru
2013-03-11 6:18 ` devendra.aaru
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=1362771069-16345-1-git-send-email-devendra.aaru@gmail.com \
--to=devendra.aaru@gmail.com \
--cc=linux-fbdev@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;
as well as URLs for NNTP newsgroup(s).