All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	Bob Moore <robert.moore@intel.com>
Subject: [PATCH 02/31] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address.
Date: Mon, 13 Apr 2015 11:48:18 +0800	[thread overview]
Message-ID: <84b75a1f898e3f39a236f7f9e3e3652f4f6c799e.1428893936.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1428893935.git.lv.zheng@intel.com>

ACPICA commit 7d9fd64397d7c38899d3dc497525f6e6b044e0e3

OSPMs like Linux expect an acpi_physical_address returning value from
acpi_find_root_pointer(). This triggers warnings if sizeof (acpi_size) doesn't
equal to sizeof (acpi_physical_address):
  drivers/acpi/osl.c:275:3: warning: passing argument 1 of 'acpi_find_root_pointer' from incompatible pointer type [enabled by default]
  In file included from include/acpi/acpi.h:64:0,
                   from include/linux/acpi.h:36,
                   from drivers/acpi/osl.c:41:
  include/acpi/acpixf.h:433:1: note: expected 'acpi_size *' but argument is of type 'acpi_physical_address *'
This patch corrects acpi_find_root_pointer().

Link: https://github.com/acpica/acpica/commit/7d9fd643
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/tbxfroot.c |    7 ++++---
 include/acpi/acpixf.h          |   12 ++++++------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index e1416a2..fa76a36 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -142,7 +142,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp)
  *
  ******************************************************************************/
 
-acpi_status __init acpi_find_root_pointer(acpi_size * table_address)
+acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address)
 {
 	u8 *table_ptr;
 	u8 *mem_rover;
@@ -200,7 +200,8 @@ acpi_status __init acpi_find_root_pointer(acpi_size * table_address)
 			physical_address +=
 			    (u32) ACPI_PTR_DIFF(mem_rover, table_ptr);
 
-			*table_address = physical_address;
+			*table_address =
+			    (acpi_physical_address) physical_address;
 			return_ACPI_STATUS(AE_OK);
 		}
 	}
@@ -233,7 +234,7 @@ acpi_status __init acpi_find_root_pointer(acpi_size * table_address)
 		    (ACPI_HI_RSDP_WINDOW_BASE +
 		     ACPI_PTR_DIFF(mem_rover, table_ptr));
 
-		*table_address = physical_address;
+		*table_address = (acpi_physical_address) physical_address;
 		return_ACPI_STATUS(AE_OK);
 	}
 
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index d56f5d7..65aa4fa 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -431,13 +431,13 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
 
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
-			    acpi_find_root_pointer(acpi_size * rsdp_address))
-
+			    acpi_find_root_pointer(acpi_physical_address *
+						   rsdp_address))
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
-			    acpi_get_table_header(acpi_string signature,
-						  u32 instance,
-						  struct acpi_table_header
-						  *out_table_header))
+			     acpi_get_table_header(acpi_string signature,
+						   u32 instance,
+						   struct acpi_table_header
+						   *out_table_header))
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			     acpi_get_table(acpi_string signature, u32 instance,
 					    struct acpi_table_header
-- 
1.7.10

WARNING: multiple messages have this Message-ID (diff)
From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
	<linux-kernel@vger.kernel.org>,
	linux-acpi@vger.kernel.org, Bob Moore <robert.moore@intel.com>
Subject: [PATCH 02/31] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address.
Date: Mon, 13 Apr 2015 11:48:18 +0800	[thread overview]
Message-ID: <84b75a1f898e3f39a236f7f9e3e3652f4f6c799e.1428893936.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1428893935.git.lv.zheng@intel.com>

ACPICA commit 7d9fd64397d7c38899d3dc497525f6e6b044e0e3

OSPMs like Linux expect an acpi_physical_address returning value from
acpi_find_root_pointer(). This triggers warnings if sizeof (acpi_size) doesn't
equal to sizeof (acpi_physical_address):
  drivers/acpi/osl.c:275:3: warning: passing argument 1 of 'acpi_find_root_pointer' from incompatible pointer type [enabled by default]
  In file included from include/acpi/acpi.h:64:0,
                   from include/linux/acpi.h:36,
                   from drivers/acpi/osl.c:41:
  include/acpi/acpixf.h:433:1: note: expected 'acpi_size *' but argument is of type 'acpi_physical_address *'
This patch corrects acpi_find_root_pointer().

Link: https://github.com/acpica/acpica/commit/7d9fd643
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 drivers/acpi/acpica/tbxfroot.c |    7 ++++---
 include/acpi/acpixf.h          |   12 ++++++------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index e1416a2..fa76a36 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -142,7 +142,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp)
  *
  ******************************************************************************/
 
