[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0LJETeKbQvs-EeQ1cF84gVO3JS75SOZYD0F+puWhi9=w@mail.gmail.com>
Date: Tue, 21 Jan 2020 10:08:13 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Alex Shi <alex.shi@...ux.alibaba.com>
Cc: Harald Welte <laforge@...monks.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pcmcia/cm4000: remove useless variable tmp
On Tue, Jan 21, 2020 at 9:50 AM Alex Shi <alex.shi@...ux.alibaba.com> wrote:
>
> No one care the value of 'tmp' in func cmm_write. better to remove it.
Hi Alex,
> @@ -1146,7 +1145,7 @@ static ssize_t cmm_write(struct file *filp, const char __user *buf,
> set_cardparameter(dev);
>
> /* dummy read, reset flag procedure received */
> - tmp = inb(REG_FLAGS1(iobase));
> + inb(REG_FLAGS1(iobase));
I think this may cause warnings on some architectures, when inb() is a macro
that just turns into a pointer dereference. You could write it as
(void)inb(REG_FLAGS1(iobase));
which would not warn anywhere.
Arnd
Powered by blists - more mailing lists