* [PATCH] staging: greybus: remove unused loopback macro
@ 2026-08-12 18:38 André Moreira
0 siblings, 0 replies; only message in thread
From: André Moreira @ 2026-08-12 18:38 UTC (permalink / raw)
To: pure.logic
Cc: johan, elder, gregkh, greybus-dev, linux-staging,
André Moreira
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 <andrem.33333@gmail.com>
---
drivers/staging/greybus/loopback.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
index ea57b1f5d156..2a623fc2e99b 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -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, \
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-12 18:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 18:38 [PATCH] staging: greybus: remove unused loopback macro André Moreira
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox