Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1281488 > unrolled thread
| Started by | "Dmitry V. Krivenok" <krivenok.dmitry@gmail.com> |
|---|---|
| First post | 2015-12-02 07:50 +0100 |
| Last post | 2015-12-04 04:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] nvdimm: do not show pfn_seed for non pmem regions "Dmitry V. Krivenok" <krivenok.dmitry@gmail.com> - 2015-12-02 07:50 +0100
Re: [PATCH] nvdimm: do not show pfn_seed for non pmem regions Dan Williams <dan.j.williams@intel.com> - 2015-12-04 04:00 +0100
| From | "Dmitry V. Krivenok" <krivenok.dmitry@gmail.com> |
|---|---|
| Date | 2015-12-02 07:50 +0100 |
| Subject | [PATCH] nvdimm: do not show pfn_seed for non pmem regions |
| Message-ID | <qB9oJ-3AK-7@gated-at.bofh.it> |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Dan Williams <dan.j.williams@intel.com> |
|---|---|
| Date | 2015-12-04 04:00 +0100 |
| Message-ID | <qBOLg-5es-9@gated-at.bofh.it> |
| In reply to | #1281488 |
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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web