Skip to content

Commit bfe4bb1

Browse files
Miklos VajnaKAGA-KOKO
authored andcommitted
x86: janitor work in bugs.c
Just moved trailing statements to the next line, removed space before open/close parenthesis, wrapped long lines. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 23eb271 commit bfe4bb1

1 file changed

Lines changed: 19 additions & 8 deletions

File tree

‎arch/x86/kernel/cpu/bugs.c‎

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,12 @@ static void __init check_fpu(void)
5959
return;
6060
}
6161

62-
/* trap_init() enabled FXSR and company _before_ testing for FP problems here. */
63-
/* Test for the divl bug.. */
62+
/*
63+
* trap_init() enabled FXSR and company _before_ testing for FP
64+
* problems here.
65+
*
66+
* Test for the divl bug..
67+
*/
6468
__asm__("fninit\n\t"
6569
"fldl %1\n\t"
6670
"fdivl %2\n\t"
@@ -108,10 +112,15 @@ static void __init check_popad(void)
108112
"movl $12345678,%%eax; movl $0,%%edi; pusha; popa; movl (%%edx,%%edi),%%ecx "
109113
: "=&a" (res)
110114
: "d" (inp)
111-
: "ecx", "edi" );
112-
/* If this fails, it means that any user program may lock the CPU hard. Too bad. */
113-
if (res != 12345678) printk( "Buggy.\n" );
114-
else printk( "OK.\n" );
115+
: "ecx", "edi");
116+
/*
117+
* If this fails, it means that any user program may lock the
118+
* CPU hard. Too bad.
119+
*/
120+
if (res != 12345678)
121+
printk("Buggy.\n");
122+
else
123+
printk("OK.\n");
115124
#endif
116125
}
117126

@@ -137,7 +146,8 @@ static void __init check_config(void)
137146
* i486+ only features! (WP works in supervisor mode and the
138147
* new "invlpg" and "bswap" instructions)
139148
*/
140-
#if defined(CONFIG_X86_WP_WORKS_OK) || defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_BSWAP)
149+
#if defined(CONFIG_X86_WP_WORKS_OK) || defined(CONFIG_X86_INVLPG) || \
150+
defined(CONFIG_X86_BSWAP)
141151
if (boot_cpu_data.x86 == 3)
142152
panic("Kernel requires i486+ for 'invlpg' and other features");
143153
#endif
@@ -170,6 +180,7 @@ void __init check_bugs(void)
170180
check_fpu();
171181
check_hlt();
172182
check_popad();
173-
init_utsname()->machine[1] = '0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86);
183+
init_utsname()->machine[1] =
184+
'0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86);
174185
alternative_instructions();
175186
}

0 commit comments

Comments
 (0)