From: Ira Weiny <ira.weiny@intel.com> To: Shuai He <hexiaoshuaishuai@gmail.com> Cc: linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers/dax/bus: Use kobj_to_dev() API Date: Sun, 31 May 2020 22:45:15 -0700 [thread overview] Message-ID: <20200601054515.GB1505637@iweiny-DESK2.sc.intel.com> (raw) In-Reply-To: <1590723777-8718-1-git-send-email-hexiaoshuaishuai@gmail.com> On Fri, May 29, 2020 at 11:42:57AM +0800, Shuai He wrote: > Use kobj_to_dev() API instead of container_of(). > > Signed-off-by: Shuai He <hexiaoshuaishuai@gmail.com> Seems reasonable: Reviewed-by: Ira Weiny <ira.weiny@intel.com> > --- > drivers/dax/bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c > index df238c8..24625d2 100644 > --- a/drivers/dax/bus.c > +++ b/drivers/dax/bus.c > @@ -331,7 +331,7 @@ static DEVICE_ATTR_RO(numa_node); > > static umode_t dev_dax_visible(struct kobject *kobj, struct attribute *a, int n) > { > - struct device *dev = container_of(kobj, struct device, kobj); > + struct device *dev = kobj_to_dev(kobj); > struct dev_dax *dev_dax = to_dev_dax(dev); > > if (a == &dev_attr_target_node.attr && dev_dax_target_node(dev_dax) < 0) > -- > 2.7.4 > _______________________________________________ > Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org > To unsubscribe send an email to linux-nvdimm-leave@lists.01.org _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: Ira Weiny <ira.weiny@intel.com> To: Shuai He <hexiaoshuaishuai@gmail.com> Cc: dan.j.williams@intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers/dax/bus: Use kobj_to_dev() API Date: Sun, 31 May 2020 22:45:15 -0700 [thread overview] Message-ID: <20200601054515.GB1505637@iweiny-DESK2.sc.intel.com> (raw) In-Reply-To: <1590723777-8718-1-git-send-email-hexiaoshuaishuai@gmail.com> On Fri, May 29, 2020 at 11:42:57AM +0800, Shuai He wrote: > Use kobj_to_dev() API instead of container_of(). > > Signed-off-by: Shuai He <hexiaoshuaishuai@gmail.com> Seems reasonable: Reviewed-by: Ira Weiny <ira.weiny@intel.com> > --- > drivers/dax/bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c > index df238c8..24625d2 100644 > --- a/drivers/dax/bus.c > +++ b/drivers/dax/bus.c > @@ -331,7 +331,7 @@ static DEVICE_ATTR_RO(numa_node); > > static umode_t dev_dax_visible(struct kobject *kobj, struct attribute *a, int n) > { > - struct device *dev = container_of(kobj, struct device, kobj); > + struct device *dev = kobj_to_dev(kobj); > struct dev_dax *dev_dax = to_dev_dax(dev); > > if (a == &dev_attr_target_node.attr && dev_dax_target_node(dev_dax) < 0) > -- > 2.7.4 > _______________________________________________ > Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org > To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next prev parent reply other threads:[~2020-06-01 5:45 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-29 3:42 [PATCH] drivers/dax/bus: Use kobj_to_dev() API Shuai He 2020-05-29 3:42 ` Shuai He 2020-06-01 5:45 ` Ira Weiny [this message] 2020-06-01 5:45 ` Ira Weiny 2020-06-02 21:12 ` Pankaj Gupta 2020-06-02 21:12 ` Pankaj Gupta
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200601054515.GB1505637@iweiny-DESK2.sc.intel.com \ --to=ira.weiny@intel.com \ --cc=hexiaoshuaishuai@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-nvdimm@lists.01.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.