ftl: fix set-but-not-used error

ftl_dev_dump_bands accumulates a total in a local
variable, but the final value never gets used.
So just remove the variable completely.

Found with clang-13.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7a92f6bfa4ae56fc4d8189c887bf0f6d4a05d759
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10055
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Jim Harris 2021-10-28 21:22:17 +00:00
parent 13e5be0b8d
commit ab19b5de9b

View File

@ -94,7 +94,7 @@ ftl_band_validate_md(struct ftl_band *band)
void
ftl_dev_dump_bands(struct spdk_ftl_dev *dev)
{
size_t i, total = 0;
size_t i;
if (!dev->bands) {
return;
@ -112,7 +112,6 @@ ftl_dev_dump_bands(struct spdk_ftl_dev *dev)
continue;
}
total += dev->bands[i].lba_map.num_vld;
ftl_debug(" Band %3zu: %8zu / %zu \tnum_zones: %zu \twr_cnt: %"PRIu64"\tmerit:"
"%10.3f\tstate: %s\n",
i + 1, dev->bands[i].lba_map.num_vld,