]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/5.0.5/mmc-pxamci-fix-enum-type-confusion.patch
Linux 5.0.5
[thirdparty/kernel/stable-queue.git] / releases / 5.0.5 / mmc-pxamci-fix-enum-type-confusion.patch
1 From e60a582bcde01158a64ff948fb799f21f5d31a11 Mon Sep 17 00:00:00 2001
2 From: Arnd Bergmann <arnd@arndb.de>
3 Date: Thu, 7 Mar 2019 11:09:19 +0100
4 Subject: mmc: pxamci: fix enum type confusion
5
6 From: Arnd Bergmann <arnd@arndb.de>
7
8 commit e60a582bcde01158a64ff948fb799f21f5d31a11 upstream.
9
10 clang points out several instances of mismatched types in this drivers,
11 all coming from a single declaration:
12
13 drivers/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 ~ ^~~~~~~~~~~~~~
17 drivers/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
21 The behavior is correct, so this must be a simply typo from
22 dma_data_direction and dma_transfer_direction being similarly named
23 types with a similar purpose.
24
25 Fixes: 6464b7140951 ("mmc: pxamci: switch over to dmaengine use")
26 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
27 Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
28 Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
29 Cc: stable@vger.kernel.org
30 Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
31 Signed-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 @@ -162,7 +162,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;