* [PATCH] soc: aspeed: uart-routing: Use __sysfs_match_string
@ 2023-08-10 12:29 Joel Stanley
2023-08-12 10:20 ` patchwork-bot+linux-soc
0 siblings, 1 reply; 2+ messages in thread
From: Joel Stanley @ 2023-08-10 12:29 UTC (permalink / raw)
To: soc; +Cc: Zev Weiss
From: Zev Weiss <zev@bewilderbeest.net>
The existing use of match_string() caused it to reject 'echo foo' due
to the implicitly appended newline, which was somewhat ergonomically
awkward and inconsistent with typical sysfs behavior. Using the
__sysfs_* variant instead provides more convenient and consistent
linefeed-agnostic behavior.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Fixes: c6807970c3bc ("soc: aspeed: Add UART routing support")
Reviewed-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20230628083735.19946-2-zev@bewilderbeest.net
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
Soc maintainers, can we please get this one applied as a fix for 6.5?
drivers/soc/aspeed/aspeed-uart-routing.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/aspeed/aspeed-uart-routing.c b/drivers/soc/aspeed/aspeed-uart-routing.c
index ef8b24fd1851..59123e1f27ac 100644
--- a/drivers/soc/aspeed/aspeed-uart-routing.c
+++ b/drivers/soc/aspeed/aspeed-uart-routing.c
@@ -524,7 +524,7 @@ static ssize_t aspeed_uart_routing_store(struct device *dev,
struct aspeed_uart_routing_selector *sel = to_routing_selector(attr);
int val;
- val = match_string(sel->options, -1, buf);
+ val = __sysfs_match_string(sel->options, -1, buf);
if (val < 0) {
dev_err(dev, "invalid value \"%s\"\n", buf);
return -EINVAL;
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-12 10:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 12:29 [PATCH] soc: aspeed: uart-routing: Use __sysfs_match_string Joel Stanley
2023-08-12 10:20 ` patchwork-bot+linux-soc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox