summaryrefslogtreecommitdiff
path: root/drivers/block/skd_main.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2017-08-17 13:13:13 -0700
committerJens Axboe <axboe@kernel.dk>2017-08-18 08:45:29 -0600
commitc830da8cbc7b1b319fa688aaeb751d8c6e66b16b (patch)
treeba8d9fb856e10c4eb59509d0a0eaa5eb227cec25 /drivers/block/skd_main.c
parentb1824eef28dcb384d5f771b79ec9a65474e20218 (diff)
downloadlinux-rt-c830da8cbc7b1b319fa688aaeb751d8c6e66b16b.tar.gz
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>
Diffstat (limited to 'drivers/block/skd_main.c')
-rw-r--r--drivers/block/skd_main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index e54089315a7a..008fa7231159 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -2509,16 +2509,16 @@ static void skd_process_scsi_inq(struct skd_device *skdev,
static int skd_isr_completion_posted(struct skd_device *skdev,
int limit, int *enqueued)
{
- volatile struct fit_completion_entry_v1 *skcmp = NULL;
+ volatile struct fit_completion_entry_v1 *skcmp;
volatile struct fit_comp_error_info *skerr;
u16 req_id;
u32 req_slot;
struct skd_request_context *skreq;
- u16 cmp_cntxt = 0;
- u8 cmp_status = 0;
- u8 cmp_cycle = 0;
- u32 cmp_bytes = 0;
- int rc = 0;
+ u16 cmp_cntxt;
+ u8 cmp_status;
+ u8 cmp_cycle;
+ u32 cmp_bytes;
+ int rc;
int processed = 0;
lockdep_assert_held(&skdev->lock);