summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2017-08-17 23:12:55 +0300
committerJens Axboe <axboe@kernel.dk>2017-08-18 17:45:29 +0300
commit95895e178a1e6a9fe33487de0c09869f49953aae (patch)
tree2529cc51d4c6848abedd5c87667ccefe365476b3
parente1d06f2d8a3e4bc88f3c2052adb3ed8804da1096 (diff)
downloadlinux-95895e178a1e6a9fe33487de0c09869f49953aae.tar.xz
skd: Remove set-but-not-used local variables
These variables have been detected by building with W=1. Declare 'acc' as __maybe_unused because most access_ok() implementations ignore their first argument. 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>
-rw-r--r--drivers/block/skd_main.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 5a88116efc97..ef7c0384e9a8 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -537,8 +537,6 @@ static void skd_request_fn(struct request_queue *q)
u32 lba;
u32 count;
int data_dir;
- u32 be_lba;
- u32 be_count;
u64 be_dmaa;
u64 cmdctxt;
u32 timo_slot;
@@ -676,8 +674,6 @@ static void skd_request_fn(struct request_queue *q)
cmd_ptr = &skmsg->msg_buf[skmsg->length];
memset(cmd_ptr, 0, 32);
- be_lba = cpu_to_be32(lba);
- be_count = cpu_to_be32(count);
be_dmaa = cpu_to_be64((u64)skreq->sksg_dma_address);
cmdctxt = skreq->id + SKD_ID_INCR;
@@ -889,7 +885,6 @@ static void skd_postop_sg_list(struct skd_device *skdev,
static void skd_request_fn_not_online(struct request_queue *q)
{
struct skd_device *skdev = q->queuedata;
- int error;
SKD_ASSERT(skdev->state != SKD_DRVR_STATE_ONLINE);
@@ -919,7 +914,6 @@ static void skd_request_fn_not_online(struct request_queue *q)
case SKD_DRVR_STATE_FAULT:
case SKD_DRVR_STATE_DISAPPEARED:
default:
- error = -EIO;
break;
}
@@ -943,7 +937,6 @@ static void skd_timer_tick(ulong arg)
struct skd_device *skdev = (struct skd_device *)arg;
u32 timo_slot;
- u32 overdue_timestamp;
unsigned long reqflags;
u32 state;
@@ -976,8 +969,6 @@ static void skd_timer_tick(ulong arg)
goto timer_func_out;
/* Something is overdue */
- overdue_timestamp = skdev->timeout_stamp - SKD_N_TIMEOUT_SLOT;
-
pr_debug("%s:%s:%d found %d timeouts, draining busy=%d\n",
skdev->name, __func__, __LINE__,
skdev->timeout_slot[timo_slot], skdev->in_flight);
@@ -1297,7 +1288,7 @@ static int skd_sg_io_get_and_check_args(struct skd_device *skdev,
struct skd_sg_io *sksgio)
{
struct sg_io_hdr *sgp = &sksgio->sg;
- int i, acc;
+ int i, __maybe_unused acc;
if (!access_ok(VERIFY_WRITE, sksgio->argp, sizeof(sg_io_hdr_t))) {
pr_debug("%s:%s:%d access sg failed %p\n",