Skip to content

Commit c830da8

Browse files
KAGA-KOKOaxboe
authored andcommitted
skd: Remove superfluous initializations from skd_isr_completion_posted()
The value of skcmp, cmp_cntxt etc. is overwritten during every loop iteration and is not used after the loop has finished. Hence initializing these variables outside the loop is not necessary. This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Cc: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent b1824ee commit c830da8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/block/skd_main.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2509,16 +2509,16 @@ static void skd_process_scsi_inq(struct skd_device *skdev,
25092509
static int skd_isr_completion_posted(struct skd_device *skdev,
25102510
int limit, int *enqueued)
25112511
{
2512-
volatile struct fit_completion_entry_v1 *skcmp = NULL;
2512+
volatile struct fit_completion_entry_v1 *skcmp;
25132513
volatile struct fit_comp_error_info *skerr;
25142514
u16 req_id;
25152515
u32 req_slot;
25162516
struct skd_request_context *skreq;
2517-
u16 cmp_cntxt = 0;
2518-
u8 cmp_status = 0;
2519-
u8 cmp_cycle = 0;
2520-
u32 cmp_bytes = 0;
2521-
int rc = 0;
2517+
u16 cmp_cntxt;
2518+
u8 cmp_status;
2519+
u8 cmp_cycle;
2520+
u32 cmp_bytes;
2521+
int rc;
25222522
int processed = 0;
25232523

25242524
lockdep_assert_held(&skdev->lock);

0 commit comments

Comments
 (0)