From 2c73e5b7f01970580d57711e58d3553c11c63f71 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 21 Jun 2022 08:40:19 +0000 Subject: [PATCH] drivers core: node: Use a more typical macro definition style for ACCESS_ATTR mainline inclusion from mainline-v5.10-rc1 commit 6284a6e8940341beb71ea7970388418eb3dd473d category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I5C32F CVE: CVE-2022-20166 --------------------------------------------------- Remove the trailing semicolon from the macro and add it to its uses. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/faf51a671160cf884efa68fb458d3e8a44b1a7a7.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman Reviewed-by: Weilong Chen Reviewed-by: Xiu Jianfeng Signed-off-by: Yongqiang Liu --- drivers/base/node.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index 2e5e38e7bea7..abc517660430 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -164,12 +164,12 @@ static ssize_t name##_show(struct device *dev, \ return sysfs_emit(buf, "%u\n", \ to_access_nodes(dev)->hmem_attrs.name); \ } \ -static DEVICE_ATTR_RO(name); +static DEVICE_ATTR_RO(name) -ACCESS_ATTR(read_bandwidth) -ACCESS_ATTR(read_latency) -ACCESS_ATTR(write_bandwidth) -ACCESS_ATTR(write_latency) +ACCESS_ATTR(read_bandwidth); +ACCESS_ATTR(read_latency); +ACCESS_ATTR(write_bandwidth); +ACCESS_ATTR(write_latency); static struct attribute *access_attrs[] = { &dev_attr_read_bandwidth.attr, -- GitLab