staging: greybus: remove unused loopback macro
Subsystems (3)
PATCH 1/1 staging: greybus: remove unused loopback macro
The gb_loopback_attr macro is no longer used in the Greybus loopback driver. Remove the unused macro to avoid keeping dead code in the driver.
Signed-off-by André Moreira <[email protected]>
--- drivers/staging/greybus/loopback.c | 26 -------------------------- 1 file changed, 26 deletions(-)
drivers/staging/greybus/loopback.c +0 -26
@@ -167,32 +167,6 @@ static DEVICE_ATTR_RO(name##_avg)gb_loopback_ro_stats_attr (field, max, u); \ gb_loopback_ro_avg_attr(field) -#define gb_loopback_attr (field, type) \ -static ssize_t field##_show(struct device *dev, \ - struct device_attribute *attr, \ - char *buf) \ -{ \ - struct gb_loopback *gb = dev_get_drvdata(dev); \ - return sysfs_emit(buf, "%" #type "\n", gb->field); \ -} \ -static ssize_t field##_store(struct device *dev, \ - struct device_attribute *attr, \ - const char *buf, \ - size_t len) \ -{ \ - int ret; \ - struct gb_loopback *gb = dev_get_drvdata(dev); \ - mutex_lock(&gb->mutex); \ - ret = sscanf(buf, "%"#type, &gb->field); \ - if (ret != 1) \ - len = -EINVAL; \ - else \ - gb_loopback_check_attr(gb, bundle); \ - mutex_unlock(&gb->mutex); \ - return len; \ -} \ -static DEVICE_ATTR_RW(field) -#define gb_dev_loopback_ro_attr (field) \ static ssize_t field##_show(struct device *dev, \ struct device_attribute *attr, \
Signature · 1 line
2.43.0
Greg KH
maintainerQuoted 8 lines · André Moreira
The
gb_loopback_attrmacro is no longer used in the Greybus loopback driver. Remove the unused macro to avoid keeping dead code in the driver.Signed-off-by André Moreira <[email protected]>--- drivers/staging/greybus/loopback.c | 26 -------------------------- 1 file changed, 26 deletions(-)
Please see the mailing list archives for why this same patch has been rejected in the past.
thanks,
greg k-h