Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932416AbbEUCbt (ORCPT ); Wed, 20 May 2015 22:31:49 -0400 Received: from mga03.intel.com ([134.134.136.65]:49923 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932300AbbEUCbm (ORCPT ); Wed, 20 May 2015 22:31:42 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,466,1427785200"; d="scan'208";a="713418867" From: Lv Zheng To: "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , , linux-acpi@vger.kernel.org, Bob Moore Subject: [PATCH 13/19] ACPICA: ACPI 6.0: Add ACPI_SUB_PTR(). Date: Thu, 21 May 2015 10:31:24 +0800 Message-Id: X-Mailer: git-send-email 1.7.10 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1466 Lines: 34 ACPICA commit 5de82757aef5d6163e37064033aacbce193abbca Using a minus number with ACPI_ADD_PTR() will cause compiler warnings, such warnings cannot be eliminated by force casting an unsigned value to a signed value. This patch thus introduces ACPI_SUB_PTR() to be used with minus numbers. Lv Zheng. Link: https://github.com/acpica/acpica/commit/5de82757 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore --- include/acpi/actypes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index a9d33e8..63fd7f5 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -525,6 +525,7 @@ typedef u64 acpi_integer; #define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p)) #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (acpi_uintptr_t) (p)) #define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8, (a)) + (acpi_size)(b))) +#define ACPI_SUB_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8, (a)) - (acpi_size)(b))) #define ACPI_PTR_DIFF(a, b) (acpi_size) (ACPI_CAST_PTR (u8, (a)) - ACPI_CAST_PTR (u8, (b))) /* Pointer/Integer type conversions */ -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/