Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bonding: helper macro __ATTR_RO to make code more clear

Signed-off-by: Lianjie Zhang <zhanglianjie@uniontech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Lianjie Zhang and committed by
David S. Miller
669b258a 83b7b77a

+1 -7
+1 -7
drivers/net/bonding/bond_sysfs_slave.c
··· 15 15 ssize_t (*show)(struct slave *, char *); 16 16 }; 17 17 18 - #define SLAVE_ATTR(_name, _mode, _show) \ 19 - const struct slave_attribute slave_attr_##_name = { \ 20 - .attr = {.name = __stringify(_name), \ 21 - .mode = _mode }, \ 22 - .show = _show, \ 23 - }; 24 18 #define SLAVE_ATTR_RO(_name) \ 25 - SLAVE_ATTR(_name, 0444, _name##_show) 19 + const struct slave_attribute slave_attr_##_name = __ATTR_RO(_name) 26 20 27 21 static ssize_t state_show(struct slave *slave, char *buf) 28 22 {