* [PATCH] soc: ti: knav_dma: Use proper enum in pktdma_init_chan
@ 2018-12-11 0:41 Nathan Chancellor
2019-01-26 19:11 ` Nathan Chancellor
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2018-12-11 0:41 UTC (permalink / raw)
To: Santosh Shilimkar; +Cc: linux-kernel, linux-arm-kernel, Nathan Chancellor
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: ti: knav_dma: Use proper enum in pktdma_init_chan
2018-12-11 0:41 [PATCH] soc: ti: knav_dma: Use proper enum in pktdma_init_chan Nathan Chancellor
@ 2019-01-26 19:11 ` Nathan Chancellor
2019-01-29 18:35 ` Santosh Shilimkar
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2019-01-26 19:11 UTC (permalink / raw)
To: Santosh Shilimkar; +Cc: linux-kernel, linux-arm-kernel
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: ti: knav_dma: Use proper enum in pktdma_init_chan
2019-01-26 19:11 ` Nathan Chancellor
@ 2019-01-29 18:35 ` Santosh Shilimkar
0 siblings, 0 replies; 3+ messages in thread
From: Santosh Shilimkar @ 2019-01-29 18:35 UTC (permalink / raw)
To: Nathan Chancellor, Santosh Shilimkar; +Cc: linux-kernel, linux-arm-kernel
On 1/26/2019 11:11 AM, Nathan Chancellor wrote:
> 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?
>I have marked this to picked up. Thanks !!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-29 18:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 0:41 [PATCH] soc: ti: knav_dma: Use proper enum in pktdma_init_chan Nathan Chancellor
2019-01-26 19:11 ` Nathan Chancellor
2019-01-29 18:35 ` Santosh Shilimkar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).