From: "George G. Davis" <ggdavisiv@gmail.com>
To: stable@vger.kernel.org
Cc: Dirk Behme <dirk.behme@gmail.com>, Lv Zheng <lv.zheng@intel.com>,
Bob Moore <robert.moore@intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"George G. Davis" <george_davis@mentor.com>
Subject: [PATCH 2/4] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR().
Date: Tue, 12 May 2015 17:28:20 -0400 [thread overview]
Message-ID: <1431466102-8276-3-git-send-email-ggdavisiv@gmail.com> (raw)
In-Reply-To: <1431466102-8276-1-git-send-email-ggdavisiv@gmail.com>
From: Lv Zheng <lv.zheng@intel.com>
commit 6d3fd3cc33d50e4c0d0c0bd172de02caaec3127c upstream.
ACPICA commit 154f6d074dd38d6ebc0467ad454454e6c5c9ecdf
There are code pieces converting pointers using "(acpi_physical_address) x"
or "ACPI_CAST_PTR (t, x)" formats, this patch cleans up them.
Known issues:
1. Cleanup of "(ACPI_PHYSICAL_ADDRRESS) x" for a table field
For the conversions around the table fields, it is better to fix it with
alignment also fixed. So this patch doesn't modify such code. There
should be no functional problem by leaving them unchanged.
Link: https://github.com/acpica/acpica/commit/154f6d07
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: George G. Davis <george_davis@mentor.com>
---
drivers/acpi/acpica/dsopcode.c | 3 +--
drivers/acpi/acpica/tbinstal.c | 5 ++---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index 5205edc..cbf36b0 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -539,8 +539,7 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,
return_ACPI_STATUS(AE_NOT_EXIST);
}
- obj_desc->region.address =
- (acpi_physical_address) ACPI_TO_INTEGER(table);
+ obj_desc->region.address = ACPI_PTR_TO_PHYSADDR(table);
obj_desc->region.length = table->length;
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 634357d..c4d0977 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -294,8 +294,7 @@ struct acpi_table_header *acpi_tb_table_override(struct acpi_table_header
ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
"%4.4s %p Attempted physical table override failed",
table_header->signature,
- ACPI_CAST_PTR(void,
- table_desc->address)));
+ ACPI_PHYSADDR_TO_PTR(table_desc->address)));
return (NULL);
}
@@ -311,7 +310,7 @@ finish_override:
ACPI_INFO((AE_INFO,
"%4.4s %p %s table override, new table: %p",
table_header->signature,
- ACPI_CAST_PTR(void, table_desc->address),
+ ACPI_PHYSADDR_TO_PTR(table_desc->address),
override_type, new_table));
/* We can now unmap/delete the original table (if fully mapped) */
--
1.9.3
next prev parent reply other threads:[~2015-05-12 21:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 21:28 [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings George G. Davis
2015-05-12 21:28 ` [PATCH 1/4] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address George G. Davis
2015-05-15 1:43 ` Greg KH
2015-05-15 15:01 ` George G. Davis
2015-05-12 21:28 ` George G. Davis [this message]
2015-05-12 21:28 ` [PATCH 3/4] ACPICA: Utilities: Cleanup to convert physical address printing formats George G. Davis
2015-05-15 20:41 ` Greg KH
2015-05-18 19:39 ` [PATCH 3.10 v2 1/2] " George G. Davis
2015-05-18 19:39 ` [PATCH 3.10 v2 2/2] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers George G. Davis
2015-05-12 21:28 ` [PATCH 4/4] " George G. Davis
2015-05-15 20:46 ` Greg KH
2015-05-19 10:57 ` [PATCH 0/4] Fix v3.14.41 ARCH=i386 ACPI build warnings Luis Henriques
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431466102-8276-3-git-send-email-ggdavisiv@gmail.com \
--to=ggdavisiv@gmail.com \
--cc=dirk.behme@gmail.com \
--cc=george_davis@mentor.com \
--cc=lv.zheng@intel.com \
--cc=rafael.j.wysocki@intel.com \
--cc=robert.moore@intel.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox