From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
Daniel Palmer <daniel@0x0f.com>,
linux-sh@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sh: pgtable-3level: Fix cast to pointer from integer of different size
Date: Thu, 23 Sep 2021 17:20:43 +0200 [thread overview]
Message-ID: <180a123c-304e-2e74-fed6-9da463e985b6@physik.fu-berlin.de> (raw)
In-Reply-To: <2c2eef3c9a2f57e5609100a4864715ccf253d30f.1631713483.git.geert+renesas@glider.be>
Hi Geert!
On 9/15/21 15:50, Geert Uytterhoeven wrote:
> If X2TLB=y (CPU_SHX2=y or CPU_SHX3=y, e.g. migor_defconfig), pgd_t.pgd
> is "unsigned long long", causing:
>
> In file included from arch/sh/include/asm/pgtable.h:13,
> from include/linux/pgtable.h:6,
> from include/linux/mm.h:33,
> from arch/sh/kernel/asm-offsets.c:14:
> arch/sh/include/asm/pgtable-3level.h: In function ‘pud_pgtable’:
> arch/sh/include/asm/pgtable-3level.h:37:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> 37 | return (pmd_t *)pud_val(pud);
> | ^
>
> Fix this by adding an intermediate cast to "unsigned long", which is
> basically what the old code did before.
Thanks a lot for fixing this. My SH kernel build becomes much less noisy with
your patch. I can also confirm that it doesn't break the boot on my SH-7785LCR
as expected.
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
prev parent reply other threads:[~2021-09-23 15:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 13:50 [PATCH] sh: pgtable-3level: Fix cast to pointer from integer of different size Geert Uytterhoeven
2021-09-15 13:58 ` Daniel Palmer
2021-09-16 12:06 ` Daniel Palmer
2021-09-17 1:32 ` Rob Landley
2021-09-17 9:21 ` Geert Uytterhoeven
2021-09-18 5:04 ` Rob Landley
2021-09-18 11:20 ` Geert Uytterhoeven
2021-09-23 15:20 ` John Paul Adrian Glaubitz [this message]
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=180a123c-304e-2e74-fed6-9da463e985b6@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=dalias@libc.org \
--cc=daniel@0x0f.com \
--cc=geert+renesas@glider.be \
--cc=jacopo+renesas@jmondi.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-sh@vger.kernel.org \
--cc=ysato@users.sourceforge.jp \
/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).