mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
libnvdimm/btt: fix variable 'rc' set but not used
[ Upstream commit4e24e37d53
] drivers/nvdimm/btt.c: In function 'btt_read_pg': drivers/nvdimm/btt.c:1264:8: warning: variable 'rc' set but not used [-Wunused-but-set-variable] int rc; ^~ Add a ratelimited message in case a storm of errors is encountered. Fixes:d9b83c7569
("libnvdimm, btt: rework error clearing") Signed-off-by: Qian Cai <cai@lca.pw> Reviewed-by: Vishal Verma <vishal.l.verma@intel.com> Link: https://lore.kernel.org/r/1572530719-32161-1-git-send-email-cai@lca.pw Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
87d9d4cdb1
commit
689b2c656f
1 changed files with 4 additions and 4 deletions
|
@ -1261,11 +1261,11 @@ static int btt_read_pg(struct btt *btt, struct bio_integrity_payload *bip,
|
|||
|
||||
ret = btt_data_read(arena, page, off, postmap, cur_len);
|
||||
if (ret) {
|
||||
int rc;
|
||||
|
||||
/* Media error - set the e_flag */
|
||||
rc = btt_map_write(arena, premap, postmap, 0, 1,
|
||||
NVDIMM_IO_ATOMIC);
|
||||
if (btt_map_write(arena, premap, postmap, 0, 1, NVDIMM_IO_ATOMIC))
|
||||
dev_warn_ratelimited(to_dev(arena),
|
||||
"Error persistently tracking bad blocks at %#x\n",
|
||||
premap);
|
||||
goto out_rtt;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue