diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2021-11-24 12:32:52 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-11-29 14:49:20 +0300 |
commit | ff47a95d1a67477e9bc2049a840d93b68508e079 (patch) | |
tree | 83afc6fd77d999ed32764e67ed2e19bb27500651 /arch/powerpc/mm/nohash | |
parent | d9150d5bb5586dc20b6c424e59d5ea29fe1b3030 (diff) | |
download | linux-ff47a95d1a67477e9bc2049a840d93b68508e079.tar.xz |
powerpc/mm: Move tlbcam_sz() and make it static
Building with W=1 we see a warning:
linux/arch/powerpc/mm/nohash/fsl_book3e.c:63:15: error: no previous prototype for ‘tlbcam_sz’
tlbcam_sz() is not used outside this file, so we can make it static.
However it's only used inside #ifdef CONFIG_PPC32, so move it within
that ifdef, otherwise we would get a defined but not used error.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211124093254.1054750-4-mpe@ellerman.id.au
Diffstat (limited to 'arch/powerpc/mm/nohash')
-rw-r--r-- | arch/powerpc/mm/nohash/fsl_book3e.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/mm/nohash/fsl_book3e.c b/arch/powerpc/mm/nohash/fsl_book3e.c index b231a54f540c..7f71bc3bf85f 100644 --- a/arch/powerpc/mm/nohash/fsl_book3e.c +++ b/arch/powerpc/mm/nohash/fsl_book3e.c @@ -60,11 +60,6 @@ struct tlbcamrange { phys_addr_t phys; } tlbcam_addrs[NUM_TLBCAMS]; -unsigned long tlbcam_sz(int idx) -{ - return tlbcam_addrs[idx].limit - tlbcam_addrs[idx].start + 1; -} - #ifdef CONFIG_FSL_BOOKE /* * Return PA for this VA if it is mapped by a CAM, or 0 @@ -264,6 +259,11 @@ void __init MMU_init_hw(void) flush_instruction_cache(); } +static unsigned long tlbcam_sz(int idx) +{ + return tlbcam_addrs[idx].limit - tlbcam_addrs[idx].start + 1; +} + void __init adjust_total_lowmem(void) { unsigned long ram; |