Commit ba6f7da9 authored by YueHaibing's avatar YueHaibing Committed by Jens Axboe

lightnvm: remove set but not used variables 'data_len' and 'rq_len'

drivers/lightnvm/pblk-read.c: In function pblk_submit_read_gc:
drivers/lightnvm/pblk-read.c:423:6: warning: variable data_len set but not used [-Wunused-but-set-variable]
drivers/lightnvm/pblk-recovery.c: In function pblk_recov_scan_oob:
drivers/lightnvm/pblk-recovery.c:368:15: warning: variable rq_len set but not used [-Wunused-but-set-variable]

They are not used since commit 48e5da72 ("lightnvm:
move metadata mapping to lower level driver")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent e8fc87f6
...@@ -420,7 +420,6 @@ int pblk_submit_read_gc(struct pblk *pblk, struct pblk_gc_rq *gc_rq) ...@@ -420,7 +420,6 @@ int pblk_submit_read_gc(struct pblk *pblk, struct pblk_gc_rq *gc_rq)
struct nvm_tgt_dev *dev = pblk->dev; struct nvm_tgt_dev *dev = pblk->dev;
struct nvm_geo *geo = &dev->geo; struct nvm_geo *geo = &dev->geo;
struct nvm_rq rqd; struct nvm_rq rqd;
int data_len;
int ret = NVM_IO_OK; int ret = NVM_IO_OK;
memset(&rqd, 0, sizeof(struct nvm_rq)); memset(&rqd, 0, sizeof(struct nvm_rq));
...@@ -445,7 +444,6 @@ int pblk_submit_read_gc(struct pblk *pblk, struct pblk_gc_rq *gc_rq) ...@@ -445,7 +444,6 @@ int pblk_submit_read_gc(struct pblk *pblk, struct pblk_gc_rq *gc_rq)
if (!(gc_rq->secs_to_gc)) if (!(gc_rq->secs_to_gc))
goto out; goto out;
data_len = (gc_rq->secs_to_gc) * geo->csecs;
rqd.opcode = NVM_OP_PREAD; rqd.opcode = NVM_OP_PREAD;
rqd.nr_ppas = gc_rq->secs_to_gc; rqd.nr_ppas = gc_rq->secs_to_gc;
......
...@@ -365,7 +365,7 @@ static int pblk_recov_scan_oob(struct pblk *pblk, struct pblk_line *line, ...@@ -365,7 +365,7 @@ static int pblk_recov_scan_oob(struct pblk *pblk, struct pblk_line *line,
__le64 *lba_list; __le64 *lba_list;
u64 paddr = pblk_line_smeta_start(pblk, line) + lm->smeta_sec; u64 paddr = pblk_line_smeta_start(pblk, line) + lm->smeta_sec;
bool padded = false; bool padded = false;
int rq_ppas, rq_len; int rq_ppas;
int i, j; int i, j;
int ret; int ret;
u64 left_ppas = pblk_sec_in_open_line(pblk, line) - lm->smeta_sec; u64 left_ppas = pblk_sec_in_open_line(pblk, line) - lm->smeta_sec;
...@@ -388,7 +388,6 @@ static int pblk_recov_scan_oob(struct pblk *pblk, struct pblk_line *line, ...@@ -388,7 +388,6 @@ static int pblk_recov_scan_oob(struct pblk *pblk, struct pblk_line *line,
rq_ppas = pblk_calc_secs(pblk, left_ppas, 0, false); rq_ppas = pblk_calc_secs(pblk, left_ppas, 0, false);
if (!rq_ppas) if (!rq_ppas)
rq_ppas = pblk->min_write_pgs; rq_ppas = pblk->min_write_pgs;
rq_len = rq_ppas * geo->csecs;
retry_rq: retry_rq:
rqd->bio = NULL; rqd->bio = NULL;
......
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