提交 2c73e5b7 编写于 作者: J Joe Perches 提交者: Yongqiang Liu

drivers core: node: Use a more typical macro definition style for ACCESS_ATTR

mainline inclusion
from mainline-v5.10-rc1
commit 6284a6e8
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: NJoe Perches <joe@perches.com>
Link: https://lore.kernel.org/r/faf51a671160cf884efa68fb458d3e8a44b1a7a7.1600285923.git.joe@perches.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: NWeilong Chen <chenweilong@huawei.com>
Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
上级 6ba98438
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册