]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
powerpc/64s/hash: Fix phys_addr_t printf format in htab_initialize()
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>
Thu, 30 Oct 2025 14:57:29 +0000 (20:27 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Tue, 18 Nov 2025 07:05:52 +0000 (12:35 +0530)
We get below errors when we try to enable debug logs in book3s64/hash_utils.c
This patch fixes these errors related to phys_addr_t printf format.

arch/powerpc/mm/book3s64/hash_utils.c: In function ‘htab_initialize’:
arch/powerpc/mm/book3s64/hash_utils.c:1401:21: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘phys_addr_t’ {aka ‘long long unsigned int’} [-Werror=format=]
 1401 |                 DBG("creating mapping for region: %lx..%lx (prot: %lx)\n",
arch/powerpc/mm/book3s64/hash_utils.c:1401:21: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘phys_addr_t’ {aka ‘long long unsigned int’} [-Werror=format=]
cc1: all warnings being treated as errors
make[6]: *** [../scripts/Makefile.build:287: arch/powerpc/mm/book3s64/hash_utils.o] Error 1

Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/4873e9692fc4411099c9741005d218d5e734c345.1761834163.git.ritesh.list@gmail.com
arch/powerpc/mm/book3s64/hash_utils.c

index c99be1286d517d01ef22d91b0c76e84914f38cb4..0509c0a436d2aa2f2e4faaaea99c33ba4237d311 100644 (file)
@@ -1394,8 +1394,8 @@ static void __init htab_initialize(void)
                size = end - base;
                base = (unsigned long)__va(base);
 
-               DBG("creating mapping for region: %lx..%lx (prot: %lx)\n",
-                   base, size, prot);
+               pr_debug("creating mapping for region: 0x%pa..0x%pa (prot: %lx)\n",
+                               &base, &size, prot);
 
                if ((base + size) >= H_VMALLOC_START) {
                        pr_warn("Outside the supported range\n");