From: Boris Brezillon <hidden> Date: 2017-02-13 09:45:07
do_dma() use an integer to pass the DMA data direction information and
pass the same value to dmaengine_prep_slave_sg().
Currently, DMA_{FROM,TO}_DEVICE match DMA_{DEV_TO_MEM,MEM_TO_DEV}
definitions so it works fine, but assuming this will always be the case
is not safe.
Enforce enum dma_data_direction type in the function prototype and make
the enum dma_data_direction -> enum dma_transfer_direction conversion
explicit.
Reported-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Boris Brezillon <redacted>
---
drivers/mtd/nand/tango_nand.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
do_dma() use an integer to pass the DMA data direction information and
pass the same value to dmaengine_prep_slave_sg().
Currently, DMA_{FROM,TO}_DEVICE match DMA_{DEV_TO_MEM,MEM_TO_DEV}
definitions so it works fine, but assuming this will always be the case
is not safe.
Enforce enum dma_data_direction type in the function prototype and make
the enum dma_data_direction -> enum dma_transfer_direction conversion
explicit.
Reported-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Boris Brezillon <redacted>
---
drivers/mtd/nand/tango_nand.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
From: Marc Gonzalez <hidden> Date: 2017-02-20 12:30:25
On 13/02/2017 10:45, Boris Brezillon wrote:
quoted hunk
do_dma() use an integer to pass the DMA data direction information and
pass the same value to dmaengine_prep_slave_sg().
Currently, DMA_{FROM,TO}_DEVICE match DMA_{DEV_TO_MEM,MEM_TO_DEV}
definitions so it works fine, but assuming this will always be the case
is not safe.
Enforce enum dma_data_direction type in the function prototype and make
the enum dma_data_direction -> enum dma_transfer_direction conversion
explicit.
Reported-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Boris Brezillon <redacted>
---
drivers/mtd/nand/tango_nand.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
From: Boris Brezillon <hidden> Date: 2017-02-20 12:35:47
On Mon, 20 Feb 2017 13:30:25 +0100
Marc Gonzalez [off-list ref] wrote:
On 13/02/2017 10:45, Boris Brezillon wrote:
quoted
do_dma() use an integer to pass the DMA data direction information and
pass the same value to dmaengine_prep_slave_sg().
Currently, DMA_{FROM,TO}_DEVICE match DMA_{DEV_TO_MEM,MEM_TO_DEV}
definitions so it works fine, but assuming this will always be the case
is not safe.
Enforce enum dma_data_direction type in the function prototype and make
the enum dma_data_direction -> enum dma_transfer_direction conversion
explicit.
Reported-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Boris Brezillon <redacted>
---
drivers/mtd/nand/tango_nand.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
From: Marc Gonzalez <hidden> Date: 2017-02-20 13:10:07
From: Boris Brezillon <redacted>
do_dma() uses an int to pass the DMA data direction information and
pass the same value to dmaengine_prep_slave_sg().
Currently, DMA_{FROM,TO}_DEVICE match DMA_{DEV_TO_MEM,MEM_TO_DEV}
definitions so it works fine, but assuming this will always be the case
is not safe.
Enforce enum dma_data_direction type in the function prototype and make
the enum dma_data_direction -> enum dma_transfer_direction conversion
explicit.
Reported-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Boris Brezillon <redacted>
Acked-by: Marc Gonzalez <redacted>
---
drivers/mtd/nand/tango_nand.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
From: Boris Brezillon <hidden> Date: 2017-03-16 09:27:19
On Mon, 20 Feb 2017 14:10:07 +0100
Marc Gonzalez [off-list ref] wrote:
From: Boris Brezillon <redacted>
do_dma() uses an int to pass the DMA data direction information and
pass the same value to dmaengine_prep_slave_sg().
Currently, DMA_{FROM,TO}_DEVICE match DMA_{DEV_TO_MEM,MEM_TO_DEV}
definitions so it works fine, but assuming this will always be the case
is not safe.
Enforce enum dma_data_direction type in the function prototype and make
the enum dma_data_direction -> enum dma_transfer_direction conversion
explicit.
Reported-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Boris Brezillon <redacted>
Acked-by: Marc Gonzalez <redacted>