[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220607164937.33967-1-andriy.shevchenko@linux.intel.com>
Date: Tue, 7 Jun 2022 19:49:37 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Dan Williams <dan.j.williams@...el.com>, nvdimm@...ts.linux.dev,
linux-kernel@...r.kernel.org
Cc: Vishal Verma <vishal.l.verma@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
kernel test robot <lkp@...el.com>
Subject: [PATCH v1 1/1] 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: d1c6e08e7503 ("libnvdimm/labels: Add uuid helpers")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
drivers/nvdimm/namespace_devs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
index 0f863fda56e6..dfade66bab73 100644
--- a/drivers/nvdimm/namespace_devs.c
+++ b/drivers/nvdimm/namespace_devs.c
@@ -1704,8 +1704,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;
--
2.35.1
Powered by blists - more mailing lists