[coreboot-gerrit] New patch to review for coreboot: src/ec: Improve code formatting

HAOUAS Elyes (ehaouas@noos.fr) gerrit at coreboot.org
Mon Sep 5 20:02:04 CEST 2016


HAOUAS Elyes (ehaouas at noos.fr) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16503

-gerrit

commit 363aa07626ede88a01fbd84aa5300f76f70eb146
Author: Elyes HAOUAS <ehaouas at noos.fr>
Date:   Mon Sep 5 19:55:34 2016 +0200

    src/ec: Improve code formatting
    
    Change-Id: I93b71ca577c973046d1651d92665168b329eda1b
    Signed-off-by: Elyes HAOUAS <ehaouas at noos.fr>
---
 src/ec/compal/ene932/acpi/ec.asl      |   6 +-
 src/ec/compal/ene932/ec.c             |   2 +-
 src/ec/google/chromeec/acpi/ec.asl    |   2 +-
 src/ec/lenovo/h8/acpi/ec.asl          | 258 +++++++++++++++++-----------------
 src/ec/lenovo/h8/acpi/lid.asl         |   2 +-
 src/ec/lenovo/h8/acpi/sleepbutton.asl |   2 +-
 src/ec/lenovo/h8/acpi/thermal.asl     |  20 +--
 src/ec/quanta/ene_kb3940q/ec.c        |   2 +-
 src/ec/quanta/it8518/ec.c             |   2 +-
 9 files changed, 148 insertions(+), 148 deletions(-)

diff --git a/src/ec/compal/ene932/acpi/ec.asl b/src/ec/compal/ene932/acpi/ec.asl
index 93ddcbe..8ecfd2b 100644
--- a/src/ec/compal/ene932/acpi/ec.asl
+++ b/src/ec/compal/ene932/acpi/ec.asl
@@ -212,9 +212,9 @@ Device (EC0)
 		                // 101 : CPT
 		, 1,            // Reserved                             ; C0h.7
 		BST0, 8,        // Battery Status                       ; C1h
-                        // Bit0 : Discharging
-                        // Bit1 : Charging
-                        // Bit2 : Discharg and Critical Low
+			// Bit0 : Discharging
+			// Bit1 : Charging
+			// Bit2 : Discharg and Critical Low
 		                // Bit3-7 : Reserved
 		BRC0, 16,       // Batt Remaining Capacity              ; C2h, C3h
 		BSN0, 16,       // Batt Serial Number                   ; C4h, C5h
diff --git a/src/ec/compal/ene932/ec.c b/src/ec/compal/ene932/ec.c
index 4b69e75..1587db9 100644
--- a/src/ec/compal/ene932/ec.c
+++ b/src/ec/compal/ene932/ec.c
@@ -144,7 +144,7 @@ static struct device_operations ops = {
 };
 
 static struct pnp_info pnp_dev_info[] = {
-        { &ops, 0, 0, { 0, 0 }, }
+	{ &ops, 0, 0, { 0, 0 }, }
 };
 
 static void enable_dev(struct device *dev)
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index 84d5e32..db3fff7 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -448,7 +448,7 @@ Device (EC0)
 #endif
 
 #ifdef EC_ENABLE_KEYBOARD_BACKLIGHT
-       #include "keyboard_backlight.asl"
+	#include "keyboard_backlight.asl"
 #endif
 
 #ifdef EC_ENABLE_PD_MCU_DEVICE
diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl
index 085492d..4f8d203 100644
--- a/src/ec/lenovo/h8/acpi/ec.asl
+++ b/src/ec/lenovo/h8/acpi/ec.asl
@@ -27,13 +27,13 @@ Device(EC)
 	Field (ERAM, ByteAcc, NoLock, Preserve)
 	{
 		Offset (0x02),
-				DKR1, 1,        /* Dock register 1 */
+				DKR1, 1,	 /* Dock register 1 */
 		Offset (0x05),
 				HSPA, 1,
 		Offset (0x0C),
 				LEDS, 8,	/* LED state */
 		Offset (0x1a),
-				DKR2, 1,        /* Dock register 2 */
+				DKR2, 1,	 /* Dock register 2 */
 		Offset (0x2a),
 				EVNT, 8,	/* write will trigger EC event */
 		Offset (0x3a),
@@ -56,7 +56,7 @@ Device(EC)
 				PAGE, 8,	/* Information Page Selector */
 		Offset (0xfe),
 				    , 4,
-				DKR3, 1        /* Dock register 3 */
+				DKR3, 1		/* Dock register 3 */
 	}
 
 	Method (_CRS, 0)
