public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Vasyl Gomonovych <gomonovych@gmail.com>
Cc: piotrs@cadence.com, richard@nod.at, vigneshr@ti.com,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] git commit --signoff -m "mtd: cadence: Fix cast to pointer from integer of different size warning
Date: Mon, 16 Dec 2019 11:09:47 +0100	[thread overview]
Message-ID: <20191216110947.6fb2423a@xps13> (raw)
In-Reply-To: <20191214210946.29922-1-gomonovych@gmail.com>

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

  reply	other threads:[~2019-12-16 10:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-16 10:09 ` Miquel Raynal [this message]
2019-12-18  9:57   ` [PATCH v2] mtd: " Vasyl Gomonovych
2020-01-06 21:18     ` Olof Johansson
2020-01-07  9:04       ` Miquel Raynal
2020-01-09 19:15     ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191216110947.6fb2423a@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=gomonovych@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=piotrs@cadence.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox