tools/x86/kcpuid: Use C99-style for loops
authorAhmed S. Darwish <darwi@linutronix.de>
Mon, 24 Mar 2025 14:20:30 +0000 (15:20 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Mar 2025 08:53:45 +0000 (09:53 +0100)
commit0a8f12ccd2e6edac89292af63c3a2050b4aac61b
treec517cfe2375e11bb661cf2c59413f2e664f195b1
parent8984cea5c4743d7fabf5de9da142cfc5dde1a144
tools/x86/kcpuid: Use C99-style for loops

Since commit e8c07082a810 ("Kbuild: move to -std=gnu11") and the kernel
allows C99-style variable declarations inside of a for() loop.

Adjust the kcpuid code accordingly.

Note, this helps readability as some of the kcpuid functions have a huge
list of variable declarations on top.

Note, remove the empty lines before cpuid() invocations as it is clearer
to have their parameter initialization and the actual call in one block.

Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20250324142042.29010-10-darwi@linutronix.de
tools/arch/x86/kcpuid/kcpuid.c