Re: [PATCH] ufs: core: print capabilities in controller's sysfs node

From: Bart Van Assche
Date: Thu Jul 28 2022 - 09:37:54 EST


On 7/27/22 21:49, Daniil Lunev wrote:
+static ssize_t caps_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
+{
+ struct ufs_hba *hba = dev_get_drvdata(dev);
+
+ return sysfs_emit(buf, "0x%08llx\n", hba->caps);
+}

This code change includes all of the UFSHCD_CAP_* constants in the kernel ABI. Is that really what we want? I'm wondering whether it perhaps would be better only to export those capabilities to user space that user space needs to know about.

Thanks,

Bart.