Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8eed92605334f1cd8fd025631f6a61522746b124
Commit:     8eed92605334f1cd8fd025631f6a61522746b124
Parent:     ff3cf856120743c7386e8f6ab9f08e068886ce5c
Author:     Cyrill Gorcunov <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:32:31 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:32:31 2008 +0100

    x86: coding style cleanup for kernel/bootflag.c
    
    This patch eliminates checkpatch.pl complaints on bootflag.c
    
    No code changed:
    
       text    data     bss     dec     hex filename
        321       8       0     329     149 bootflag.o.before
        321       8       0     329     149 bootflag.o.after
    
       md5:
          9c1b474bcf25ddc1724a29c19880043f  bootflag.o.before.asm
          9c1b474bcf25ddc1724a29c19880043f  bootflag.o.after.asm
    
    Signed-off-by: Cyrill Gorcunov <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/bootflag.c |   50 +++++++++++++++++++++++--------------------
 1 files changed, 27 insertions(+), 23 deletions(-)

diff --git a/arch/x86/kernel/bootflag.c b/arch/x86/kernel/bootflag.c
index 0b98605..30f25a7 100644
--- a/arch/x86/kernel/bootflag.c
+++ b/arch/x86/kernel/bootflag.c
@@ -1,8 +1,6 @@
 /*
  *     Implement 'Simple Boot Flag Specification 2.0'
  */
-
-
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -14,40 +12,38 @@
 
 #include <linux/mc146818rtc.h>
 
-
 #define SBF_RESERVED (0x78)
 #define SBF_PNPOS    (1<<0)
 #define SBF_BOOTING  (1<<1)
 #define SBF_DIAG     (1<<2)
 #define SBF_PARITY   (1<<7)
 
-
 int sbf_port __initdata = -1;  /* set via acpi_boot_init() */
 
-
 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;
 }
 
 static void __init sbf_write(u8 v)
 {
        unsigned long flags;
-       if(sbf_port != -1)
-       {
+
+       if (sbf_port != -1) {
                v &= ~SBF_PARITY;
-               if(!parity(v))
-                       v|=SBF_PARITY;
+               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);
@@ -57,33 +53,41 @@ static void __init sbf_write(u8 v)
 
 static u8 __init sbf_read(void)
 {
-       u8 v;
        unsigned long flags;
-       if(sbf_port == -1)
+       u8 v;
+
+       if (sbf_port == -1)
                return 0;
+
        spin_lock_irqsave(&rtc_lock, flags);
        v = CMOS_READ(sbf_port);
        spin_unlock_irqrestore(&rtc_lock, flags);
+
        return v;
 }
 
 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;
 }
 
 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;
@@ -92,7 +96,7 @@ static int __init sbf_init(void)
        v |= SBF_PNPOS;
 #endif
        sbf_write(v);
+
        return 0;
 }
-
 module_init(sbf_init);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to