From: Dan Carpenter <dan.carpenter@oracle.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Edmundo Carmona Antoranz <eantoranz@gmail.com>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next 1/3] staging: vt6655: remove unused variable
Date: Tue, 16 Mar 2021 14:39:39 +0300 [thread overview]
Message-ID: <20210316113939.GT2087@kadam> (raw)
In-Reply-To: <YE4zVDlsYzB/CqkW@kroah.com>
On Sun, Mar 14, 2021 at 05:01:24PM +0100, Greg KH wrote:
> On Sun, Mar 14, 2021 at 08:59:41AM -0600, Edmundo Carmona Antoranz wrote:
> > Since its introduction in 5449c685a4b3 (Staging: Add pristine
> > upstream vt6655 driver sources, 2009-04-25), the values
> > stored in variable byData have never been read in the macro
> > PCAvDelayByIO. By removing it, we are getting rid of a warning:
> >
> > drivers/staging/vt6655/upc.h:45:16: warning: variable ‘byData’ set but not used [-Wunused-but-set-variable]
> >
> > Signed-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>
> > ---
> > drivers/staging/vt6655/upc.h | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/vt6655/upc.h b/drivers/staging/vt6655/upc.h
> > index e086ec6e77f7..f00d0fd90003 100644
> > --- a/drivers/staging/vt6655/upc.h
> > +++ b/drivers/staging/vt6655/upc.h
> > @@ -42,14 +42,13 @@
> >
> > #define PCAvDelayByIO(uDelayUnit) \
> > do { \
> > - unsigned char byData; \
> > unsigned long ii; \
> > \
> > if (uDelayUnit <= 50) { \
> > udelay(uDelayUnit); \
> > } else { \
> > for (ii = 0; ii < (uDelayUnit); ii++) \
> > - byData = inb(0x61); \
> > + inb(0x61); \
>
> Are you sure that the compiler does not make the inb() now go away?
>
This is safe. The compiler can't remove it.
regards,
dan carpenter
prev parent reply other threads:[~2021-03-16 11:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-14 14:59 [PATCH -next 1/3] staging: vt6655: remove unused variable Edmundo Carmona Antoranz
2021-03-14 14:59 ` [PATCH -next 2/3] staging: vt6655: correct documentation warnings Edmundo Carmona Antoranz
2021-03-14 14:59 ` [PATCH -next 3/3] staging: vt6655: remove duplicate code Edmundo Carmona Antoranz
2021-03-14 16:01 ` [PATCH -next 1/3] staging: vt6655: remove unused variable Greg KH
2021-03-16 1:46 ` Edmundo Carmona Antoranz
2021-03-16 11:24 ` Greg KH
2021-03-16 11:39 ` Dan Carpenter [this message]
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=20210316113939.GT2087@kadam \
--to=dan.carpenter@oracle.com \
--cc=eantoranz@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.