* [PATCH] git commit --signoff -m "mtd: cadence: Fix cast to pointer from integer of different size warning @ 2019-12-14 21:09 ` Vasyl Gomonovych 0 siblings, 0 replies; 12+ messages in thread From: Vasyl Gomonovych @ 2019-12-14 21:09 UTC (permalink / raw) To: piotrs, miquel.raynal, richard, vigneshr Cc: Vasyl Gomonovych, linux-mtd, linux-kernel Use a cast to uintptr_t and next to a pointer In the final assignment the same casting in place memory_pointer = (uintptr_t)mem_ptr; Fix warning: cast to pointer from integer of different size Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> --- This commit fixes a minor issue with a warning Not sure if we will have problem here in case of dma_addr_t which can be 64-bit wide on 32-bit arch --- drivers/mtd/nand/raw/cadence-nand-controller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c index 3a36285a8d8a..960c3a0be69c 100644 --- a/drivers/mtd/nand/raw/cadence-nand-controller.c +++ b/drivers/mtd/nand/raw/cadence-nand-controller.c @@ -1280,8 +1280,8 @@ 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); + (void *)(uintptr_t)dma_buf, + (void *)(uintptr_t)dma_ctrl_dat, ctype); status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr); -- 2.17.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] git commit --signoff -m "mtd: cadence: Fix cast to pointer from integer of different size warning @ 2019-12-14 21:09 ` Vasyl Gomonovych 0 siblings, 0 replies; 12+ messages in thread From: Vasyl Gomonovych @ 2019-12-14 21:09 UTC (permalink / raw) To: piotrs, miquel.raynal, richard, vigneshr Cc: Vasyl Gomonovych, linux-mtd, linux-kernel Use a cast to uintptr_t and next to a pointer In the final assignment the same casting in place memory_pointer = (uintptr_t)mem_ptr; Fix warning: cast to pointer from integer of different size Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> --- This commit fixes a minor issue with a warning Not sure if we will have problem here in case of dma_addr_t which can be 64-bit wide on 32-bit arch --- drivers/mtd/nand/raw/cadence-nand-controller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c index 3a36285a8d8a..960c3a0be69c 100644 --- a/drivers/mtd/nand/raw/cadence-nand-controller.c +++ b/drivers/mtd/nand/raw/cadence-nand-controller.c @@ -1280,8 +1280,8 @@ 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); + (void *)(uintptr_t)dma_buf, + (void *)(uintptr_t)dma_ctrl_dat, ctype); status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr); -- 2.17.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] git commit --signoff -m "mtd: cadence: Fix cast to pointer from integer of different size warning 2019-12-14 21:09 ` Vasyl Gomonovych @ 2019-12-16 10:09 ` Miquel Raynal -1 siblings, 0 replies; 12+ messages in thread From: Miquel Raynal @ 2019-12-16 10:09 UTC (permalink / raw) To: Vasyl Gomonovych; +Cc: piotrs, richard, vigneshr, linux-mtd, linux-kernel Hi Vasyl, Vasyl Gomonovych <gomonovych@gmail.com> wrote on Sat, 14 Dec 2019 22:09:45 +0100: > Use a cast to uintptr_t and next to a pointer > In the final assignment the same casting in place > memory_pointer = (uintptr_t)mem_ptr; > Fix warning: cast to pointer from integer of different size It seems like you're 'git send' script is messy :) (see the title). > > Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> > --- > This commit fixes a minor issue with a warning > Not sure if we will have problem here in case of > dma_addr_t which can be 64-bit wide on 32-bit arch Why not manipulating dma_addr_t everywhere instead? > > --- > drivers/mtd/nand/raw/cadence-nand-controller.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c > index 3a36285a8d8a..960c3a0be69c 100644 > --- a/drivers/mtd/nand/raw/cadence-nand-controller.c > +++ b/drivers/mtd/nand/raw/cadence-nand-controller.c > @@ -1280,8 +1280,8 @@ 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); > + (void *)(uintptr_t)dma_buf, > + (void *)(uintptr_t)dma_ctrl_dat, ctype); > > status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr); > Thanks, Miquèl ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] git commit --signoff -m "mtd: cadence: Fix cast to pointer from integer of different size warning @ 2019-12-16 10:09 ` Miquel Raynal 0 siblings, 0 replies; 12+ messages in thread From: Miquel Raynal @ 2019-12-16 10:09 UTC (permalink / raw) To: Vasyl Gomonovych; +Cc: richard, linux-mtd, vigneshr, linux-kernel, piotrs Hi Vasyl, Vasyl Gomonovych <gomonovych@gmail.com> wrote on Sat, 14 Dec 2019 22:09:45 +0100: > Use a cast to uintptr_t and next to a pointer > In the final assignment the same casting in place > memory_pointer = (uintptr_t)mem_ptr; > Fix warning: cast to pointer from integer of different size It seems like you're 'git send' script is messy :) (see the title). > > Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> > --- > This commit fixes a minor issue with a warning > Not sure if we will have problem here in case of > dma_addr_t which can be 64-bit wide on 32-bit arch Why not manipulating dma_addr_t everywhere instead? > > --- > drivers/mtd/nand/raw/cadence-nand-controller.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c > index 3a36285a8d8a..960c3a0be69c 100644 > --- a/drivers/mtd/nand/raw/cadence-nand-controller.c > +++ b/drivers/mtd/nand/raw/cadence-nand-controller.c > @@ -1280,8 +1280,8 @@ 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); > + (void *)(uintptr_t)dma_buf, > + (void *)(uintptr_t)dma_ctrl_dat, ctype); > > status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr); > Thanks, Miquèl ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2] mtd: cadence: Fix cast to pointer from integer of different size warning 2019-12-16 10:09 ` Miquel Raynal @ 2019-12-18 9:57 ` Vasyl Gomonovych -1 siblings, 0 replies; 12+ messages in thread From: Vasyl Gomonovych @ 2019-12-18 9:57 UTC (permalink / raw) To: piotrs, miquel.raynal, richard, vigneshr Cc: Vasyl Gomonovych, linux-mtd, linux-kernel Use dma_addr_t type to pass memory address and control data in DMA descriptor fields memory_pointer and ctrl_data_ptr To fix warning: cast to pointer from integer of different size Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> --- Changes since v1: * Remove type casting (void *)(uintptr_t)dma_buf * Change type of function parameters 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 3a36285a8d8a..f6c7102a1e32 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 mem_ptr, + dma_addr_t ctrl_data_ptr, 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 = mem_ptr; 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 = ctrl_data_ptr; } 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.17.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2] mtd: cadence: Fix cast to pointer from integer of different size warning @ 2019-12-18 9:57 ` Vasyl Gomonovych 0 siblings, 0 replies; 12+ messages in thread From: Vasyl Gomonovych @ 2019-12-18 9:57 UTC (permalink / raw) To: piotrs, miquel.raynal, richard, vigneshr Cc: Vasyl Gomonovych, linux-mtd, linux-kernel Use dma_addr_t type to pass memory address and control data in DMA descriptor fields memory_pointer and ctrl_data_ptr To fix warning: cast to pointer from integer of different size Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> --- Changes since v1: * Remove type casting (void *)(uintptr_t)dma_buf * Change type of function parameters 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 3a36285a8d8a..f6c7102a1e32 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 mem_ptr, + dma_addr_t ctrl_data_ptr, 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 = mem_ptr; 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 = ctrl_data_ptr; } 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.17.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2] mtd: cadence: Fix cast to pointer from integer of different size warning 2019-12-18 9:57 ` Vasyl Gomonovych @ 2020-01-06 21:18 ` Olof Johansson -1 siblings, 0 replies; 12+ messages in thread From: Olof Johansson @ 2020-01-06 21:18 UTC (permalink / raw) To: Vasyl Gomonovych, Miquel Raynal Cc: Piotr Sroka, Richard Weinberger, Vignesh R, linux-mtd, Linux Kernel Mailing List Miquel, this warning is still there both in mainline and linux-next. Can you please apply it and get it sent in so we can keep the tree building cleaning and spot warnings without the noise? Thanks! On Wed, Dec 18, 2019 at 1:57 AM Vasyl Gomonovych <gomonovych@gmail.com> wrote: > > Use dma_addr_t type to pass memory address and control data in > DMA descriptor fields memory_pointer and ctrl_data_ptr > To fix warning: cast to pointer from integer of different size > > Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> Acked-by: Olof Johansson <olof@lixom.net> -Olof ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] mtd: cadence: Fix cast to pointer from integer of different size warning @ 2020-01-06 21:18 ` Olof Johansson 0 siblings, 0 replies; 12+ messages in thread From: Olof Johansson @ 2020-01-06 21:18 UTC (permalink / raw) To: Vasyl Gomonovych, Miquel Raynal Cc: Richard Weinberger, linux-mtd, Vignesh R, Linux Kernel Mailing List, Piotr Sroka Miquel, this warning is still there both in mainline and linux-next. Can you please apply it and get it sent in so we can keep the tree building cleaning and spot warnings without the noise? Thanks! On Wed, Dec 18, 2019 at 1:57 AM Vasyl Gomonovych <gomonovych@gmail.com> wrote: > > Use dma_addr_t type to pass memory address and control data in > DMA descriptor fields memory_pointer and ctrl_data_ptr > To fix warning: cast to pointer from integer of different size > > Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> Acked-by: Olof Johansson <olof@lixom.net> -Olof ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] mtd: cadence: Fix cast to pointer from integer of different size warning 2020-01-06 21:18 ` Olof Johansson @ 2020-01-07 9:04 ` Miquel Raynal -1 siblings, 0 replies; 12+ messages in thread From: Miquel Raynal @ 2020-01-07 9:04 UTC (permalink / raw) To: Olof Johansson Cc: Vasyl Gomonovych, Piotr Sroka, Richard Weinberger, Vignesh R, linux-mtd, Linux Kernel Mailing List Hi Olof, Olof Johansson <olof@lixom.net> wrote on Mon, 6 Jan 2020 13:18:17 -0800: > Miquel, this warning is still there both in mainline and linux-next. > > Can you please apply it and get it sent in so we can keep the tree > building cleaning and spot warnings without the noise? Thanks! > > On Wed, Dec 18, 2019 at 1:57 AM Vasyl Gomonovych <gomonovych@gmail.com> wrote: > > > > Use dma_addr_t type to pass memory address and control data in > > DMA descriptor fields memory_pointer and ctrl_data_ptr > > To fix warning: cast to pointer from integer of different size > > > > Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> > > Acked-by: Olof Johansson <olof@lixom.net> > Sorry, I am late. I'll send a fixes PR this week. Thanks, Miquèl ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] mtd: cadence: Fix cast to pointer from integer of different size warning @ 2020-01-07 9:04 ` Miquel Raynal 0 siblings, 0 replies; 12+ messages in thread From: Miquel Raynal @ 2020-01-07 9:04 UTC (permalink / raw) To: Olof Johansson Cc: Vasyl Gomonovych, Vignesh R, Richard Weinberger, Linux Kernel Mailing List, linux-mtd, Piotr Sroka Hi Olof, Olof Johansson <olof@lixom.net> wrote on Mon, 6 Jan 2020 13:18:17 -0800: > Miquel, this warning is still there both in mainline and linux-next. > > Can you please apply it and get it sent in so we can keep the tree > building cleaning and spot warnings without the noise? Thanks! > > On Wed, Dec 18, 2019 at 1:57 AM Vasyl Gomonovych <gomonovych@gmail.com> wrote: > > > > Use dma_addr_t type to pass memory address and control data in > > DMA descriptor fields memory_pointer and ctrl_data_ptr > > To fix warning: cast to pointer from integer of different size > > > > Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> > > Acked-by: Olof Johansson <olof@lixom.net> > Sorry, I am late. I'll send a fixes PR this week. Thanks, Miquèl ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] mtd: cadence: Fix cast to pointer from integer of different size warning 2019-12-18 9:57 ` Vasyl Gomonovych @ 2020-01-09 19:15 ` Miquel Raynal -1 siblings, 0 replies; 12+ messages in thread From: Miquel Raynal @ 2020-01-09 19:15 UTC (permalink / raw) To: Vasyl Gomonovych, piotrs, miquel.raynal, richard, vigneshr Cc: linux-mtd, linux-kernel On Wed, 2019-12-18 at 09:57:15 UTC, Vasyl Gomonovych wrote: > Use dma_addr_t type to pass memory address and control data in > DMA descriptor fields memory_pointer and ctrl_data_ptr > To fix warning: cast to pointer from integer of different size > > Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> > Acked-by: Olof Johansson <olof@lixom.net> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks. Miquel ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] mtd: cadence: Fix cast to pointer from integer of different size warning @ 2020-01-09 19:15 ` Miquel Raynal 0 siblings, 0 replies; 12+ messages in thread From: Miquel Raynal @ 2020-01-09 19:15 UTC (permalink / raw) To: Vasyl Gomonovych, piotrs, miquel.raynal, richard, vigneshr Cc: linux-mtd, linux-kernel On Wed, 2019-12-18 at 09:57:15 UTC, Vasyl Gomonovych wrote: > Use dma_addr_t type to pass memory address and control data in > DMA descriptor fields memory_pointer and ctrl_data_ptr > To fix warning: cast to pointer from integer of different size > > Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com> > Acked-by: Olof Johansson <olof@lixom.net> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks. Miquel ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-01-09 19:48 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-12-14 21:09 [PATCH] git commit --signoff -m "mtd: cadence: Fix cast to pointer from integer of different size warning Vasyl Gomonovych 2019-12-14 21:09 ` Vasyl Gomonovych 2019-12-16 10:09 ` Miquel Raynal 2019-12-16 10:09 ` Miquel Raynal 2019-12-18 9:57 ` [PATCH v2] mtd: " Vasyl Gomonovych 2019-12-18 9:57 ` Vasyl Gomonovych 2020-01-06 21:18 ` Olof Johansson 2020-01-06 21:18 ` Olof Johansson 2020-01-07 9:04 ` Miquel Raynal 2020-01-07 9:04 ` Miquel Raynal 2020-01-09 19:15 ` Miquel Raynal 2020-01-09 19:15 ` Miquel Raynal
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.