2020-02-21 03:29:21

by Alastair D'Silva

[permalink] [raw]
Subject: [PATCH v3 26/27] powerpc/powernv/pmem: Expose the firmware version in sysfs

From: Alastair D'Silva <[email protected]>

This information will be used by ndctl in userspace to help users identify
the device.

Signed-off-by: Alastair D'Silva <[email protected]>
---
arch/powerpc/platforms/powernv/pmem/ocxl_sysfs.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/arch/powerpc/platforms/powernv/pmem/ocxl_sysfs.c b/arch/powerpc/platforms/powernv/pmem/ocxl_sysfs.c
index 7829e4bc887d..84b23cc3e8b7 100644
--- a/arch/powerpc/platforms/powernv/pmem/ocxl_sysfs.c
+++ b/arch/powerpc/platforms/powernv/pmem/ocxl_sysfs.c
@@ -16,8 +16,17 @@ static ssize_t serial_show(struct device *device, struct device_attribute *attr,
return scnprintf(buf, PAGE_SIZE, "%llu\n", fn_config->serial);
}

+static ssize_t fw_version_show(struct device *device,
+ struct device_attribute *attr, char *buf)
+{
+ struct ocxlpmem *ocxlpmem = container_of(device, struct ocxlpmem, dev);
+
+ return scnprintf(buf, PAGE_SIZE, "%s\n", ocxlpmem->fw_version);
+}
+
static struct device_attribute attrs[] = {
__ATTR_RO(serial),
+ __ATTR_RO(fw_version),
};

int ocxlpmem_sysfs_add(struct ocxlpmem *ocxlpmem)
--
2.24.1


2020-03-02 07:36:07

by Andrew Donnellan

[permalink] [raw]
Subject: Re: [PATCH v3 26/27] powerpc/powernv/pmem: Expose the firmware version in sysfs

On 21/2/20 2:27 pm, Alastair D'Silva wrote:
> From: Alastair D'Silva <[email protected]>
>
> This information will be used by ndctl in userspace to help users identify
> the device.

You should include the information from the subject line in the body of
the commit message too.

I think this patch could probably be squashed in with the last one.

--
Andrew Donnellan OzLabs, ADL Canberra
[email protected] IBM Australia Limited

2020-03-04 04:12:19

by Alastair D'Silva

[permalink] [raw]
Subject: Re: [PATCH v3 26/27] powerpc/powernv/pmem: Expose the firmware version in sysfs

On Mon, 2020-03-02 at 18:35 +1100, Andrew Donnellan wrote:
> On 21/2/20 2:27 pm, Alastair D'Silva wrote:
> > From: Alastair D'Silva <[email protected]>
> >
> > This information will be used by ndctl in userspace to help users
> > identify
> > the device.
>
> You should include the information from the subject line in the body
> of
> the commit message too.
>
> I think this patch could probably be squashed in with the last one.
>

Ok

--
Alastair D'Silva
Open Source Developer
Linux Technology Centre, IBM Australia
mob: 0423 762 819