@@ -140,186 +140,186 @@ Device(EC)
 		Store(0x50, EVNT)
 	}
 
-       Method(_Q2A, 0, NotSerialized)
-       {
-	       Notify(^LID, 0x80)
-       }
+	Method(_Q2A, 0, NotSerialized)
+	{
+		Notify(^LID, 0x80)
+	}
 
-       Method(_Q2B, 0, NotSerialized)
-       {
-	       Notify(^LID, 0x80)
-       }
+	Method(_Q2B, 0, NotSerialized)
+	{
+		Notify(^LID, 0x80)
+	}
 
 
-       /* IBM proprietary buttons.  */
+	/* IBM proprietary buttons.  */
 
-       Method (_Q10, 0, NotSerialized)
-       {
+	Method (_Q10, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x01)
-       }
+	}
 
-       Method (_Q11, 0, NotSerialized)
-       {
+	Method (_Q11, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x02)
-       }
+	}
 
-       Method (_Q12, 0, NotSerialized)
-       {
+	Method (_Q12, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x03)
-       }
+	}
 
-       Method (_Q64, 0, NotSerialized)
-       {
+	Method (_Q64, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x05)
-       }
+	}
 
-       Method (_Q65, 0, NotSerialized)
-       {
+	Method (_Q65, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x06)
-       }
+	}
 
-       Method (_Q17, 0, NotSerialized)
-       {
+	Method (_Q17, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x08)
-       }
+	}
 
-       Method (_Q66, 0, NotSerialized)
-       {
+	Method (_Q66, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x0A)
-       }
+	}
 
-       Method (_Q6A, 0, NotSerialized)
-       {
+	Method (_Q6A, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x1B)
-       }
+	}
 
-       Method (_Q1A, 0, NotSerialized)
-       {
+	Method (_Q1A, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x0B)
-       }
+	}
 
-       Method (_Q1B, 0, NotSerialized)
-       {
+	Method (_Q1B, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x0C)
-       }
+	}
 
-       Method (_Q62, 0, NotSerialized)
-       {
+	Method (_Q62, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x0D)
-       }
+	}
 
-       Method (_Q60, 0, NotSerialized)
-       {
+	Method (_Q60, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x0E)
-       }
+	}
 
-       Method (_Q61, 0, NotSerialized)
-       {
+	Method (_Q61, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x0F)
-       }
+	}
 
-       Method (_Q1F, 0, NotSerialized)
-       {
+	Method (_Q1F, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x12)
-       }
+	}
 
-       Method (_Q67, 0, NotSerialized)
-       {
+	Method (_Q67, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x13)
-       }
+	}
 
-       Method (_Q63, 0, NotSerialized)
-       {
+	Method (_Q63, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x14)
-       }
+	}
 
-       Method (_Q19, 0, NotSerialized)
-       {
+	Method (_Q19, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x18)
-       }
+	}
 
-       Method (_Q1C, 0, NotSerialized)
-       {
+	Method (_Q1C, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x19)
-       }
+	}
 
-       Method (_Q1D, 0, NotSerialized)
-       {
+	Method (_Q1D, 0, NotSerialized)
+	{
 	    ^HKEY.RHK (0x1A)
-       }
+	}
 
-       Method (_Q5C, 0, NotSerialized)
-       {
+	Method (_Q5C, 0, NotSerialized)
+	{
 	    ^HKEY.RTAB (0xB)
-       }
+	}
 
-       Method (_Q5D, 0, NotSerialized)
-       {
+	Method (_Q5D, 0, NotSerialized)
+	{
 	    ^HKEY.RTAB (0xC)
-       }
+	}
 
-       Method (_Q5E, 0, NotSerialized)
-       {
+	Method (_Q5E, 0, NotSerialized)
+	{
 	    ^HKEY.RTAB (0x9)
-       }
+	}
 
