All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
To: Santosh Shilimkar <ssantosh@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] soc: ti: knav_dma: Use proper enum in pktdma_init_chan
Date: Sat, 26 Jan 2019 12:11:15 -0700	[thread overview]
Message-ID: <20190126191115.GA25003@archlinux-ryzen> (raw)
In-Reply-To: <20181211004114.28029-1-natechancellor@gmail.com>

On Mon, Dec 10, 2018 at 05:41:14PM -0700, Nathan Chancellor wrote:
> Clang warns when one enumerated type is implicitly converted to another:
> 
> drivers/soc/ti/knav_dma.c:601:20: warning: implicit conversion from
> enumeration type 'enum dma_data_direction' to different enumeration type
> 'enum dma_transfer_direction' [-Wenum-conversion]
>         chan->direction = DMA_NONE;
>                         ~ ^~~~~~~~
> 1 warning generated.
> 
> While DMA_NONE and DMA_TRANS_NONE have different values, there is no
> functional change because direction is never checked against DMA_NONE,
> only against DMA_MEM_TO_DEV and DMA_DEV_TO_MEM.
> 
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>  drivers/soc/ti/knav_dma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c
> index e05ab16d9a9e..6285cd8efb21 100644
> --- a/drivers/soc/ti/knav_dma.c
> +++ b/drivers/soc/ti/knav_dma.c
> @@ -598,7 +598,7 @@ static int pktdma_init_chan(struct knav_dma_device *dma,
>  
>  	INIT_LIST_HEAD(&chan->list);
>  	chan->dma	= dma;
> -	chan->direction	= DMA_NONE;
> +	chan->direction	= DMA_TRANS_NONE;
>  	atomic_set(&chan->ref_count, 0);
>  	spin_lock_init(&chan->lock);
>  
> -- 
> 2.20.0
> 

Ping?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <natechancellor@gmail.com>
To: Santosh Shilimkar <ssantosh@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] soc: ti: knav_dma: Use proper enum in pktdma_init_chan
Date: Sat, 26 Jan 2019 12:11:15 -0700	[thread overview]
Message-ID: <20190126191115.GA25003@archlinux-ryzen> (raw)
In-Reply-To: <20181211004114.28029-1-natechancellor@gmail.com>

On Mon, Dec 10, 2018 at 05:41:14PM -0700, Nathan Chancellor wrote:
> Clang warns when one enumerated type is implicitly converted to another:
> 
> drivers/soc/ti/knav_dma.c:601:20: warning: implicit conversion from
> enumeration type 'enum dma_data_direction' to different enumeration type
> 'enum dma_transfer_direction' [-Wenum-conversion]
>         chan->direction = DMA_NONE;
>                         ~ ^~~~~~~~
> 1 warning generated.
> 
> While DMA_NONE and DMA_TRANS_NONE have different values, there is no
> functional change because direction is never checked against DMA_NONE,
> only against DMA_MEM_TO_DEV and DMA_DEV_TO_MEM.
> 
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>  drivers/soc/ti/knav_dma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c
> index e05ab16d9a9e..6285cd8efb21 100644
> --- a/drivers/soc/ti/knav_dma.c
> +++ b/drivers/soc/ti/knav_dma.c
> @@ -598,7 +598,7 @@ static int pktdma_init_chan(struct knav_dma_device *dma,
>  
>  	INIT_LIST_HEAD(&chan->list);
>  	chan->dma	= dma;
> -	chan->direction	= DMA_NONE;
> +	chan->direction	= DMA_TRANS_NONE;
>  	atomic_set(&chan->ref_count, 0);
>  	spin_lock_init(&chan->lock);
>  
> -- 
> 2.20.0
> 

Ping?

  reply	other threads:[~2019-01-26 19:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11  0:41 [PATCH] soc: ti: knav_dma: Use proper enum in pktdma_init_chan Nathan Chancellor
2018-12-11  0:41 ` Nathan Chancellor
2019-01-26 19:11 ` Nathan Chancellor [this message]
2019-01-26 19:11   ` Nathan Chancellor
2019-01-29 18:35   ` Santosh Shilimkar
2019-01-29 18:35     ` Santosh Shilimkar

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=20190126191115.GA25003@archlinux-ryzen \
    --to=natechancellor@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ssantosh@kernel.org \
    /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 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.