Skip to content

Commit 9f76d60

Browse files
Wang JinchaoIngo Molnar
Wang Jinchao
authored and
Ingo Molnar
committed
x86/boot: Harmonize the style of array-type parameter for fixup_pointer() calls
The usage of '&' before the array parameter is redundant because '&array' is equivalent to 'array'. Therefore, there is no need to include '&' before the array parameter. In fact, using '&' can cause more confusion, especially for individuals who are not familiar with the address-of operation for arrays. They might mistakenly believe that one is different from the other and spend additional time realizing that they are actually the same. Harmonizing the style by removing the unnecessary '&' would save time for those individuals. Signed-off-by: Wang Jinchao <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/ZMt24BGEX9IhPSY6@fedora
1 parent 001470f commit 9f76d60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/x86/kernel/head64.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ unsigned long __head __startup_64(unsigned long physaddr,
211211

212212
/* Fixup the physical addresses in the page table */
213213

214-
pgd = fixup_pointer(&early_top_pgt, physaddr);
214+
pgd = fixup_pointer(early_top_pgt, physaddr);
215215
p = pgd + pgd_index(__START_KERNEL_map);
216216
if (la57)
217217
*p = (unsigned long)level4_kernel_pgt;
@@ -220,11 +220,11 @@ unsigned long __head __startup_64(unsigned long physaddr,
220220
*p += _PAGE_TABLE_NOENC - __START_KERNEL_map + load_delta;
221221

222222
if (la57) {
223-
p4d = fixup_pointer(&level4_kernel_pgt, physaddr);
223+
p4d = fixup_pointer(level4_kernel_pgt, physaddr);
224224
p4d[511] += load_delta;
225225
}
226226

227-
pud = fixup_pointer(&level3_kernel_pgt, physaddr);
227+
pud = fixup_pointer(level3_kernel_pgt, physaddr);
228228
pud[510] += load_delta;
229229
pud[511] += load_delta;
230230

0 commit comments

Comments
 (0)