From: Vasyl Gomonovych <gomonovych@gmail.com>
To: piotrs@cadence.com, miquel.raynal@bootlin.com, richard@nod.at,
vigneshr@ti.com
Cc: Vasyl Gomonovych <gomonovych@gmail.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] git commit --signoff -m "mtd: cadence: Fix cast to pointer from integer of different size warning
Date: Sat, 14 Dec 2019 22:09:45 +0100 [thread overview]
Message-ID: <20191214210946.29922-1-gomonovych@gmail.com> (raw)
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
next reply other threads:[~2019-12-14 21:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-14 21:09 Vasyl Gomonovych [this message]
2019-12-16 10:09 ` [PATCH] git commit --signoff -m "mtd: cadence: Fix cast to pointer from integer of different size warning Miquel Raynal
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=20191214210946.29922-1-gomonovych@gmail.com \
--to=gomonovych@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--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;
as well as URLs for NNTP newsgroup(s).