Commit 30ab5db7 authored by Jiapeng Chong's avatar Jiapeng Chong Committed by Denis Efremov

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.comReported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
parent d07f3b08
...@@ -2330,7 +2330,6 @@ static void rw_interrupt(void) ...@@ -2330,7 +2330,6 @@ static void rw_interrupt(void)
if (!drive_state[current_drive].first_read_date) if (!drive_state[current_drive].first_read_date)
drive_state[current_drive].first_read_date = jiffies; drive_state[current_drive].first_read_date = jiffies;
nr_sectors = 0;
ssize = DIV_ROUND_UP(1 << raw_cmd->cmd[SIZECODE], 4); ssize = DIV_ROUND_UP(1 << raw_cmd->cmd[SIZECODE], 4);
if (reply_buffer[ST1] & ST1_EOC) if (reply_buffer[ST1] & ST1_EOC)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment