From: Jiapeng Chong Date: Fri, 30 Apr 2021 09:26:45 +0000 (+0800) Subject: floppy: cleanup: remove redundant assignment to nr_sectors X-Git-Tag: accepted/tizen/unified/20230118.172025~6950^2~3^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30ab5db7ee787c88236376ce6c88b53d613fcae2;p=platform%2Fkernel%2Flinux-rpi.git floppy: cleanup: remove redundant assignment to nr_sectors Variable nr_sectors is set to zero but this value is never read as it is overwritten later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: drivers/block/floppy.c:2333:2: warning: Value stored to 'nr_sectors' is never read [clang-analyzer-deadcode.DeadStores]. Link: https://lore.kernel.org/r/1619774805-121562-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Denis Efremov --- diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 8a9d222..e96ad5b 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -2330,7 +2330,6 @@ static void rw_interrupt(void) if (!drive_state[current_drive].first_read_date) drive_state[current_drive].first_read_date = jiffies; - nr_sectors = 0; ssize = DIV_ROUND_UP(1 << raw_cmd->cmd[SIZECODE], 4); if (reply_buffer[ST1] & ST1_EOC)