]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.109/mmc-pxamci-fix-enum-type-confusion.patch
Linux 4.14.109
[thirdparty/kernel/stable-queue.git] / releases / 4.14.109 / mmc-pxamci-fix-enum-type-confusion.patch
CommitLineData
fe37e0cf
GKH
1From e60a582bcde01158a64ff948fb799f21f5d31a11 Mon Sep 17 00:00:00 2001
2From: Arnd Bergmann <arnd@arndb.de>
3Date: Thu, 7 Mar 2019 11:09:19 +0100
4Subject: mmc: pxamci: fix enum type confusion
5
6From: Arnd Bergmann <arnd@arndb.de>
7
8commit e60a582bcde01158a64ff948fb799f21f5d31a11 upstream.
9
10clang points out several instances of mismatched types in this drivers,
11all coming from a single declaration:
12
13drivers/mmc/host/pxamci.c:193:15: error: implicit conversion from enumeration type 'enum dma_transfer_direction' to
14 different enumeration type 'enum dma_data_direction' [-Werror,-Wenum-conversion]
15 direction = DMA_DEV_TO_MEM;
16 ~ ^~~~~~~~~~~~~~
17drivers/mmc/host/pxamci.c:212:62: error: implicit conversion from enumeration type 'enum dma_data_direction' to
18 different enumeration type 'enum dma_transfer_direction' [-Werror,-Wenum-conversion]
19 tx = dmaengine_prep_slave_sg(chan, data->sg, host->dma_len, direction,
20
21The behavior is correct, so this must be a simply typo from
22dma_data_direction and dma_transfer_direction being similarly named
23types with a similar purpose.
24
25Fixes: 6464b7140951 ("mmc: pxamci: switch over to dmaengine use")
26Signed-off-by: Arnd Bergmann <arnd@arndb.de>
27Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
28Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
29Cc: stable@vger.kernel.org
30Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
31Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32
33---
34 drivers/mmc/host/pxamci.c | 2 +-
35 1 file changed, 1 insertion(+), 1 deletion(-)
36
37--- a/drivers/mmc/host/pxamci.c
38+++ b/drivers/mmc/host/pxamci.c
39@@ -181,7 +181,7 @@ static void pxamci_dma_irq(void *param);
40 static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
41 {
42 struct dma_async_tx_descriptor *tx;
43- enum dma_data_direction direction;
44+ enum dma_transfer_direction direction;
45 struct dma_slave_config config;
46 struct dma_chan *chan;
47 unsigned int nob = data->blocks;