]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/mm: Delete disabled debug code
authorBrendan Jackman <jackmanb@google.com>
Fri, 3 Oct 2025 16:56:41 +0000 (16:56 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 27 Nov 2025 13:32:16 +0000 (14:32 +0100)
This code doesn't run. Since 2008:

  4f9c11dd49fb ("x86, 64-bit: adjust mapping of physical pagetables to work with Xen")

the kernel has gained more flexible logging and tracing capabilities;
presumably if anyone wanted to take advantage of this log message they would
have got rid of the "if (0)" so they could use these capabilities.

Since they haven't, just delete it.

Signed-off-by: Brendan Jackman <jackmanb@google.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20251003-x86-init-cleanup-v1-1-f2b7994c2ad6@google.com
arch/x86/mm/init_64.c

index 0e4270e20fadb578c7fd6bf5c5e4762027c36c45..1044aafd5d94e3d39dbaa7ff9adc97bc7ecf1d4b 100644 (file)
@@ -504,9 +504,6 @@ phys_pte_init(pte_t *pte_page, unsigned long paddr, unsigned long paddr_end,
                        continue;
                }
 
-               if (0)
-                       pr_info("   pte=%p addr=%lx pte=%016lx\n", pte, paddr,
-                               pfn_pte(paddr >> PAGE_SHIFT, PAGE_KERNEL).pte);
                pages++;
                set_pte_init(pte, pfn_pte(paddr >> PAGE_SHIFT, prot), init);
                paddr_last = (paddr & PAGE_MASK) + PAGE_SIZE;