All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] nvdimm/namespace: drop nested variable in create_namespace_pmem()
@ 2022-06-07 16:49 Andy Shevchenko
  2022-06-21 11:57 ` Andy Shevchenko
  2022-07-14 20:49 ` Dan Williams
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-06-07 16:49 UTC (permalink / raw)
  To: Dan Williams, nvdimm, linux-kernel
  Cc: Vishal Verma, Dave Jiang, Ira Weiny, Andy Shevchenko, kernel test robot

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@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] nvdimm/namespace: drop nested variable in create_namespace_pmem()
  2022-06-07 16:49 [PATCH v1 1/1] nvdimm/namespace: drop nested variable in create_namespace_pmem() Andy Shevchenko
@ 2022-06-21 11:57 ` Andy Shevchenko
  2022-07-14 20:49 ` Dan Williams
  1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-06-21 11:57 UTC (permalink / raw)
  To: Dan Williams, nvdimm, linux-kernel
  Cc: Vishal Verma, Dave Jiang, Ira Weiny, kernel test robot

On Tue, Jun 07, 2022 at 07:49:37PM +0300, Andy Shevchenko wrote:
> 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.

Any comments on this and other two patches?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH v1 1/1] nvdimm/namespace: drop nested variable in create_namespace_pmem()
  2022-06-07 16:49 [PATCH v1 1/1] nvdimm/namespace: drop nested variable in create_namespace_pmem() Andy Shevchenko
  2022-06-21 11:57 ` Andy Shevchenko
@ 2022-07-14 20:49 ` Dan Williams
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Williams @ 2022-07-14 20:49 UTC (permalink / raw)
  To: Andy Shevchenko, Dan Williams, nvdimm, linux-kernel
  Cc: Vishal Verma, Dave Jiang, Ira Weiny, Andy Shevchenko, kernel test robot

Andy Shevchenko wrote:
> 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.

Applied for 5.19-rc.

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-14 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 16:49 [PATCH v1 1/1] nvdimm/namespace: drop nested variable in create_namespace_pmem() Andy Shevchenko
2022-06-21 11:57 ` Andy Shevchenko
2022-07-14 20:49 ` Dan Williams

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.