lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20071022191224.GA23273@redhat.com>
Date:	Mon, 22 Oct 2007 15:12:24 -0400
From:	Dave Jones <davej@...hat.com>
To:	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: CodingStyle nits in sbf.c

misplaced brackets, 80 columns, whitespace.

Signed-off-by: Dave Jones <davej@...hat.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