RE: [PATCH v3 25/27] powerpc/powernv/pmem: Expose the serial number in sysfs

2020-03-01 Thread Alastair D'Silva
On Mon, 2020-03-02 at 10:42 +1100, Alastair D'Silva wrote: > On Fri, 2020-02-28 at 08:15 +0100, Greg Kroah-Hartman wrote: > > On Fri, Feb 28, 2020 at 05:25:31PM +1100, Andrew Donnellan wrote: > > > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > > > +int ocxlpmem_sysfs_add(struct ocxlpmem

RE: [PATCH v3 25/27] powerpc/powernv/pmem: Expose the serial number in sysfs

2020-03-01 Thread Alastair D'Silva
On Fri, 2020-02-28 at 08:15 +0100, Greg Kroah-Hartman wrote: > On Fri, Feb 28, 2020 at 05:25:31PM +1100, Andrew Donnellan wrote: > > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > > +int ocxlpmem_sysfs_add(struct ocxlpmem *ocxlpmem) > > > +{ > > > + int i, rc; > > > + > > > + for (i = 0; i <

Re: [PATCH v3 25/27] powerpc/powernv/pmem: Expose the serial number in sysfs

2020-02-27 Thread Greg Kroah-Hartman
On Fri, Feb 28, 2020 at 05:25:31PM +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > +int ocxlpmem_sysfs_add(struct ocxlpmem *ocxlpmem) > > +{ > > + int i, rc; > > + > > + for (i = 0; i < ARRAY_SIZE(attrs); i++) { > > + rc = device_create_file(>dev,

Re: [PATCH v3 25/27] powerpc/powernv/pmem: Expose the serial number in sysfs

2020-02-27 Thread Andrew Donnellan
On 21/2/20 2:27 pm, Alastair D'Silva wrote: +int ocxlpmem_sysfs_add(struct ocxlpmem *ocxlpmem) +{ + int i, rc; + + for (i = 0; i < ARRAY_SIZE(attrs); i++) { + rc = device_create_file(>dev, [i]); + if (rc) { + for (; --i >= 0;) +

[PATCH v3 25/27] powerpc/powernv/pmem: Expose the serial number in sysfs

2020-02-20 Thread Alastair D'Silva
From: Alastair D'Silva This information will be used by ndctl in userspace to help users identify the device. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pmem/Makefile | 2 +- arch/powerpc/platforms/powernv/pmem/ocxl.c| 5 +++