-acpi_status __init acpi_find_root_pointer(acpi_size * table_address)
+acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address)
 {
 	u8 *table_ptr;
 	u8 *mem_rover;
@@ -200,7 +200,8 @@ acpi_status __init acpi_find_root_pointer(acpi_size * table_address)
 			physical_address +=
 			    (u32) ACPI_PTR_DIFF(mem_rover, table_ptr);
 
-			*table_address = physical_address;
+			*table_address =
+			    (acpi_physical_address) physical_address;
 			return_ACPI_STATUS(AE_OK);
 		}
 	}
@@ -233,7 +234,7 @@ acpi_status __init acpi_find_root_pointer(acpi_size * table_address)
 		    (ACPI_HI_RSDP_WINDOW_BASE +
 		     ACPI_PTR_DIFF(mem_rover, table_ptr));
 
-		*table_address = physical_address;
+		*table_address = (acpi_physical_address) physical_address;
 		return_ACPI_STATUS(AE_OK);
 	}
 
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index d56f5d7..65aa4fa 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -431,13 +431,13 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
 
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
-			    acpi_find_root_pointer(acpi_size * rsdp_address))
-
+			    acpi_find_root_pointer(acpi_physical_address *
+						   rsdp_address))
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
-			    acpi_get_table_header(acpi_string signature,
-						  u32 instance,
-						  struct acpi_table_header
-						  *out_table_header))
+			     acpi_get_table_header(acpi_string signature,
+						   u32 instance,
+						   struct acpi_table_header
+						   *out_table_header))
 ACPI_EXTERNAL_RETURN_STATUS(acpi_status
 			     acpi_get_table(acpi_string signature, u32 instance,
 					    struct acpi_table_header
-- 
1.7.10


  parent reply	other threads:[~2015-04-13  3:48 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13  3:48 [PATCH 00/31] ACPICA: 20150410 Release Lv Zheng
2015-04-13  3:48 ` Lv Zheng
2015-04-13  3:48 ` [PATCH 01/31] ACPICA: Linuxize: Reduce divergences for 20150410 release Lv Zheng
2015-04-13  3:48   ` Lv Zheng
2015-04-13  3:48 ` Lv Zheng [this message]
2015-04-13  3:48   ` [PATCH 02/31] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address Lv Zheng
2015-04-13  3:48 ` [PATCH 03/31] ACPICA: Unix: Cleanup to use ACPI_TO_INTEGER() to calc page offset Lv Zheng
2015-04-13  3:48   ` Lv Zheng
2015-04-13  3:48 ` [PATCH 04/31] ACPICA: Executer: Cleanup to remove an unnecessary conversion Lv Zheng
2015-04-13  3:48   ` Lv Zheng
2015-04-13  3:48 ` [PATCH 05/31] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR() Lv Zheng
2015-04-13  3:48   ` Lv Zheng
2015-04-13  3:48 ` [PATCH 06/31] ACPICA: Utilities: Cleanup to convert physical address printing formats Lv Zheng
2015-04-13  3:48   ` Lv Zheng
2015-04-13  3:48 ` [PATCH 07/31] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers Lv Zheng
2015-04-13  3:48   ` Lv Zheng
2015-04-13  3:48 ` [PATCH 08/31] ACPICA: Utilities: split IO address types from data type models Lv Zheng
2015-04-13  3:48   ` Lv Zheng
2015-04-13  3:49 ` [PATCH 09/31] ACPICA: Tables: Don't release ACPI_MTX_TABLES in acpi_tb_install_standard_table() Lv Zheng
2015-04-13  3:49   ` Lv Zheng
2015-04-13  3:49 ` [PATCH 10/31] ACPICA: Events: Add support to return both enable/status register values for GPE and fixed event Lv Zheng
2015-04-13  3:49   ` Lv Zheng
2015-04-13  3:49 ` [PATCH 11/31] ACPICA: Applications: Remove use of __DATE__ macro Lv Zheng
2015-04-13  3:49   ` Lv Zheng
2015-04-13  3:49 ` [PATCH 12/31] ACPICA: Utilities: Remove unused acpi_ut_create_pkg_state_and_push() Lv Zheng
2015-04-13  3:49   ` Lv Zheng
2015-04-13  3:49 ` [PATCH 13/31] ACPICA: Tables: Move an iasl specific table function to iasl source file Lv Zheng
2015-04-13  3:49   ` Lv Zheng
2015-04-13  3:49 ` [PATCH 14/31] ACPICA: Utilities: Correct conditional compilation definitions Lv Zheng
2015-04-13  3:49   ` Lv Zheng
2015-04-13  3:49 ` [PATCH 15/31] ACPICA: Resources: " Lv Zheng
2015-04-13  3:49   ` Lv Zheng
2015-04-13  3:49 ` [PATCH 16/31] ACPICA: Casting changes around acpi_physical_address/acpi_size Lv Zheng
2015-04-13  3:49   ` Lv Zheng
2015-04-13  3:50 ` [PATCH 17/31] ACPICA: Fix a sscanf format string Lv Zheng
2015-04-13  3:50   ` Lv Zheng
2015-04-13  3:50 ` [PATCH 18/31] ACPICA: Update Resource descriptor dump module Lv Zheng
2015-04-13  3:50   ` Lv Zheng
2015-04-13  3:50 ` [PATCH 19/31] ACPICA: Update AML Debugger global variables Lv Zheng
2015-04-13  3:50   ` Lv Zheng
2015-04-13  3:50 ` [PATCH 20/31] ACPICA: iASL/Disassembler: Add option to assume table contains valid AML Lv Zheng
2015-04-13  3:50   ` Lv Zheng
2015-04-13  3:50 ` [PATCH 21/31] ACPICA: iASL: Enhancement for constant folding Lv Zheng
2015-04-13  3:50   ` Lv Zheng
2015-04-13  3:50 ` [PATCH 22/31] ACPICA: Add infrastructure for External() opcode Lv Zheng
2015-04-13  3:50   ` Lv Zheng
2015-04-13  3:50 ` [PATCH 23/31] ACPICA: Add "Windows 2015" string to _OSI support Lv Zheng
2015-04-13  3:50   ` Lv Zheng
2015-04-13  3:50 ` [PATCH 24/31] ACPICA: Permanently set _REV to the value '2' Lv Zheng
2015-04-13  3:50   ` Lv Zheng
2015-04-13  3:50 ` [PATCH 25/31] ACPICA: Remove unused internal AML opcode Lv Zheng
2015-04-13  3:50   ` Lv Zheng
2015-04-13  3:50 ` [PATCH 26/31] ACPICA: Add "//" before ascii output of buffers Lv Zheng
2015-04-13  3:50   ` Lv Zheng
2015-04-13  3:51 ` [PATCH 27/31] ACPICA: Update for SLIC ACPI table Lv Zheng
2015-04-13  3:51   ` Lv Zheng
2015-04-13  3:51 ` [PATCH 28/31] ACPICA: iASL: Add support for MSDM " Lv Zheng
2015-04-13  3:51   ` Lv Zheng
2015-04-13  3:51 ` [PATCH 29/31] ACPICA: Disassembler: Some cleanup of the table dump module Lv Zheng
2015-04-13  3:51   ` Lv Zheng
2015-04-13  3:51 ` [PATCH 30/31] ACPICA: Fix a couple issues with the local printf module Lv Zheng
2015-04-13  3:51   ` Lv Zheng
2015-04-13  3:51 ` [PATCH 31/31] ACPICA: Update version to 20150410 Lv Zheng
2015-04-13  3:51   ` Lv Zheng

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=84b75a1f898e3f39a236f7f9e3e3652f4f6c799e.1428893936.git.lv.zheng@intel.com \
    --to=lv.zheng@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@intel.com \
    --cc=zetalog@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.