* [PATCH] nvdimm: do not show pfn_seed for non pmem regions
@ 2015-12-02 6:39 Dmitry V. Krivenok
2015-12-04 2:52 ` Dan Williams
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry V. Krivenok @ 2015-12-02 6:39 UTC (permalink / raw)
To: Dan Williams; +Cc: linux-nvdimm, linux-kernel, Ross Zwisler, Dmitry V. Krivenok
This simple change hides pfn_seed attribute for non pmem
regions because they don't support pfn anyway.
Signed-off-by: Dmitry V. Krivenok <krivenok.dmitry@gmail.com>
---
drivers/nvdimm/region_devs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
index 529f3f0..3d730d1 100644
--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -406,6 +406,9 @@ static umode_t region_visible(struct kobject *kobj, struct attribute *a, int n)
struct nd_interleave_set *nd_set = nd_region->nd_set;
int type = nd_region_to_nstype(nd_region);
+ if (!is_nd_pmem(dev) && a == &dev_attr_pfn_seed.attr)
+ return 0;
+
if (a != &dev_attr_set_cookie.attr
&& a != &dev_attr_available_size.attr)
return a->mode;
--
2.6.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] nvdimm: do not show pfn_seed for non pmem regions
2015-12-02 6:39 [PATCH] nvdimm: do not show pfn_seed for non pmem regions Dmitry V. Krivenok
@ 2015-12-04 2:52 ` Dan Williams
0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2015-12-04 2:52 UTC (permalink / raw)
To: Dmitry V. Krivenok; +Cc: linux-nvdimm@lists.01.org, linux-kernel, Ross Zwisler
On Tue, Dec 1, 2015 at 10:39 PM, Dmitry V. Krivenok
<krivenok.dmitry@gmail.com> wrote:
> This simple change hides pfn_seed attribute for non pmem
> regions because they don't support pfn anyway.
>
> Signed-off-by: Dmitry V. Krivenok <krivenok.dmitry@gmail.com>
> ---
Looks good I'll queue it for 4.5.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-04 2:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-02 6:39 [PATCH] nvdimm: do not show pfn_seed for non pmem regions Dmitry V. Krivenok
2015-12-04 2:52 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®