-       Method (_Q5F, 0, NotSerialized)
-       {
+	Method (_Q5F, 0, NotSerialized)
+	{
 	    ^HKEY.RTAB (0xA)
-       }
-
-       Device (HKEY)
-       {
-	       Name (_HID, EisaId ("IBM0068"))
-	       Name (BTN, 0)
-	       Name (BTAB, 0)
-	       /* MASK */
-	       Name (DHKN, 0x080C)
-	       /* Effective Mask */
-	       Name (EMSK, 0)
-	       /* Effective Mask for tablet */
-	       Name (ETAB, 0)
-	       /* Device enabled. */
-	       Name (EN, 0)
-	       Method (_STA, 0, NotSerialized)
-	       {
+	}
+
+	Device (HKEY)
+	{
+		Name (_HID, EisaId ("IBM0068"))
+		Name (BTN, 0)
+		Name (BTAB, 0)
+		/* MASK */
+		Name (DHKN, 0x080C)
+		/* Effective Mask */
+		Name (EMSK, 0)
+		/* Effective Mask for tablet */
+		Name (ETAB, 0)
+		/* Device enabled. */
+		Name (EN, 0)
+		Method (_STA, 0, NotSerialized)
+		{
 		    Return (0x0F)
-	       }
-	       /* Retrieve event. */
-	       Method (MHKP, 0, NotSerialized)
-	       {
+		}
+		/* Retrieve event. */
+		Method (MHKP, 0, NotSerialized)
+		{
 		    Store (BTN, Local0)
 		    If (LNotEqual (Local0, Zero)) {
-		       Store (Zero, BTN)
-		       Add (Local0, 0x1000, Local0)
-		       Return (Local0)
+			Store (Zero, BTN)
+			Add (Local0, 0x1000, Local0)
+			Return (Local0)
 		    }
 		    Store (BTAB, Local0)
 		    If (LNotEqual (Local0, Zero)) {
-		       Store (Zero, BTAB)
-		       Add (Local0, 0x5000, Local0)
-		       Return (Local0)
+			Store (Zero, BTAB)
+			Add (Local0, 0x5000, Local0)
+			Return (Local0)
 		    }
 		    Return (Zero)
-	       }
-	       /* Report event  */
-	       Method (RHK, 1, NotSerialized) {
+		}
+		/* Report event  */
+		Method (RHK, 1, NotSerialized) {
 		      ShiftLeft (One, Subtract (Arg0, 1), Local0)
 		      If (And (EMSK, Local0)) {
 			 Store (Arg0, BTN)
 			 Notify (HKEY, 0x80)
 		      }
-	       }
-	       /* Report tablet  */
-	       Method (RTAB, 1, NotSerialized) {
+		}
+		/* Report tablet  */
+		Method (RTAB, 1, NotSerialized) {
 		      ShiftLeft (One, Subtract (Arg0, 1), Local0)
 		      If (And (ETAB, Local0)) {
 			 Store (Arg0, BTAB)
 			 Notify (HKEY, 0x80)
 		      }
-	       }
-	       /* Enable/disable all events.  */
-	       Method (MHKC, 1, NotSerialized) {
+		}
+		/* Enable/disable all events.  */
+		Method (MHKC, 1, NotSerialized) {
 			 If (Arg0) {
 				Store (DHKN, EMSK)
 				Store (Ones, ETAB)
@@ -330,9 +330,9 @@ Device(EC)
 				Store (Zero, ETAB)
 			 }
 			 Store (Arg0, EN)
-	       }
-	       /* Enable/disable event.  */
-	       Method (MHKM, 2, NotSerialized) {
+		}
+		/* Enable/disable event.  */
+		Method (MHKM, 2, NotSerialized) {
 		    If (LLessEqual (Arg0, 0x20)) {
 				ShiftLeft (One, Subtract (Arg0, 1), Local0)
 				If (Arg1)
@@ -348,18 +348,18 @@ Device(EC)
 				     Store (DHKN, EMSK)
 				}
 		    }
-	       }
-	       /* Mask hotkey all. */
-	       Method (MHKA, 0, NotSerialized)
-	       {
+		}
+		/* Mask hotkey all. */
+		Method (MHKA, 0, NotSerialized)
+		{
 		    Return (0x07FFFFFF)
-	       }
-	       /* Version */
-	       Method (MHKV, 0, NotSerialized)
-	       {
+		}
+		/* Version */
+		Method (MHKV, 0, NotSerialized)
+		{
 		    Return (0x0100)
-	       }
-       }
+		}
+	}
 
 #include "ac.asl"
 #include "battery.asl"
