lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 12 Apr 2015 15:05:01 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Peter Senna Tschudin <peter.senna@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Loic Pefferkorn <loic@...cp.eu>, Alan <alan@...ux.intel.com>,
	Jun Tian <jun.j.tian@...el.com>,
	Octavian Purdila <octavian.purdila@...el.com>,
	Garret Kelly <garret.kelly@...il.com>,
	kristina.martsenko@...il.com, Nick Kralevich <nnk@...gle.com>,
	driverdevel <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Fix pointer cast for 32 bits arch

On Sun, Apr 12, 2015 at 11:26 AM, Peter Senna Tschudin
<peter.senna@...il.com> wrote:
> Sparse compalins about casting void * to u64 on i386.
> Change the cast to resource_size_t.
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@...il.com>
> ---
>
> Tested by compilation only. Tested for x86 and x86_64.
>
>  drivers/staging/goldfish/goldfish_nand.c | 3 ++-
>  include/linux/goldfish.h                 | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c
> index d68f216..738fdc4 100644
> --- a/drivers/staging/goldfish/goldfish_nand.c
> +++ b/drivers/staging/goldfish/goldfish_nand.c
> @@ -87,7 +87,8 @@ static u32 goldfish_nand_cmd(struct mtd_info *mtd, enum nand_cmd cmd,
>                 writel((u32)(addr >> 32), base + NAND_ADDR_HIGH);
>                 writel((u32)addr, base + NAND_ADDR_LOW);
>                 writel(len, base + NAND_TRANSFER_SIZE);
> -               gf_write64((u64)ptr, base + NAND_DATA, base + NAND_DATA_HIGH);
> +               gf_write64((resource_size_t)ptr, base + NAND_DATA,
> +                          base + NAND_DATA_HIGH);

I guess sparse still complains if CONFIG_X86_PAE=y, which makes
resource_size_t u64?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists