aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/tables')
-rw-r--r--drivers/acpi/tables/tbconvrt.c4
-rw-r--r--drivers/acpi/tables/tbgetall.c4
-rw-r--r--drivers/acpi/tables/tbutils.c8
3 files changed, 10 insertions, 6 deletions
diff --git a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c
index a03939399fa9..cd33397d9231 100644
--- a/drivers/acpi/tables/tbconvrt.c
+++ b/drivers/acpi/tables/tbconvrt.c
@@ -554,7 +554,9 @@ acpi_status acpi_tb_convert_table_fadt(void)
554 ACPI_DEBUG_PRINT((ACPI_DB_TABLES, 554 ACPI_DEBUG_PRINT((ACPI_DB_TABLES,
555 "Hex dump of common internal FADT, size %d (%X)\n", 555 "Hex dump of common internal FADT, size %d (%X)\n",
556 acpi_gbl_FADT->length, acpi_gbl_FADT->length)); 556 acpi_gbl_FADT->length, acpi_gbl_FADT->length));
557 ACPI_DUMP_BUFFER((u8 *) (acpi_gbl_FADT), acpi_gbl_FADT->length); 557
558 ACPI_DUMP_BUFFER(ACPI_CAST_PTR(u8, acpi_gbl_FADT),
559 acpi_gbl_FADT->length);
558 560
559 return_ACPI_STATUS(AE_OK); 561 return_ACPI_STATUS(AE_OK);
560} 562}
diff --git a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c
index 8d72343537e7..33c9ed8a6f99 100644
--- a/drivers/acpi/tables/tbgetall.c
+++ b/drivers/acpi/tables/tbgetall.c
@@ -292,7 +292,9 @@ acpi_status acpi_tb_get_required_tables(void)
292 "Hex dump of entire DSDT, size %d (0x%X), Integer width = %d\n", 292 "Hex dump of entire DSDT, size %d (0x%X), Integer width = %d\n",
293 acpi_gbl_DSDT->length, acpi_gbl_DSDT->length, 293 acpi_gbl_DSDT->length, acpi_gbl_DSDT->length,
294 acpi_gbl_integer_bit_width)); 294 acpi_gbl_integer_bit_width));
295 ACPI_DUMP_BUFFER((u8 *) acpi_gbl_DSDT, acpi_gbl_DSDT->length); 295
296 ACPI_DUMP_BUFFER(ACPI_CAST_PTR(u8, acpi_gbl_DSDT),
297 acpi_gbl_DSDT->length);
296 298
297 /* Always delete the RSDP mapping, we are done with it */ 299 /* Always delete the RSDP mapping, we are done with it */
298 300
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c
index e6dfe688b76b..9d0bf536d674 100644
--- a/drivers/acpi/tables/tbutils.c
+++ b/drivers/acpi/tables/tbutils.c
@@ -240,16 +240,16 @@ acpi_tb_verify_table_checksum(struct acpi_table_header * table_header)
240 240
241u8 acpi_tb_generate_checksum(void *buffer, u32 length) 241u8 acpi_tb_generate_checksum(void *buffer, u32 length)
242{ 242{
243 const u8 *limit; 243 u8 *end_buffer;
244 const u8 *rover; 244 u8 *rover;
245 u8 sum = 0; 245 u8 sum = 0;
246 246
247 if (buffer && length) { 247 if (buffer && length) {
248 /* Buffer and Length are valid */ 248 /* Buffer and Length are valid */
249 249
250 limit = (u8 *) buffer + length; 250 end_buffer = ACPI_ADD_PTR(u8, buffer, length);
251 251
252 for (rover = buffer; rover < limit; rover++) { 252 for (rover = buffer; rover < end_buffer; rover++) {
253 sum = (u8) (sum + *rover); 253 sum = (u8) (sum + *rover);
254 } 254 }
255 } 255 }