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.
Unified · Split
| @@ -598,7 +598,7 @@ static int pktdma_init_chan(struct knav_dma_device *dma, · 597 unmodified lines | |||
| 598 | 598 | ||
| 599 | INIT_LIST_HEAD(&chan->list); | 599 | INIT_LIST_HEAD(&chan->list); |
| 600 | chan->dma = dma; | 600 | chan->dma = dma; |
| 601 | chan->direction = DMA_NONE; | 601 | chan->direction = DMA_TRANS_NONE; |
| 602 | atomic_set(&chan->ref_count, 0); | 602 | atomic_set(&chan->ref_count, 0); |
| 603 | spin_lock_init(&chan->lock); | 603 | spin_lock_init(&chan->lock); |
| 604 | 604 | ||