mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-16 23:07:00 +00:00
mtd: rawnand: omap_gpmc: Fix build warning on 64-bit platforms
Pointer size cannot be assumed to be 32-bit, so use use uintptr_t instead of uint32_t. Fixes the below build warning on 64-bit builds. drivers/mtd/nand/raw/omap_gpmc.c:439:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] head = ((uint32_t) buf) % 4; Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Link: https://lore.kernel.org/all/20221011115012.6181-4-rogerq@kernel.org Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
This commit is contained in:
parent
472229fcfc
commit
7e4a494c5f
1 changed files with 2 additions and 2 deletions
|
@ -438,14 +438,14 @@ static inline void omap_nand_read(struct mtd_info *mtd, uint8_t *buf, int len)
|
|||
static void omap_nand_read_prefetch(struct mtd_info *mtd, uint8_t *buf, int len)
|
||||
{
|
||||
int ret;
|
||||
uint32_t head, tail;
|
||||
uintptr_t head, tail;
|
||||
struct nand_chip *chip = mtd_to_nand(mtd);
|
||||
|
||||
/*
|
||||
* If the destination buffer is unaligned, start with reading
|
||||
* the overlap byte-wise.
|
||||
*/
|
||||
head = ((uint32_t) buf) % 4;
|
||||
head = ((uintptr_t)buf) % 4;
|
||||
if (head) {
|
||||
omap_nand_read(mtd, buf, head);
|
||||
buf += head;
|
||||
|
|
Loading…
Add table
Reference in a new issue