Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/28988 )
Change subject: mb/*/*: Clean up FADT checksum assignment ......................................................................
mb/*/*: Clean up FADT checksum assignment
The assignment of header->checksum was in some cases done twice, or unnecessarily split into two lines.
Change-Id: Ib0c0890d7589e6a24b11e9bda10e6969c7d73c56 Signed-off-by: Jonathan Neuschäfer j.neuschaefer@gmx.net Reviewed-on: https://review.coreboot.org/28988 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Marc Jones marc@marcjonesconsulting.com --- M src/mainboard/adi/rcc-dff/fadt.c M src/mainboard/aopen/dxplplusu/fadt.c M src/mainboard/emulation/qemu-q35/acpi_tables.c M src/mainboard/esd/atom15/fadt.c M src/mainboard/facebook/watson/fadt.c M src/mainboard/google/auron/fadt.c M src/mainboard/google/beltino/fadt.c M src/mainboard/google/cyan/fadt.c M src/mainboard/google/jecht/fadt.c M src/mainboard/google/rambi/fadt.c M src/mainboard/google/slippy/fadt.c M src/mainboard/intel/baskingridge/fadt.c M src/mainboard/intel/bayleybay_fsp/fadt.c M src/mainboard/intel/camelbackmountain_fsp/fadt.c M src/mainboard/intel/littleplains/fadt.c M src/mainboard/intel/minnowmax/fadt.c M src/mainboard/intel/mohonpeak/fadt.c M src/mainboard/intel/strago/fadt.c M src/mainboard/intel/wtm2/fadt.c M src/mainboard/lenovo/t400/fadt.c M src/mainboard/lenovo/x200/fadt.c M src/mainboard/ocp/monolake/fadt.c M src/mainboard/ocp/wedge100s/fadt.c M src/mainboard/opencellular/rotundu/fadt.c M src/mainboard/roda/rk9/fadt.c M src/mainboard/siemens/mc_bdx1/fadt.c M src/mainboard/siemens/mc_tcu3/fadt.c 27 files changed, 26 insertions(+), 70 deletions(-)
Approvals: build bot (Jenkins): Verified Marc Jones: Looks good to me, approved
diff --git a/src/mainboard/adi/rcc-dff/fadt.c b/src/mainboard/adi/rcc-dff/fadt.c index 83adf85..cc88e58 100644 --- a/src/mainboard/adi/rcc-dff/fadt.c +++ b/src/mainboard/adi/rcc-dff/fadt.c @@ -30,9 +30,7 @@
#if PLATFORM_HAS_FADT_CUSTOMIZATIONS - header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); #endif
} diff --git a/src/mainboard/aopen/dxplplusu/fadt.c b/src/mainboard/aopen/dxplplusu/fadt.c index 9e44b85..b78a3ed 100644 --- a/src/mainboard/aopen/dxplplusu/fadt.c +++ b/src/mainboard/aopen/dxplplusu/fadt.c @@ -157,6 +157,5 @@ fadt->x_gpe1_blk.addrl = 0x0; fadt->x_gpe1_blk.addrh = 0x0;
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/emulation/qemu-q35/acpi_tables.c b/src/mainboard/emulation/qemu-q35/acpi_tables.c index 83d25d7..5a36cb1 100644 --- a/src/mainboard/emulation/qemu-q35/acpi_tables.c +++ b/src/mainboard/emulation/qemu-q35/acpi_tables.c @@ -170,8 +170,7 @@ fadt->x_gpe1_blk.addrl = 0x0; fadt->x_gpe1_blk.addrh = 0x0;
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); }
unsigned long acpi_fill_madt(unsigned long current) diff --git a/src/mainboard/esd/atom15/fadt.c b/src/mainboard/esd/atom15/fadt.c index 36e4655..49e0d30 100644 --- a/src/mainboard/esd/atom15/fadt.c +++ b/src/mainboard/esd/atom15/fadt.c @@ -25,8 +25,5 @@
/* Platform specific customizations go here */
- header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); - + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); } diff --git a/src/mainboard/facebook/watson/fadt.c b/src/mainboard/facebook/watson/fadt.c index a762227..5af6056 100644 --- a/src/mainboard/facebook/watson/fadt.c +++ b/src/mainboard/facebook/watson/fadt.c @@ -23,6 +23,5 @@
/* Platform specific customizations go here */
- header->checksum = 0; header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); } diff --git a/src/mainboard/google/auron/fadt.c b/src/mainboard/google/auron/fadt.c index c96ae68..9ee5c95 100644 --- a/src/mainboard/google/auron/fadt.c +++ b/src/mainboard/google/auron/fadt.c @@ -42,6 +42,5 @@
acpi_fill_in_fadt(fadt);
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/google/beltino/fadt.c b/src/mainboard/google/beltino/fadt.c index 806902d..5c2cafd 100644 --- a/src/mainboard/google/beltino/fadt.c +++ b/src/mainboard/google/beltino/fadt.c @@ -147,6 +147,5 @@ fadt->x_gpe1_blk.addrl = 0x0; fadt->x_gpe1_blk.addrh = 0x0;
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/google/cyan/fadt.c b/src/mainboard/google/cyan/fadt.c index 29e2d2a..7455d4b 100644 --- a/src/mainboard/google/cyan/fadt.c +++ b/src/mainboard/google/cyan/fadt.c @@ -42,6 +42,5 @@
acpi_fill_in_fadt(fadt);
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/google/jecht/fadt.c b/src/mainboard/google/jecht/fadt.c index c96ae68..9ee5c95 100644 --- a/src/mainboard/google/jecht/fadt.c +++ b/src/mainboard/google/jecht/fadt.c @@ -42,6 +42,5 @@
acpi_fill_in_fadt(fadt);
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/google/rambi/fadt.c b/src/mainboard/google/rambi/fadt.c index 4aa4ec6..d02609b 100644 --- a/src/mainboard/google/rambi/fadt.c +++ b/src/mainboard/google/rambi/fadt.c @@ -41,6 +41,5 @@
acpi_fill_in_fadt(fadt);
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/google/slippy/fadt.c b/src/mainboard/google/slippy/fadt.c index 8a04591..52a099f 100644 --- a/src/mainboard/google/slippy/fadt.c +++ b/src/mainboard/google/slippy/fadt.c @@ -147,6 +147,5 @@ fadt->x_gpe1_blk.addrl = 0x0; fadt->x_gpe1_blk.addrh = 0x0;
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/intel/baskingridge/fadt.c b/src/mainboard/intel/baskingridge/fadt.c index e32e9f2..54e95f8 100644 --- a/src/mainboard/intel/baskingridge/fadt.c +++ b/src/mainboard/intel/baskingridge/fadt.c @@ -147,6 +147,5 @@ fadt->x_gpe1_blk.addrl = 0x0; fadt->x_gpe1_blk.addrh = 0x0;
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/intel/bayleybay_fsp/fadt.c b/src/mainboard/intel/bayleybay_fsp/fadt.c index 8e8de51..8fee54b 100644 --- a/src/mainboard/intel/bayleybay_fsp/fadt.c +++ b/src/mainboard/intel/bayleybay_fsp/fadt.c @@ -25,7 +25,5 @@
/* Platform specific customizations go here */
- header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); } diff --git a/src/mainboard/intel/camelbackmountain_fsp/fadt.c b/src/mainboard/intel/camelbackmountain_fsp/fadt.c index b274531..5af6056 100644 --- a/src/mainboard/intel/camelbackmountain_fsp/fadt.c +++ b/src/mainboard/intel/camelbackmountain_fsp/fadt.c @@ -23,7 +23,5 @@
/* Platform specific customizations go here */
- header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); } diff --git a/src/mainboard/intel/littleplains/fadt.c b/src/mainboard/intel/littleplains/fadt.c index 83adf85..3d8db00 100644 --- a/src/mainboard/intel/littleplains/fadt.c +++ b/src/mainboard/intel/littleplains/fadt.c @@ -30,9 +30,6 @@
#if PLATFORM_HAS_FADT_CUSTOMIZATIONS - header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); #endif - } diff --git a/src/mainboard/intel/minnowmax/fadt.c b/src/mainboard/intel/minnowmax/fadt.c index cd8eefd..4194bfc 100644 --- a/src/mainboard/intel/minnowmax/fadt.c +++ b/src/mainboard/intel/minnowmax/fadt.c @@ -25,8 +25,5 @@
/* Platform specific customizations go here */
- header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); - + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); } diff --git a/src/mainboard/intel/mohonpeak/fadt.c b/src/mainboard/intel/mohonpeak/fadt.c index 83adf85..3d8db00 100644 --- a/src/mainboard/intel/mohonpeak/fadt.c +++ b/src/mainboard/intel/mohonpeak/fadt.c @@ -30,9 +30,6 @@
#if PLATFORM_HAS_FADT_CUSTOMIZATIONS - header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); #endif - } diff --git a/src/mainboard/intel/strago/fadt.c b/src/mainboard/intel/strago/fadt.c index af222b5..e0e7d44 100644 --- a/src/mainboard/intel/strago/fadt.c +++ b/src/mainboard/intel/strago/fadt.c @@ -42,6 +42,5 @@
acpi_fill_in_fadt(fadt);
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/intel/wtm2/fadt.c b/src/mainboard/intel/wtm2/fadt.c index d474fc4..6f1553c 100644 --- a/src/mainboard/intel/wtm2/fadt.c +++ b/src/mainboard/intel/wtm2/fadt.c @@ -41,6 +41,5 @@
acpi_fill_in_fadt(fadt);
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/lenovo/t400/fadt.c b/src/mainboard/lenovo/t400/fadt.c index fe988d6..5596115 100644 --- a/src/mainboard/lenovo/t400/fadt.c +++ b/src/mainboard/lenovo/t400/fadt.c @@ -148,6 +148,5 @@ fadt->x_gpe1_blk.addrl = 0x0; fadt->x_gpe1_blk.addrh = 0x0;
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/lenovo/x200/fadt.c b/src/mainboard/lenovo/x200/fadt.c index fe988d6..5596115 100644 --- a/src/mainboard/lenovo/x200/fadt.c +++ b/src/mainboard/lenovo/x200/fadt.c @@ -148,6 +148,5 @@ fadt->x_gpe1_blk.addrl = 0x0; fadt->x_gpe1_blk.addrh = 0x0;
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/ocp/monolake/fadt.c b/src/mainboard/ocp/monolake/fadt.c index b274531..5af6056 100644 --- a/src/mainboard/ocp/monolake/fadt.c +++ b/src/mainboard/ocp/monolake/fadt.c @@ -23,7 +23,5 @@
/* Platform specific customizations go here */
- header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); } diff --git a/src/mainboard/ocp/wedge100s/fadt.c b/src/mainboard/ocp/wedge100s/fadt.c index b274531..5af6056 100644 --- a/src/mainboard/ocp/wedge100s/fadt.c +++ b/src/mainboard/ocp/wedge100s/fadt.c @@ -23,7 +23,5 @@
/* Platform specific customizations go here */
- header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); } diff --git a/src/mainboard/opencellular/rotundu/fadt.c b/src/mainboard/opencellular/rotundu/fadt.c index cd8eefd..4194bfc 100644 --- a/src/mainboard/opencellular/rotundu/fadt.c +++ b/src/mainboard/opencellular/rotundu/fadt.c @@ -25,8 +25,5 @@
/* Platform specific customizations go here */
- header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); - + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); } diff --git a/src/mainboard/roda/rk9/fadt.c b/src/mainboard/roda/rk9/fadt.c index fe988d6..5596115 100644 --- a/src/mainboard/roda/rk9/fadt.c +++ b/src/mainboard/roda/rk9/fadt.c @@ -148,6 +148,5 @@ fadt->x_gpe1_blk.addrl = 0x0; fadt->x_gpe1_blk.addrh = 0x0;
- header->checksum = - acpi_checksum((void *) fadt, header->length); + header->checksum = acpi_checksum((void *) fadt, header->length); } diff --git a/src/mainboard/siemens/mc_bdx1/fadt.c b/src/mainboard/siemens/mc_bdx1/fadt.c index b274531..5af6056 100644 --- a/src/mainboard/siemens/mc_bdx1/fadt.c +++ b/src/mainboard/siemens/mc_bdx1/fadt.c @@ -23,7 +23,5 @@
/* Platform specific customizations go here */
- header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); } diff --git a/src/mainboard/siemens/mc_tcu3/fadt.c b/src/mainboard/siemens/mc_tcu3/fadt.c index 8e8de51..8fee54b 100644 --- a/src/mainboard/siemens/mc_tcu3/fadt.c +++ b/src/mainboard/siemens/mc_tcu3/fadt.c @@ -25,7 +25,5 @@
/* Platform specific customizations go here */
- header->checksum = 0; - header->checksum = - acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); + header->checksum = acpi_checksum((void *) fadt, sizeof(acpi_fadt_t)); }