diff --git a/src/ec/lenovo/h8/acpi/lid.asl b/src/ec/lenovo/h8/acpi/lid.asl
index 10c5a98..a8e17cb 100644
--- a/src/ec/lenovo/h8/acpi/lid.asl
+++ b/src/ec/lenovo/h8/acpi/lid.asl
@@ -16,7 +16,7 @@
 
 Field(ERAM, ByteAcc, NoLock, Preserve)
 {
-                Offset (0x32),
+		Offset (0x32),
 			    , 2,
 			WKLD, 1,
 		Offset (0x46),
diff --git a/src/ec/lenovo/h8/acpi/sleepbutton.asl b/src/ec/lenovo/h8/acpi/sleepbutton.asl
index 0517992..2f36c4b 100644
--- a/src/ec/lenovo/h8/acpi/sleepbutton.asl
+++ b/src/ec/lenovo/h8/acpi/sleepbutton.asl
@@ -25,7 +25,7 @@ Field(ERAM, ByteAcc, NoLock, Preserve)
 
 Device(SLPB)
 {
-        Name (_HID, EisaId ("PNP0C0E"))
+	Name (_HID, EisaId ("PNP0C0E"))
 	Method(_PRW, 0, NotSerialized)
 	{
 		Return (Package() { 0x18, 0x03 })
diff --git a/src/ec/lenovo/h8/acpi/thermal.asl b/src/ec/lenovo/h8/acpi/thermal.asl
index 3a3487d..2e95b69 100644
--- a/src/ec/lenovo/h8/acpi/thermal.asl
+++ b/src/ec/lenovo/h8/acpi/thermal.asl
@@ -23,11 +23,11 @@ Scope(\_TZ)
 		Multiply(Arg0, 10, Local0)
 		Add (Local0, 2732, Local0)
 		if (LLessEqual(Local0, 2732)) {
-		        Return (3000)
+			Return (3000)
 		}
 
 		if (LGreater(Local0, 4012)) {
-		        Return (3000)
+			Return (3000)
 		}
 		Return (Local0)
 	}
@@ -39,10 +39,10 @@ Scope(\_TZ)
 		}
 		Method(_TMP) {
 #if defined (EC_LENOVO_H8_ME_WORKAROUND)
-		        /* Avoid tripping alarm if ME isn't booted at all yet */
-		        If (LAnd (LNot (MEB1), LEqual (\_SB.PCI0.LPCB.EC.TMP0, 128))) {
-                            Return (C2K(40))
-                        }
+			/* Avoid tripping alarm if ME isn't booted at all yet */
+			If (LAnd (LNot (MEB1), LEqual (\_SB.PCI0.LPCB.EC.TMP0, 128))) {
+				Return (C2K(40))
+			}
 			Store (1, MEB1)
 #endif
 			Return (C2K(\_SB.PCI0.LPCB.EC.TMP0))
@@ -61,10 +61,10 @@ Scope(\_TZ)
 
 		Method(_TMP) {
 #if defined (EC_LENOVO_H8_ME_WORKAROUND)
-		        /* Avoid tripping alarm if ME isn't booted at all yet */
-		        If (LAnd (LNot (MEB2), LEqual (\_SB.PCI0.LPCB.EC.TMP1, 128))) {
-                            Return (C2K(40))
-                        }
+			/* Avoid tripping alarm if ME isn't booted at all yet */
+			If (LAnd (LNot (MEB2), LEqual (\_SB.PCI0.LPCB.EC.TMP1, 128))) {
+				Return (C2K(40))
+			}
 			Store (1, MEB2)
 #endif
 			Return (C2K(\_SB.PCI0.LPCB.EC.TMP1))
diff --git a/src/ec/quanta/ene_kb3940q/ec.c b/src/ec/quanta/ene_kb3940q/ec.c
index 5e4aa47..83768b1 100644
--- a/src/ec/quanta/ene_kb3940q/ec.c
+++ b/src/ec/quanta/ene_kb3940q/ec.c
@@ -154,7 +154,7 @@ static struct device_operations ops = {
 };
 
 static struct pnp_info pnp_dev_info[] = {
-        { &ops, 0, 0, { 0, 0 }, }
+	{ &ops, 0, 0, { 0, 0 }, }
 };
 
 static void enable_dev(struct device *dev)
diff --git a/src/ec/quanta/it8518/ec.c b/src/ec/quanta/it8518/ec.c
index af0849c..276f9c6 100644
--- a/src/ec/quanta/it8518/ec.c
+++ b/src/ec/quanta/it8518/ec.c
@@ -167,7 +167,7 @@ static struct device_operations ops = {
 };
 
 static struct pnp_info pnp_dev_info[] = {
-        { &ops, 0, 0, { 0, 0 }, }
+	{ &ops, 0, 0, { 0, 0 }, }
 };
 
 static void enable_dev(struct device *dev)



More information about the coreboot-gerrit mailing list