Re: [PATCH] sh: pgtable-3level: Fix cast to pointer from integer of different size

From
Rob Landley <hidden>
Date
2021-09-17 01:12:59
Also in
linux-mm, lkml
Reply to
Geert Uytterhoeven, 2021-09-15
On 9/15/21 8:50 AM, Geert Uytterhoeven wrote:
    arch/sh/include/asm/pgtable-3level.h:37:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
...
The truncation to "unsigned long" has been there since forever, so
probably it still works fine ;-)
1) Linux is LP64 so sizeof(long) and sizeof(pointer) always match, so it's not
truncating.

2) The sh5 only ever shipped evaluation units, it never had a production run,
and we haven't implemented j64 yet, so all superh targets are currently 32 bit.
(I.E. it's complaining about _expanding_ the pointer, which shouldn't be a
problem as long as endianness is respected.)

Rob
Thread (8 messages) 8 messages, 5 authors, last reply 2021-09-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help