* [PATCH 0/2] spi: use sysfs_emit() in bcm63xx-hsspi and bcmbca-hsspi
@ 2026-10-09 13:36 Aayush Kumar
2026-10-09 13:36 ` [PATCH 1/2] spi: bcm63xx-hsspi: Use sysfs_emit() instead of sprintf() Aayush Kumar
2026-10-09 13:36 ` [PATCH 2/2] spi: bcmbca-hsspi: " Aayush Kumar
0 siblings, 2 replies; 3+ messages in thread
From: Aayush Kumar @ 2026-10-09 13:36 UTC (permalink / raw)
To: broonie
Cc: william.zhang, kursad.oney, jonas.gorski,
bcm-kernel-feedback-list, linux-spi, linux-kernel, Aayush Kumar
Convert the sysfs show() functions to use sysfs_emit() instead of
sprintf().
Aayush Kumar (2):
spi: bcm63xx-hsspi: Use sysfs_emit() instead of sprintf()
spi: bcmbca-hsspi: Use sysfs_emit() instead of sprintf()
drivers/spi/spi-bcm63xx-hsspi.c | 4 ++--
drivers/spi/spi-bcmbca-hsspi.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--
2.56.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] spi: bcm63xx-hsspi: Use sysfs_emit() instead of sprintf()
2026-10-09 13:36 [PATCH 0/2] spi: use sysfs_emit() in bcm63xx-hsspi and bcmbca-hsspi Aayush Kumar
@ 2026-10-09 13:36 ` Aayush Kumar
2026-10-09 13:36 ` [PATCH 2/2] spi: bcmbca-hsspi: " Aayush Kumar
1 sibling, 0 replies; 3+ messages in thread
From: Aayush Kumar @ 2026-10-09 13:36 UTC (permalink / raw)
To: broonie
Cc: william.zhang, kursad.oney, jonas.gorski,
bcm-kernel-feedback-list, linux-spi, linux-kernel, Aayush Kumar
show() should only use sysfs_emit() or sysfs_emit_at() when formatting
the value to be returned to user space.
Signed-off-by: Aayush Kumar <code@aayushk.dev>
---
drivers/spi/spi-bcm63xx-hsspi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c
index 25f169a2a..824e36bed 100644
--- a/drivers/spi/spi-bcm63xx-hsspi.c
+++ b/drivers/spi/spi-bcm63xx-hsspi.c
@@ -152,7 +152,7 @@ static ssize_t wait_mode_show(struct device *dev, struct device_attribute *attr,
struct spi_controller *ctrl = dev_get_drvdata(dev);
struct bcm63xx_hsspi *bs = spi_controller_get_devdata(ctrl);
- return sprintf(buf, "%d\n", bs->wait_mode);
+ return sysfs_emit(buf, "%d\n", bs->wait_mode);
}
static ssize_t wait_mode_store(struct device *dev, struct device_attribute *attr,
@@ -188,7 +188,7 @@ static ssize_t xfer_mode_show(struct device *dev, struct device_attribute *attr,
struct spi_controller *ctrl = dev_get_drvdata(dev);
struct bcm63xx_hsspi *bs = spi_controller_get_devdata(ctrl);
- return sprintf(buf, "%d\n", bs->xfer_mode);
+ return sysfs_emit(buf, "%d\n", bs->xfer_mode);
}
static ssize_t xfer_mode_store(struct device *dev, struct device_attribute *attr,
--
2.56.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] spi: bcmbca-hsspi: Use sysfs_emit() instead of sprintf()
2026-10-09 13:36 [PATCH 0/2] spi: use sysfs_emit() in bcm63xx-hsspi and bcmbca-hsspi Aayush Kumar
2026-10-09 13:36 ` [PATCH 1/2] spi: bcm63xx-hsspi: Use sysfs_emit() instead of sprintf() Aayush Kumar
@ 2026-10-09 13:36 ` Aayush Kumar
1 sibling, 0 replies; 3+ messages in thread
From: Aayush Kumar @ 2026-10-09 13:36 UTC (permalink / raw)
To: broonie
Cc: william.zhang, kursad.oney, jonas.gorski,
bcm-kernel-feedback-list, linux-spi, linux-kernel, Aayush Kumar
show() should only use sysfs_emit() or sysfs_emit_at() when formatting
the value to be returned to user space.
Signed-off-by: Aayush Kumar <code@aayushk.dev>
---
drivers/spi/spi-bcmbca-hsspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-bcmbca-hsspi.c b/drivers/spi/spi-bcmbca-hsspi.c
index 5dc9e0f21..8c0147588 100644
--- a/drivers/spi/spi-bcmbca-hsspi.c
+++ b/drivers/spi/spi-bcmbca-hsspi.c
@@ -129,7 +129,7 @@ static ssize_t wait_mode_show(struct device *dev, struct device_attribute *attr,
struct spi_controller *ctrl = dev_get_drvdata(dev);
struct bcmbca_hsspi *bs = spi_controller_get_devdata(ctrl);
- return sprintf(buf, "%d\n", bs->wait_mode);
+ return sysfs_emit(buf, "%d\n", bs->wait_mode);
}
static ssize_t wait_mode_store(struct device *dev, struct device_attribute *attr,
--
2.56.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-09 13:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09 13:36 [PATCH 0/2] spi: use sysfs_emit() in bcm63xx-hsspi and bcmbca-hsspi Aayush Kumar
2026-10-09 13:36 ` [PATCH 1/2] spi: bcm63xx-hsspi: Use sysfs_emit() instead of sprintf() Aayush Kumar
2026-10-09 13:36 ` [PATCH 2/2] spi: bcmbca-hsspi: " Aayush Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®