Re: [PATCH] pcmcia/cm4000: remove useless variable tmp

From: Alex Shi
Date: Tue Jan 21 2020 - 04:55:47 EST




å 2020/1/21 äå5:08, Arnd Bergmann åé:
> On Tue, Jan 21, 2020 at 9:50 AM Alex Shi <alex.shi@xxxxxxxxxxxxxxxxx> 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
>

Thanks a lot Arnd!