linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mtd: rawnand: cadence: Change types of function parameters keeping DMA address
@ 2019-12-05 11:55 Piotr Sroka
  2020-01-09 19:20 ` Miquel Raynal
  0 siblings, 1 reply; 3+ messages in thread
From: Piotr Sroka @ 2019-12-05 11:55 UTC (permalink / raw)
  Cc: Vignesh Raghavendra, Richard Weinberger, linux-kernel,
	Marek Vasut, linux-mtd, Miquel Raynal, Brian Norris,
	David Woodhouse, Piotr Sroka

It was changed to avoid compilation warnings during type casting.

Signed-off-by: Piotr Sroka <piotrs@cadence.com>
Reported-by: kbuild test robot <lkp@intel.com>
---
 drivers/mtd/nand/raw/cadence-nand-controller.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c
index 3a36285..222a5fb 100644
--- a/drivers/mtd/nand/raw/cadence-nand-controller.c
+++ b/drivers/mtd/nand/raw/cadence-nand-controller.c
@@ -914,8 +914,8 @@ static void cadence_nand_get_caps(struct cdns_nand_ctrl *cdns_ctrl)
 /* Prepare CDMA descriptor. */
 static void
 cadence_nand_cdma_desc_prepare(struct cdns_nand_ctrl *cdns_ctrl,
-			       char nf_mem, u32 flash_ptr, char *mem_ptr,
-			       char *ctrl_data_ptr, u16 ctype)
+			       char nf_mem, u32 flash_ptr, dma_addr_t data,
+			       dma_addr_t ctrl_data, u16 ctype)
 {
 	struct cadence_nand_cdma_desc *cdma_desc = cdns_ctrl->cdma_desc;
 
@@ -931,13 +931,13 @@ cadence_nand_cdma_desc_prepare(struct cdns_nand_ctrl *cdns_ctrl,
 	cdma_desc->command_flags |= CDMA_CF_DMA_MASTER;
 	cdma_desc->command_flags  |= CDMA_CF_INT;
 
-	cdma_desc->memory_pointer = (uintptr_t)mem_ptr;
+	cdma_desc->memory_pointer = (u64)data;
 	cdma_desc->status = 0;
 	cdma_desc->sync_flag_pointer = 0;
 	cdma_desc->sync_arguments = 0;
 
 	cdma_desc->command_type = ctype;
-	cdma_desc->ctrl_data_ptr = (uintptr_t)ctrl_data_ptr;
+	cdma_desc->ctrl_data_ptr = (u64)ctrl_data;
 }
 
 static u8 cadence_nand_check_desc_error(struct cdns_nand_ctrl *cdns_ctrl,
@@ -1280,8 +1280,7 @@ cadence_nand_cdma_transfer(struct cdns_nand_ctrl *cdns_ctrl, u8 chip_nr,
 	}
 
 	cadence_nand_cdma_desc_prepare(cdns_ctrl, chip_nr, page,
-				       (void *)dma_buf, (void *)dma_ctrl_dat,
-				       ctype);
+				       dma_buf, dma_ctrl_dat, ctype);
 
 	status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr);
 
@@ -1360,7 +1359,7 @@ static int cadence_nand_erase(struct nand_chip *chip, u32 page)
 
 	cadence_nand_cdma_desc_prepare(cdns_ctrl,
 				       cdns_chip->cs[chip->cur_cs],
-				       page, NULL, NULL,
+				       page, 0, 0,
 				       CDMA_CT_ERASE);
 	status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr);
 	if (status) {
-- 
2.4.5


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] mtd: rawnand: cadence: Change types of function parameters keeping DMA address
  2019-12-05 11:55 [PATCH -next] mtd: rawnand: cadence: Change types of function parameters keeping DMA address Piotr Sroka
@ 2020-01-09 19:20 ` Miquel Raynal
  2020-01-10  9:45   ` Piotr Sroka
  0 siblings, 1 reply; 3+ messages in thread
From: Miquel Raynal @ 2020-01-09 19:20 UTC (permalink / raw)
  To: Piotr Sroka
  Cc: Vignesh Raghavendra, Richard Weinberger, linux-kernel,
	Marek Vasut, linux-mtd, Brian Norris, David Woodhouse

Hi Piotr,

Piotr Sroka <piotrs@cadence.com> wrote on Thu, 5 Dec 2019 12:55:58
+0100:

> It was changed to avoid compilation warnings during type casting.
> 
> Signed-off-by: Piotr Sroka <piotrs@cadence.com>
> Reported-by: kbuild test robot <lkp@intel.com>
> ---

I just realized that I received three patches for the same issue about
a month ago, yours was totally valid but I choose to apply the one from
someone not contributing a lot to encourage him, hope you don't mind :)

Cheers,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] mtd: rawnand: cadence: Change types of function parameters keeping DMA address
  2020-01-09 19:20 ` Miquel Raynal
@ 2020-01-10  9:45   ` Piotr Sroka
  0 siblings, 0 replies; 3+ messages in thread
From: Piotr Sroka @ 2020-01-10  9:45 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Vignesh Raghavendra, Richard Weinberger, linux-kernel,
	Marek Vasut, linux-mtd, Brian Norris, David Woodhouse

The 01/09/2020 20:20, Miquel Raynal wrote:

Hi Miquel

>
>Hi Piotr,
>
>Piotr Sroka <piotrs@cadence.com> wrote on Thu, 5 Dec 2019 12:55:58
>+0100:
>
>> It was changed to avoid compilation warnings during type casting.
>>
>> Signed-off-by: Piotr Sroka <piotrs@cadence.com>
>> Reported-by: kbuild test robot <lkp@intel.com>
>> ---
>
>I just realized that I received three patches for the same issue about
>a month ago, yours was totally valid but I choose to apply the one from
>someone not contributing a lot to encourage him, hope you don't mind :)
>
>Cheers,
>Miquèl
>

I don't mind :), most importantly it's fixed.

Thanks
Piotr



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-10  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 11:55 [PATCH -next] mtd: rawnand: cadence: Change types of function parameters keeping DMA address Piotr Sroka
2020-01-09 19:20 ` Miquel Raynal
2020-01-10  9:45   ` Piotr Sroka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).