src: Remove redundant use of ACPI offset(0)
IASL version 20180927 and greater, detects Unnecessary/redundant uses of the Offset() operator within a Field Unit list. It then sends a remark "^ Unnecessary/redundant use of Offset" example: OperationRegion (OPR1, SystemMemory, 0x100, 0x100) Field (OPR1) { Offset (0), // Never needed FLD1, 32, Offset (4), // Redundant, offset is already 4 (bytes) FLD2, 8, Offset (64), // OK use of Offset. FLD3, 16, } We will have those remarks: dsdt.asl 14: Offset (0), Remark 2158 - ^ Unnecessary/redundant use of Offset operator dsdt.asl 16: Offset (4), Remark 2158 - ^ Unnecessary/redundant use of Offset operator Change-Id: I260a79ef77025b4befbccc21f5999f89d90c1154 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43283 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
@@ -16,8 +16,7 @@ Device (EC0)
|
||||
Field (ERAM, ByteAcc, Lock, Preserve)
|
||||
{
|
||||
// EC Name Space Configuration
|
||||
Offset(0x00),
|
||||
, 1, // Reserved ; 00h.0
|
||||
, 1, // Reserved ; 00h.0
|
||||
LCDS, 1, // 1= BACKLIGHT ON , 0= BACKLIGHT OFF ; 00h.1
|
||||
, 6, // Reserved ; 00h.2 ~ 00h.6
|
||||
HTBN, 8, // HOTKEY_BUTTON_NUMBER ; 01h For ABO Hot Key Function
|
||||
|
@@ -31,7 +31,6 @@ Device (EC0)
|
||||
OperationRegion (ERAM, EmbeddedControl, 0x00, EC_ACPI_MEM_MAPPED_BEGIN)
|
||||
Field (ERAM, ByteAcc, Lock, Preserve)
|
||||
{
|
||||
Offset (0x00),
|
||||
RAMV, 8, // EC RAM Version
|
||||
TSTB, 8, // Test Byte
|
||||
TSTC, 8, // Complement of Test Byte
|
||||
|
@@ -4,7 +4,6 @@
|
||||
* EMEM data may be accessed through port 62/66 or through LPC at 900h.
|
||||
*/
|
||||
|
||||
Offset (0x00),
|
||||
TIN0, 8, // Temperature 0
|
||||
TIN1, 8, // Temperature 1
|
||||
TIN2, 8, // Temperature 2
|
||||
|
@@ -16,7 +16,7 @@ Device (EC0)
|
||||
OperationRegion(ERAM, EmbeddedControl, 0, 0xFF)
|
||||
Field (ERAM, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
Offset(0x00), // [Configuration Space 0]
|
||||
// [Configuration Space 0]
|
||||
, 1, // Reserved bit[0]
|
||||
ENGA, 1, // Enable Global attention
|
||||
ENHY, 1, // Enable Hotkey function
|
||||
|
@@ -14,7 +14,6 @@ Device (EC0)
|
||||
OperationRegion(ERAM, EmbeddedControl, 0, 0xFF)
|
||||
Field (ERAM, ByteAcc, NoLock, Preserve)
|
||||
{
|
||||
Offset(0x00), // [Configuration Space 0x0]
|
||||
Offset(0x02), // [Configuration Space 0x2]
|
||||
B0ST, 16, // Battery 0 State
|
||||
B0FC, 16, // Battery 0 Last Full Charge Capacity
|
||||
|
Reference in New Issue
Block a user