lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 05 May 2023 14:28:55 -0700
From:   Dave Jiang <dave.jiang@...el.com>
To:     linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org
Cc:     Dan Williams <dan.j.williams@...el.com>,
        Dan Williams <dan.j.williams@...el.com>, rafael@...nel.org,
        dan.j.williams@...el.com
Subject: [PATCH] base/node: Use 'property' to identify an access parameter

Usage of 'attr' and 'name' in the context of a sysfs attribute
definition are confusing because those read as being related to:

	struct attribute .name

Rename 'name' to 'property' in preparation for renaming 'struct
node_hmem_attr' to a more generic name that can be used in more contexts
('struct access_coordinate'), and not be confused with 'struct
attribute'.

Suggested-by: Dan Williams <dan.j.williams@...el.com>
Reviewed-by: Dan Williams <dan.j.williams@...el.com>
Signed-off-by: Dave Jiang <dave.jiang@...el.com>
---
 drivers/base/node.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/base/node.c b/drivers/base/node.c
index b46db17124f3..2cada01c70da 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -162,15 +162,15 @@ static struct node_access_nodes *node_init_node_access(struct node *node,
 }
 
 #ifdef CONFIG_HMEM_REPORTING
-#define ACCESS_ATTR(name)						\
-static ssize_t name##_show(struct device *dev,				\
+#define ACCESS_ATTR(property)						\
+static ssize_t property##_show(struct device *dev,			\
 			   struct device_attribute *attr,		\
 			   char *buf)					\
 {									\
 	return sysfs_emit(buf, "%u\n",					\
-			  to_access_nodes(dev)->hmem_attrs.name);	\
+			  to_access_nodes(dev)->hmem_attrs.property);	\
 }									\
-static DEVICE_ATTR_RO(name)
+static DEVICE_ATTR_RO(property)
 
 ACCESS_ATTR(read_bandwidth);
 ACCESS_ATTR(read_latency);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