• Nathan Chancellor's avatar
    spi: pic32: Use proper enum in dmaengine_prep_slave_rg · 8cfde784
    Nathan Chancellor authored
    Clang warns when one enumerated type is converted implicitly to another:
    
    drivers/spi/spi-pic32.c:323:8: warning: implicit conversion from
    enumeration type 'enum dma_data_direction' to different enumeration type
    'enum dma_transfer_direction' [-Wenum-conversion]
                                              DMA_FROM_DEVICE,
                                              ^~~~~~~~~~~~~~~
    drivers/spi/spi-pic32.c:333:8: warning: implicit conversion from
    enumeration type 'enum dma_data_direction' to different enumeration type
    'enum dma_transfer_direction' [-Wenum-conversion]
                                              DMA_TO_DEVICE,
                                              ^~~~~~~~~~~~~
    2 warnings generated.
    
    Use the proper enums from dma_transfer_direction (DMA_FROM_DEVICE =
    DMA_DEV_TO_MEM = 2, DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1) to satify Clang.
    
    Link: https://github.com/ClangBuiltLinux/linux/issues/159Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    8cfde784
spi-pic32.c 22.6 KB