From patchwork Fri Aug 16 21:43:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schmauss, Erik" X-Patchwork-Id: 11098303 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 074961395 for ; Fri, 16 Aug 2019 21:58:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC53128AA7 for ; Fri, 16 Aug 2019 21:58:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0982288D9; Fri, 16 Aug 2019 21:58:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AE2F28AA7 for ; Fri, 16 Aug 2019 21:58:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727748AbfHPV6d (ORCPT ); Fri, 16 Aug 2019 17:58:33 -0400 Received: from mga11.intel.com ([192.55.52.93]:56323 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727746AbfHPV6d (ORCPT ); Fri, 16 Aug 2019 17:58:33 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 14:58:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,394,1559545200"; d="scan'208";a="206381378" Received: from bartok.jf.intel.com ([10.54.75.137]) by fmsmga002.fm.intel.com with ESMTP; 16 Aug 2019 14:58:32 -0700 From: Erik Schmauss To: rjw@rjwysocki.net, linux-acpi@vger.kernel.org Cc: Bob Moore , Erik Schmauss Subject: [PATCH 3/9] ACPICA: Macros: remove pointer math on a null pointer Date: Fri, 16 Aug 2019 14:43:22 -0700 Message-Id: <20190816214328.3900-4-erik.schmauss@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190816214328.3900-1-erik.schmauss@intel.com> References: <20190816214328.3900-1-erik.schmauss@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bob Moore 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 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss --- 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)