Skip to content

Commit 1dc571f

Browse files
nathanchancegregkh
authored andcommitted
crypto: ux500 - Use proper enum in hash_set_dma_transfer
[ Upstream commit 5ac93f8 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/hash/hash_core.c:169:4: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different enumeration type 'enum dma_transfer_direction' [-Wenum-conversion] direction, DMA_CTRL_ACK | DMA_PREP_INTERRUPT); ^~~~~~~~~ 1 warning generated. dmaengine_prep_slave_sg expects an enum from dma_transfer_direction. We know that the only direction supported by this function is DMA_TO_DEVICE because of the check at the top of this function so we can just use the equivalent value from dma_transfer_direction. DMA_TO_DEVICE = DMA_MEM_TO_DEV = 1 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2b020c0 commit 1dc571f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/crypto/ux500/hash/hash_core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static int hash_set_dma_transfer(struct hash_ctx *ctx, struct scatterlist *sg,
166166
__func__);
167167
desc = dmaengine_prep_slave_sg(channel,
168168
ctx->device->dma.sg, ctx->device->dma.sg_len,
169-
direction, DMA_CTRL_ACK | DMA_PREP_INTERRUPT);
169+
DMA_MEM_TO_DEV, DMA_CTRL_ACK | DMA_PREP_INTERRUPT);
170170
if (!desc) {
171171
dev_err(ctx->device->dev,
172172
"%s: dmaengine_prep_slave_sg() failed!\n", __func__);

0 commit comments

Comments
 (0)