linux_dsm_epyc7002/drivers/crypto/ux500/cryp
Nathan Chancellor 9d880c5945 crypto: ux500 - Use proper enum in cryp_set_dma_transfer
Clang warns when one enumerated type is implicitly converted to another:

drivers/crypto/ux500/cryp/cryp_core.c:559:5: warning: implicit
conversion from enumeration type 'enum dma_data_direction' to different
enumeration type 'enum dma_transfer_direction' [-Wenum-conversion]
                                direction, DMA_CTRL_ACK);
                                ^~~~~~~~~
drivers/crypto/ux500/cryp/cryp_core.c:583:5: warning: implicit
conversion from enumeration type 'enum dma_data_direction' to different
enumeration type 'enum dma_transfer_direction' [-Wenum-conversion]
                                direction,
                                ^~~~~~~~~
2 warnings generated.

dmaengine_prep_slave_sg expects an enum from dma_transfer_direction.
Because we know the value of the dma_data_direction enum from the
switch statement, we can just use the proper value from
dma_transfer_direction so there is no more conversion.

DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1
DMA_FROM_DEVICE = DMA_DEV_TO_MEM = 2

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-12-23 11:52:43 +08:00
..
cryp_core.c crypto: ux500 - Use proper enum in cryp_set_dma_transfer 2018-12-23 11:52:43 +08:00
cryp_irq.c
cryp_irq.h
cryp_irqp.h
cryp_p.h crypto: ux500 - Cleanup hardware identification 2012-05-15 17:25:33 +10:00
cryp.c scripts/spelling.txt: add "disble(d)" pattern and fix typo instances 2017-03-09 17:01:09 -08:00
cryp.h crypto: ux500/cryp - Set DMA configuration though dma_slave_config() 2013-05-23 21:14:17 +02:00
Makefile crypto: ux500 - do not build with -O0 2016-06-28 16:06:33 +08:00