From: Tzu-Hao Wei <twei@axiado.com>
To: Babanpreet Singh <bbnpreetsingh@gmail.com>,
Mark Brown <broonie@kernel.org>
Cc: Vladimir Moravcevic <vmoravcevic@axiado.com>,
Swark Yang <syang@axiado.com>,
Prasad Bolisetty <pbolisetty@axiado.com>,
Karthikeyan Mitran <kmitran@axiado.com>,
kernel test robot <lkp@intel.com>,
Julia Lawall <julia.lawall@inria.fr>,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] spi: axiado: fix kernel-doc comments
Date: Fri, 17 Jul 2026 09:25:31 +0800 [thread overview]
Message-ID: <5c2e0f14-e53f-4353-b3b5-526fe9c1e2a3@axiado.com> (raw)
In-Reply-To: <20260713060807.7-3-bbnpreetsingh@gmail.com>
On 7/13/2026 2:08 PM, Babanpreet Singh wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
> Running kernel-doc -Wall on the driver reports 7 warnings, all present
> since the driver was added in commit e75a6b00ad79 ("spi: axiado: Add
> driver for Axiado SPI DB controller"). Two are in spi-axiado.c and
> also show up in W=1 builds of drivers/spi:
>
> Warning: drivers/spi/spi-axiado.c:226 expecting prototype for
> ax_spi_get_rx_byte(). Prototype was for ax_spi_get_rx_byte_for_irq()
> instead
> Warning: drivers/spi/spi-axiado.c:248 This comment starts with
> '/**', but isn't a kernel-doc comment. Refer to
> Documentation/doc-guide/kernel-doc.rst
>
> The other five are for struct ax_spi in spi-axiado.h, seen when
> kernel-doc is invoked on the header directly (headers are not scanned
> by the build-time kernel-doc checks):
>
> Warning: drivers/spi/spi-axiado.h:130 Excess struct member 'rxbuf'
> description in 'ax_spi'
> Warning: drivers/spi/spi-axiado.h:130 Excess struct member 'txbuf'
> description in 'ax_spi'
> Warning: drivers/spi/spi-axiado.h:130 struct member 'clk_rate' not
> described in 'ax_spi'
> Warning: drivers/spi/spi-axiado.h:130 struct member 'rx_buf' not
> described in 'ax_spi'
> Warning: drivers/spi/spi-axiado.h:130 struct member 'tx_buf' not
> described in 'ax_spi'
>
> Fix the three underlying defects:
>
> - The comment on ax_spi_get_rx_byte_for_irq() carries the name of
> ax_spi_get_rx_byte(), from which it was evidently copied when the
> IRQ variant was split out; fix the function name.
>
> - The comment on ax_spi_process_rx_and_finalize() is opened with the
> kernel-doc /** marker but has no identifier line; turn it into
> proper kernel-doc (identifier line, @ctlr, Return:) since it
> already describes the behavior and the return value.
>
> - The struct ax_spi comment documents @txbuf and @rxbuf while the
> members are named tx_buf and rx_buf, and does not document
> clk_rate; fix the member names and describe clk_rate.
>
> No functional change.
>
> Assisted-by: Claude:claude-fable-5 [kernel-doc]
> Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com>
> ---
> drivers/spi/spi-axiado.c | 8 ++++++--
> drivers/spi/spi-axiado.h | 5 +++--
> 2 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/spi/spi-axiado.c b/drivers/spi/spi-axiado.c
> index c4bc7a50d6c9..25561aa9f76f 100644
> --- a/drivers/spi/spi-axiado.c
> +++ b/drivers/spi/spi-axiado.c
> @@ -213,7 +213,7 @@ static void ax_spi_fill_tx_fifo(struct ax_spi *xspi)
> }
>
> /**
> - * ax_spi_get_rx_byte - Gets a byte from the RX FIFO buffer
> + * ax_spi_get_rx_byte_for_irq - Gets a byte from the RX FIFO buffer
> * @xspi: Controller private data (struct ax_spi *)
> *
> * This function handles the logic of extracting bytes from the 32-bit RX FIFO.
> @@ -246,9 +246,13 @@ static u8 ax_spi_get_rx_byte_for_irq(struct ax_spi *xspi)
> }
>
> /**
> + * ax_spi_process_rx_and_finalize - Process RX bytes and check for completion
> + * @ctlr: Pointer to spi_controller structure
> + *
> * Helper function to process received bytes and check for transfer completion.
> * This avoids code duplication and centralizes the completion logic.
> - * Returns true if the transfer was finalized.
> + *
> + * Return: true if the transfer was finalized.
> */
> static bool ax_spi_process_rx_and_finalize(struct spi_controller *ctlr)
> {
> diff --git a/drivers/spi/spi-axiado.h b/drivers/spi/spi-axiado.h
> index 6cf0e5bf5879..d24d31c3a446 100644
> --- a/drivers/spi/spi-axiado.h
> +++ b/drivers/spi/spi-axiado.h
> @@ -98,9 +98,10 @@
> * @regs: Virtual address of the SPI controller registers
> * @ref_clk: Pointer to the peripheral clock
> * @pclk: Pointer to the APB clock
> + * @clk_rate: Reference clock rate in Hz
> * @speed_hz: Current SPI bus clock speed in Hz
> - * @txbuf: Pointer to the TX buffer
> - * @rxbuf: Pointer to the RX buffer
> + * @tx_buf: Pointer to the TX buffer
> + * @rx_buf: Pointer to the RX buffer
> * @tx_bytes: Number of bytes left to transfer
> * @rx_bytes: Number of bytes requested
> * @tx_fifo_depth: Depth of the TX FIFO
> --
> 2.43.0
>
Thanks!
Acked-By: Tzu-Hao Wei <twei@axiado.com>
prev parent reply other threads:[~2026-07-17 1:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 6:08 [PATCH 0/2] spi: axiado: cond_no_effect and kernel-doc fixes Babanpreet Singh
2026-07-13 6:08 ` [PATCH 1/2] spi: axiado: merge identical if/else branches in ax_transfer_one() Babanpreet Singh
2026-07-16 15:22 ` Swark Yang
2026-07-17 1:21 ` Tzu-Hao Wei
2026-07-13 6:08 ` [PATCH 2/2] spi: axiado: fix kernel-doc comments Babanpreet Singh
2026-07-17 1:25 ` Tzu-Hao Wei [this message]
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=5c2e0f14-e53f-4353-b3b5-526fe9c1e2a3@axiado.com \
--to=twei@axiado.com \
--cc=bbnpreetsingh@gmail.com \
--cc=broonie@kernel.org \
--cc=julia.lawall@inria.fr \
--cc=kmitran@axiado.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lkp@intel.com \
--cc=pbolisetty@axiado.com \
--cc=syang@axiado.com \
--cc=vmoravcevic@axiado.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome