lkml.org 
[lkml]   [2021]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] floppy: remove redundant assignment to variable st
    From
    Date
    Hi,

    On 4/15/21 4:00 PM, Colin King wrote:
    > From: Colin Ian King <colin.king@canonical.com>
    >
    > The variable st is being assigned a value that is never read and
    > it is being updated later with a new value. The initialization is
    > redundant and can be removed.
    >
    > Addresses-Coverity: ("Unused value")
    > Signed-off-by: Colin Ian King <colin.king@canonical.com>

    Applied, thanks!

    https://github.com/evdenis/linux-floppy/commit/aeec7983d49a5f972df47c742ff8373df15b0d28

    > ---
    > arch/x86/include/asm/floppy.h | 1 -
    > 1 file changed, 1 deletion(-)
    >
    > diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h
    > index d43717b423cb..6ec3fc969ad5 100644
    > --- a/arch/x86/include/asm/floppy.h
    > +++ b/arch/x86/include/asm/floppy.h
    > @@ -74,7 +74,6 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id)
    > int lcount;
    > char *lptr;
    >
    > - st = 1;
    > for (lcount = virtual_dma_count, lptr = virtual_dma_addr;
    > lcount; lcount--, lptr++) {
    > st = inb(virtual_dma_port + FD_STATUS);
    >

    \
     
     \ /
      Last update: 2021-04-16 09:35    [W:4.446 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site