Re: [PATCH] dmaengine: bestcomm: ata: drop unused inc local

Frank Li <[email protected]>
Newsgroups dev.linux.lists.llvm,org.kernel.vger.dmaengine,org.kernel.vger.linux-kernel
Message-ID <aoMTkukPXAD03CD1@SMW015318>
On Sun, Aug 16, 2026 at 06:57:47PM -0700, Rosen Penev wrote:
> bcom_ata_init() declared and assigned a struct bcom_ata_inc *inc that
> was never read, tripping clang -Wunused-but-set-variable:
>
>   drivers/dma/bestcomm/ata.c:58:23: error: variable 'inc' set but not
>   used [-Werror,-Wunused-but-set-variable]
>      58 |         struct bcom_ata_inc *inc;
>         |                              ^
>
> Drop the declaration and the bcom_task_inc() call that fed it.
>
> Signed-off-by: Rosen Penev <[email protected]>
> ---

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

>  drivers/dma/bestcomm/ata.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/dma/bestcomm/ata.c b/drivers/dma/bestcomm/ata.c
> index 502a45d76adc..40126f3f189e 100644
> --- a/drivers/dma/bestcomm/ata.c
> +++ b/drivers/dma/bestcomm/ata.c
> @@ -55,7 +55,6 @@ bcom_ata_init(int queue_len, int maxbufsize)
>  {
>  	struct bcom_task *tsk;
>  	struct bcom_ata_var *var;
> -	struct bcom_ata_inc *inc;
>
>  	/* Prefetch breaks ATA DMA.  Turn it off for ATA DMA */
>  	bcom_disable_prefetch();
> @@ -69,7 +68,6 @@ bcom_ata_init(int queue_len, int maxbufsize)
>  	bcom_ata_reset_bd(tsk);
>
>  	var = (struct bcom_ata_var *) bcom_task_var(tsk->tasknum);
> -	inc = (struct bcom_ata_inc *) bcom_task_inc(tsk->tasknum);
>
>  	if (bcom_load_image(tsk->tasknum, bcom_ata_task)) {
>  		bcom_task_free(tsk);
> --
> 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.