* CodingStyle nits in sbf.c
@ 2007-10-22 19:12 Dave Jones
0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2007-10-22 19:12 UTC (permalink / raw)
To: Linux Kernel
misplaced brackets, 80 columns, whitespace.
Signed-off-by: Dave Jones <davej@redhat.com>
diff --git a/arch/x86/kernel/bootflag.c b/arch/x86/kernel/bootflag.c
index 0b98605..85fc177 100644
--- a/arch/x86/kernel/bootflag.c
+++ b/arch/x86/kernel/bootflag.c
@@ -30,10 +30,9 @@ static int __init parity(u8 v)
int x = 0;
int i;
- for(i=0;i<8;i++)
- {
- x^=(v&1);
- v>>=1;
+ for (i=0; i<8; i++) {
+ x ^= (v & 1);
+ v >>= 1;
}
return x;
}
@@ -41,13 +40,13 @@ static int __init parity(u8 v)
static void __init sbf_write(u8 v)
{
unsigned long flags;
- if(sbf_port != -1)
- {
+ if (sbf_port != -1) {
v &= ~SBF_PARITY;
- if(!parity(v))
+ if (!parity(v))
v|=SBF_PARITY;
- printk(KERN_INFO "Simple Boot Flag at 0x%x set to 0x%x\n", sbf_port, v);
+ printk(KERN_INFO "Simple Boot Flag at 0x%x "
+ "set to 0x%x\n", sbf_port, v);
spin_lock_irqsave(&rtc_lock, flags);
CMOS_WRITE(v, sbf_port);
@@ -59,7 +58,7 @@ static u8 __init sbf_read(void)
{
u8 v;
unsigned long flags;
- if(sbf_port == -1)
+ if (sbf_port == -1)
return 0;
spin_lock_irqsave(&rtc_lock, flags);
v = CMOS_READ(sbf_port);
@@ -69,9 +68,9 @@ static u8 __init sbf_read(void)
static int __init sbf_value_valid(u8 v)
{
- if(v&SBF_RESERVED) /* Reserved bits */
+ if (v & SBF_RESERVED) /* Reserved bits */
return 0;
- if(!parity(v))
+ if (!parity(v))
return 0;
return 1;
}
@@ -79,11 +78,12 @@ static int __init sbf_value_valid(u8 v)
static int __init sbf_init(void)
{
u8 v;
- if(sbf_port == -1)
+ if (sbf_port == -1)
return 0;
v = sbf_read();
- if(!sbf_value_valid(v))
- printk(KERN_WARNING "Simple Boot Flag value 0x%x read from CMOS RAM was invalid\n",v);
+ if (!sbf_value_valid(v))
+ printk(KERN_WARNING "Simple Boot Flag value 0x%x "
+ "read from CMOS RAM was invalid\n",v);
v &= ~SBF_RESERVED;
v &= ~SBF_BOOTING;
--
http://www.codemonkey.org.uk
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-22 19:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-22 19:12 CodingStyle nits in sbf.c Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox