From: Aayush Kumar <code@aayushk.dev>
To: broonie@kernel.org
Cc: william.zhang@broadcom.com, kursad.oney@broadcom.com,
jonas.gorski@gmail.com, bcm-kernel-feedback-list@broadcom.com,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
Aayush Kumar <code@aayushk.dev>
Subject: [PATCH 2/2] spi: bcmbca-hsspi: Use sysfs_emit() instead of sprintf()
Date: Fri, 9 Oct 2026 19:06:31 +0530 [thread overview]
Message-ID: <20261009133631.579644-3-code@aayushk.dev> (raw)
In-Reply-To: <20261009133631.579644-1-code@aayushk.dev>
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
next prev parent reply other threads:[~2026-10-09 13:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-10-12 22:34 ` [PATCH 0/2] spi: use sysfs_emit() in bcm63xx-hsspi and bcmbca-hsspi Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261009133631.579644-3-code@aayushk.dev \
--to=code@aayushk.dev \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=broonie@kernel.org \
--cc=jonas.gorski@gmail.com \
--cc=kursad.oney@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=william.zhang@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.