Commit d34213eb authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Dan Williams

nvdimm/namespace: drop nested variable in create_namespace_pmem()

Kernel build bot reported:

  namespace_devs.c:1991:10: warning: Local variable 'uuid' shadows outer variable [shadowVariable]

Refactor create_namespace_pmem() by dropping a nested version of
the same variable.

Fixes: d1c6e08e ("libnvdimm/labels: Add uuid helpers")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220607164937.33967-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 69053101
......@@ -1712,8 +1712,6 @@ static struct device *create_namespace_pmem(struct nd_region *nd_region,
res->flags = IORESOURCE_MEM;
for (i = 0; i < nd_region->ndr_mappings; i++) {
uuid_t uuid;
nsl_get_uuid(ndd, nd_label, &uuid);
if (has_uuid_at_pos(nd_region, &uuid, cookie, i))
continue;
......
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