All of lore.kernel.org
 help / color / mirror / Atom feed
* [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
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ 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] 4+ 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
  2026-10-12 22:34 ` [PATCH 0/2] spi: use sysfs_emit() in bcm63xx-hsspi and bcmbca-hsspi Mark Brown
  2 siblings, 0 replies; 4+ 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 related	[flat|nested] 4+ 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
  2026-10-12 22:34 ` [PATCH 0/2] spi: use sysfs_emit() in bcm63xx-hsspi and bcmbca-hsspi Mark Brown
  2 siblings, 0 replies; 4+ 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 related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] spi: use sysfs_emit() in bcm63xx-hsspi and bcmbca-hsspi
  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
@ 2026-10-12 22:34 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2026-10-12 22:34 UTC (permalink / raw)
  To: Aayush Kumar
  Cc: william.zhang, kursad.oney, jonas.gorski,
	bcm-kernel-feedback-list, linux-spi, linux-kernel

On Fri, 09 Oct 2026 19:06:29 +0530, Aayush Kumar wrote:
> spi: use sysfs_emit() in bcm63xx-hsspi and bcmbca-hsspi
> 
> 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()
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4

Thanks!

[1/2] spi: bcm63xx-hsspi: Use sysfs_emit() instead of sprintf()
      https://git.kernel.org/broonie/misc/c/516d487c6037
[2/2] spi: bcmbca-hsspi: Use sysfs_emit() instead of sprintf()
      https://git.kernel.org/broonie/misc/c/2bc876264259

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-13 13:01 UTC | newest]

Thread overview: 4+ 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
2026-10-12 22:34 ` [PATCH 0/2] spi: use sysfs_emit() in bcm63xx-hsspi and bcmbca-hsspi Mark Brown

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.