All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erik Schmauss <erik.schmauss@intel.com>
To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org
Cc: Bob Moore <robert.moore@intel.com>,
	Erik Schmauss <erik.schmauss@intel.com>
Subject: [PATCH 3/9] ACPICA: Macros: remove pointer math on a null pointer
Date: Fri, 16 Aug 2019 14:43:22 -0700	[thread overview]
Message-ID: <20190816214328.3900-4-erik.schmauss@intel.com> (raw)
In-Reply-To: <20190816214328.3900-1-erik.schmauss@intel.com>

From: Bob Moore <robert.moore@intel.com>

ACPICA commit 02bbca5070e42d298c9b824300aa0eb8a082d797

Causes warnings on some compilers and/or tools.
Changed ACPI_TO_POINTER to use ACPI_CAST_PTR instead of using
arithmetic.


Link: https://github.com/acpica/acpica/commit/02bbca50
Reported-by: Qian Cai <cai@lca.pw>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
---
 include/acpi/actypes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index e31ef75a22a1..f52c83eaedc4 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -506,7 +506,7 @@ typedef u64 acpi_integer;
 
 /* Pointer/Integer type conversions */
 
-#define ACPI_TO_POINTER(i)              ACPI_ADD_PTR (void, (void *) 0, (acpi_size) (i))
+#define ACPI_TO_POINTER(i)              ACPI_CAST_PTR (void, (acpi_size) (i))
 #define ACPI_TO_INTEGER(p)              ACPI_PTR_DIFF (p, (void *) 0)
 #define ACPI_OFFSET(d, f)               ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0)
 #define ACPI_PHYSADDR_TO_PTR(i)         ACPI_TO_POINTER(i)
-- 
2.17.2


  parent reply	other threads:[~2019-08-16 21:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 21:43 [PATCH 0/9] ACPICA 20190816 release Erik Schmauss
2019-08-16 21:43 ` [PATCH 1/9] ACPICA: Debugger: remove redundant assignment on obj_desc Erik Schmauss
2019-08-16 21:43 ` [PATCH 2/9] ACPICA: Increase total number of possible Owner IDs Erik Schmauss
2019-08-16 21:43 ` Erik Schmauss [this message]
2019-08-16 21:43 ` [PATCH 4/9] ACPICA: Fix issues with arg types within printf format strings Erik Schmauss
2019-08-16 21:43 ` [PATCH 5/9] ACPICA: iASL,acpi_dump: Improve y/n query Erik Schmauss
2019-08-16 21:43 ` [PATCH 6/9] ACPICA: Fully deploy ACPI_PRINTF_LIKE macro Macro was not being used across all "printf-like" functions. Also, cleanup all calls to such functions now that they are analyzed by the compiler (gcc). Both in 32-bit mode and 64-bit mode Erik Schmauss
2019-08-16 21:43 ` [PATCH 7/9] ACPICA: Differentiate Windows 8.1 from Windows 8 Erik Schmauss
2019-08-16 21:43 ` [PATCH 8/9] ACPICA: Add "Windows 2019" string to _OSI support Erik Schmauss
2019-08-16 21:43 ` [PATCH 9/9] ACPICA: Update version to 20190816 Erik Schmauss
2019-08-26  9:07 ` [PATCH 0/9] ACPICA 20190816 release Rafael J. Wysocki

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=20190816214328.3900-4-erik.schmauss@intel.com \
    --to=erik.schmauss@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.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.