diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2018-10-10 14:22:48 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-10-17 12:01:06 +0000 |
commit | e1de6482d05509f8109c97ff2cd4270dddde1012 (patch) | |
tree | 7ebd1ad67f47be694a48e1fece360bc076c557fa /src | |
parent | 9814f8f037d4735f2f45b586c20573238d659b31 (diff) |
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>
Diffstat (limited to 'src')
27 files changed, 26 insertions, 70 deletions
diff --git a/src/mainboard/adi/rcc-dff/fadt.c b/src/mainboard/adi/rcc-dff/fadt.c index 83adf8524d..cc88e58351 100644 --- a/src/mainboard/adi/rcc-dff/fadt.c +++ b/src/mainboard/adi/rcc-dff/fadt.c @@ -30,9 +30,7 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) #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 9e44b85d6c..b78a3ed9e3 100644 --- a/src/mainboard/aopen/dxplplusu/fadt.c +++ b/src/mainboard/aopen/dxplplusu/fadt.c @@ -157,6 +157,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 83d25d75c3..5a36cb141c 100644 --- a/src/mainboard/emulation/qemu-q35/acpi_tables.c +++ b/src/mainboard/emulation/qemu-q35/acpi_tables.c @@ -170,8 +170,7 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 36e4655a32..49e0d30264 100644 --- a/src/mainboard/esd/atom15/fadt.c +++ b/src/mainboard/esd/atom15/fadt.c @@ -25,8 +25,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) /* 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 a7622277b0..5af6056b49 100644 --- a/src/mainboard/facebook/watson/fadt.c +++ b/src/mainboard/facebook/watson/fadt.c @@ -23,6 +23,5 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt) /* 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 c96ae68798..9ee5c952e1 100644 --- a/src/mainboard/google/auron/fadt.c +++ b/src/mainboard/google/auron/fadt.c @@ -42,6 +42,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 806902da9f..5c2cafdebc 100644 --- a/src/mainboard/google/beltino/fadt.c +++ b/src/mainboard/google/beltino/fadt.c @@ -147,6 +147,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 29e2d2aa5e..7455d4b87d 100644 --- a/src/mainboard/google/cyan/fadt.c +++ b/src/mainboard/google/cyan/fadt.c @@ -42,6 +42,5 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt) 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 c96ae68798..9ee5c952e1 100644 --- a/src/mainboard/google/jecht/fadt.c +++ b/src/mainboard/google/jecht/fadt.c @@ -42,6 +42,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 4aa4ec6817..d02609bb84 100644 --- a/src/mainboard/google/rambi/fadt.c +++ b/src/mainboard/google/rambi/fadt.c @@ -41,6 +41,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 8a04591a47..52a099f5f9 100644 --- a/src/mainboard/google/slippy/fadt.c +++ b/src/mainboard/google/slippy/fadt.c @@ -147,6 +147,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 e32e9f2915..54e95f8e98 100644 --- a/src/mainboard/intel/baskingridge/fadt.c +++ b/src/mainboard/intel/baskingridge/fadt.c @@ -147,6 +147,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 8e8de51668..8fee54b63e 100644 --- a/src/mainboard/intel/bayleybay_fsp/fadt.c +++ b/src/mainboard/intel/bayleybay_fsp/fadt.c @@ -25,7 +25,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) /* 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 b274531ca6..5af6056b49 100644 --- a/src/mainboard/intel/camelbackmountain_fsp/fadt.c +++ b/src/mainboard/intel/camelbackmountain_fsp/fadt.c @@ -23,7 +23,5 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt) /* 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 83adf8524d..3d8db00f9f 100644 --- a/src/mainboard/intel/littleplains/fadt.c +++ b/src/mainboard/intel/littleplains/fadt.c @@ -30,9 +30,6 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) #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 cd8eefdd67..4194bfc324 100644 --- a/src/mainboard/intel/minnowmax/fadt.c +++ b/src/mainboard/intel/minnowmax/fadt.c @@ -25,8 +25,5 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt) /* 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 83adf8524d..3d8db00f9f 100644 --- a/src/mainboard/intel/mohonpeak/fadt.c +++ b/src/mainboard/intel/mohonpeak/fadt.c @@ -30,9 +30,6 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) #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 af222b5ade..e0e7d4473e 100644 --- a/src/mainboard/intel/strago/fadt.c +++ b/src/mainboard/intel/strago/fadt.c @@ -42,6 +42,5 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt) 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 d474fc488e..6f1553c004 100644 --- a/src/mainboard/intel/wtm2/fadt.c +++ b/src/mainboard/intel/wtm2/fadt.c @@ -41,6 +41,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 fe988d63fb..5596115f42 100644 --- a/src/mainboard/lenovo/t400/fadt.c +++ b/src/mainboard/lenovo/t400/fadt.c @@ -148,6 +148,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 fe988d63fb..5596115f42 100644 --- a/src/mainboard/lenovo/x200/fadt.c +++ b/src/mainboard/lenovo/x200/fadt.c @@ -148,6 +148,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 b274531ca6..5af6056b49 100644 --- a/src/mainboard/ocp/monolake/fadt.c +++ b/src/mainboard/ocp/monolake/fadt.c @@ -23,7 +23,5 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt) /* 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 b274531ca6..5af6056b49 100644 --- a/src/mainboard/ocp/wedge100s/fadt.c +++ b/src/mainboard/ocp/wedge100s/fadt.c @@ -23,7 +23,5 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt) /* 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 cd8eefdd67..4194bfc324 100644 --- a/src/mainboard/opencellular/rotundu/fadt.c +++ b/src/mainboard/opencellular/rotundu/fadt.c @@ -25,8 +25,5 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt) /* 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 fe988d63fb..5596115f42 100644 --- a/src/mainboard/roda/rk9/fadt.c +++ b/src/mainboard/roda/rk9/fadt.c @@ -148,6 +148,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) 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 b274531ca6..5af6056b49 100644 --- a/src/mainboard/siemens/mc_bdx1/fadt.c +++ b/src/mainboard/siemens/mc_bdx1/fadt.c @@ -23,7 +23,5 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt) /* 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 8e8de51668..8fee54b63e 100644 --- a/src/mainboard/siemens/mc_tcu3/fadt.c +++ b/src/mainboard/siemens/mc_tcu3/fadt.c @@ -25,7 +25,5 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt) /* 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)); } |