mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: Fix the return value in spi_new_ancillary_device() kernel-doc
@ 2026-09-11 23:02 Karl Mehltretter
  2026-09-12 10:30 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Mehltretter @ 2026-09-11 23:02 UTC (permalink / raw)
  To: Mark Brown; +Cc: Karl Mehltretter, Sebastian Reichel, linux-spi, linux-kernel

spi_new_ancillary_device() returns the new struct spi_device, or an
ERR_PTR() on failure, but its kernel-doc says "0 on success; negative
errno on failure", which was never true. Describe the pointer.

Fixes: 0c79378c0199 ("spi: add ancillary device support")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
 drivers/spi/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 5b5b3bc5f0d8cf8ba60a1785acc695710865edad..172141650b648694d4163d0ba00746ed2948ccfa 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2893,7 +2893,7 @@ static void of_register_spi_devices(struct spi_controller *ctlr) { }
  *
  * This may only be called from main SPI device's probe routine.
  *
- * Return: 0 on success; negative errno on failure
+ * Return: the new device on success; an ERR_PTR() on failure
  */
 struct spi_device *spi_new_ancillary_device(struct spi_device *spi,
 					     u8 chip_select)
-- 
2.39.5 (Apple Git-154)


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

* Re: [PATCH] spi: Fix the return value in spi_new_ancillary_device() kernel-doc
  2026-09-11 23:02 [PATCH] spi: Fix the return value in spi_new_ancillary_device() kernel-doc Karl Mehltretter
@ 2026-09-12 10:30 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-09-12 10:30 UTC (permalink / raw)
  To: Karl Mehltretter; +Cc: Sebastian Reichel, linux-spi, linux-kernel

On Sat, 12 Sep 2026 01:02:11 +0200, Karl Mehltretter wrote:
> spi: Fix the return value in spi_new_ancillary_device() kernel-doc

Applied to

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

Thanks!

[1/1] spi: Fix the return value in spi_new_ancillary_device() kernel-doc
      https://git.kernel.org/broonie/spi/c/3742867ce965

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] 2+ messages in thread

end of thread, other threads:[~2026-09-14  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 23:02 [PATCH] spi: Fix the return value in spi_new_ancillary_device() kernel-doc Karl Mehltretter
2026-09-12 10:30 ` Mark Brown

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®