Re: [PATCH] RDMA/siw: Fix compiler warnings on 32-bit due to u64/pointer abuse
From: Geert Uytterhoeven
Date: Tue Aug 27 2019 - 13:30:06 EST
Hi David,
On Tue, Aug 27, 2019 at 4:17 PM David Laight <David.Laight@xxxxxxxxxx> wrote:
> From: Geert Uytterhoeven
> > Sent: 19 August 2019 18:15
> ...
> > > I think a cast to unsigned long is rather more common.
> > >
> > > uintptr_t is used ~1300 times in the kernel.
> > > I believe a cast to unsigned long is much more common.
> >
> > That is true, as uintptr_t was introduced in C99.
> > Similarly, unsigned long was used before size_t became common.
> >
> > However, nowadays size_t and uintptr_t are preferred.
>
> Isn't uintptr_t defined by the same standard as uint32_t?
I believe so.
> If the former is allowed so should the latter.
You mean the other way around?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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