nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] libnvdimm, namespace: Drop the repeat assignment for variable dev->parent
@ 2018-10-02  3:35 GuangZhe Fu
  2018-10-02  3:40 ` Dan Williams
  0 siblings, 1 reply; 2+ messages in thread
From: GuangZhe Fu @ 2018-10-02  3:35 UTC (permalink / raw)
  To: linux-nvdimm, linux-kernel; +Cc: fugz2012, GuangZhe Fu

From: GuangZhe Fu <fugz1@lenovo.com>

The variable dev-parent is assigned twice with the same &nd_region->dev. I think we could drop the second one.

Signed-off-by: GuangZhe Fu <fugz1@lenovo.com>
---
 drivers/nvdimm/namespace_devs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
index cb322f2..db0abf1 100644
--- a/drivers/nvdimm/namespace_devs.c
+++ b/drivers/nvdimm/namespace_devs.c
@@ -2099,7 +2099,6 @@ static struct device *nd_namespace_pmem_create(struct nd_region *nd_region)
 		return NULL;
 	}
 	dev_set_name(dev, "namespace%d.%d", nd_region->id, nspm->id);
-	dev->parent = &nd_region->dev;
 	dev->groups = nd_namespace_attribute_groups;
 	nd_namespace_pmem_set_resource(nd_region, nspm, 0);
 
-- 
2.9.5


_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* Re: [PATCH] libnvdimm, namespace: Drop the repeat assignment for variable dev->parent
  2018-10-02  3:35 [PATCH] libnvdimm, namespace: Drop the repeat assignment for variable dev->parent GuangZhe Fu
@ 2018-10-02  3:40 ` Dan Williams
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2018-10-02  3:40 UTC (permalink / raw)
  To: fugz2012; +Cc: linux-nvdimm, Linux Kernel Mailing List, Guangzhe GZ1 Fu

On Mon, Oct 1, 2018 at 8:36 PM GuangZhe Fu <fugz2012@zoho.com> wrote:
>
> From: GuangZhe Fu <fugz1@lenovo.com>
>
> The variable dev-parent is assigned twice with the same &nd_region->dev. I think we could drop the second one.
>
> Signed-off-by: GuangZhe Fu <fugz1@lenovo.com>

Looks good, applied.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

end of thread, other threads:[~2018-10-02  3:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02  3:35 [PATCH] libnvdimm, namespace: Drop the repeat assignment for variable dev->parent GuangZhe Fu
2018-10-02  3:40 ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).