linux-stable/arch/sh/include
Geert Uytterhoeven e8e9f1e632 sh: pgtable-3level: fix cast to pointer from integer of different size
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.

Link: https://lkml.kernel.org/r/2c2eef3c9a2f57e5609100a4864715ccf253d30f.1631713483.git.geert+renesas@glider.be
Fixes: 9cf6fa2458 ("mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t *")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Daniel Palmer <daniel@thingy.jp>
Acked-by: Rob Landley <rob@landley.net>
Cc: Yoshinori Sato <ysato@users.osdn.me>
Cc: Rich Felker <dalias@libc.org>
Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-09-24 16:13:35 -07:00
..
asm sh: pgtable-3level: fix cast to pointer from integer of different size 2021-09-24 16:13:35 -07:00
cpu-common/cpu sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
cpu-sh2/cpu sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
cpu-sh2a/cpu sh: sh7269: Remove bogus SSU GPIO function definitions 2019-12-31 10:01:38 +01:00
cpu-sh3/cpu sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
cpu-sh4/cpu pinctrl: sh-pfc: sh7734: Fix duplicate TCLK1_B 2019-11-01 13:42:52 +01:00
cpu-sh4a/cpu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-common/mach sh: mach-highlander: Fix comment spelling 2020-03-17 20:51:31 +01:00
mach-dreamcast/mach Merge branch 'akpm' (patches from Andrew) 2018-12-28 16:55:46 -08:00
mach-ecovec24/mach sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
mach-kfr2r09/mach sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
mach-landisk/mach License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-migor/mach License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-sdk7786/mach License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-se/mach sh: include: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
mach-sh03/mach License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-x3proto/mach License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uapi/asm sh: remove sh5 support 2020-06-01 14:48:52 -04:00