Re: [PATCH] dmaengine: bestcomm: gen_bd: split struct bcom_psc_params from array definition

Frank Li <[email protected]>
Newsgroups org.kernel.vger.dmaengine,org.kernel.vger.linux-kernel
Message-ID <aoM2W6jtsdbjzRNt@SMW015318>
On Sun, Aug 16, 2026 at 06:59:03PM -0700, Rosen Penev wrote:
> The combined struct-definition-with-initializer pattern confuses the
> kernel-doc parser. Split into separate struct definition and array
> declaration.
>
> Also now that it's fixed, it warns on missing members. Add those as
> well.
>
> Since this is just a lookup table and not modified, make it const so
> that it can be moved to read only memory.
>
> Assisted-by: Opencode:Big-pickle
> Signed-off-by: Rosen Penev <[email protected]>
> ---

Reviewed-by: Frank Li <[email protected]>

>  drivers/dma/bestcomm/gen_bd.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/dma/bestcomm/gen_bd.c b/drivers/dma/bestcomm/gen_bd.c
> index 75d1a6f543df..00dfdc4b8eba 100644
> --- a/drivers/dma/bestcomm/gen_bd.c
> +++ b/drivers/dma/bestcomm/gen_bd.c
> @@ -254,17 +254,23 @@ EXPORT_SYMBOL_GPL(bcom_gen_bd_tx_release);
>   */
>
>  /**
> - * bcom_psc_parameters - Bestcomm initialization value table for PSC devices
> + * struct bcom_psc_params - Bestcomm initialization value table for PSC devices
> + * @rx_initiator: RX initiator ID
> + * @rx_ipr: RX interrupt priority register value
> + * @tx_initiator: TX initiator ID
> + * @tx_ipr: TX interrupt priority register value
>   *
>   * This structure is only used internally.  It is a lookup table for PSC
>   * specific parameters to bestcomm tasks.
>   */
> -static struct bcom_psc_params {
> +struct bcom_psc_params {
>  	int rx_initiator;
>  	int rx_ipr;
>  	int tx_initiator;
>  	int tx_ipr;
> -} bcom_psc_params[] = {
> +};
> +
> +static const struct bcom_psc_params bcom_psc_params[] = {
>  	[0] = {
>  		.rx_initiator = BCOM_INITIATOR_PSC1_RX,
>  		.rx_ipr = BCOM_IPR_PSC1_RX,
> --
> 2.55.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.