]> Git Repo - linux.git/commitdiff
nvdimm/namespace: drop nested variable in create_namespace_pmem()
authorAndy Shevchenko <[email protected]>
Tue, 7 Jun 2022 16:49:37 +0000 (19:49 +0300)
committerDan Williams <[email protected]>
Thu, 14 Jul 2022 20:48:49 +0000 (13:48 -0700)
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: d1c6e08e7503 ("libnvdimm/labels: Add uuid helpers")
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dan Williams <[email protected]>
drivers/nvdimm/namespace_devs.c

index bf4f5c09d9b1b3685eb359b64733335d729061fc..bbe5099c836d72a510247bf1263df160384ee41f 100644 (file)
@@ -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;
This page took 0.056552 seconds and 4 git commands to generate.