From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53B29C3F68F for ; Fri, 14 Feb 2020 19:08:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F19F2168B for ; Fri, 14 Feb 2020 19:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388097AbgBNTI1 (ORCPT ); Fri, 14 Feb 2020 14:08:27 -0500 Received: from mga02.intel.com ([134.134.136.20]:26791 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388080AbgBNTI1 (ORCPT ); Fri, 14 Feb 2020 14:08:27 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2020 11:08:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,441,1574150400"; d="scan'208";a="227702899" Received: from sibelius.jf.intel.com ([10.54.75.38]) by orsmga008.jf.intel.com with ESMTP; 14 Feb 2020 11:08:24 -0800 From: Erik Kaneda To: "Rafael J . Wysocki" , linux-acpi@vger.kernel.org Cc: Sven Barth , Bob Moore , Erik Kaneda Subject: [PATCH 06/10] ACPICA: cast the result of the pointer difference to u32 Date: Fri, 14 Feb 2020 10:48:00 -0800 Message-Id: <20200214184804.15114-7-erik.kaneda@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200214184804.15114-1-erik.kaneda@intel.com> References: <20200214184804.15114-1-erik.kaneda@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Sven Barth Altnatively we could declare aml_length as acpi_size, but then one would need to cast at the assignment for method_obj->method.aml_length ACPICA commit 72805936603fcf84e98f1b89bf99b5101af27fb8 Link: https://github.com/acpica/acpica/commit/72805936 Signed-off-by: Sven Barth Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda --- drivers/acpi/acpica/nsxfname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c index 984129dcaa0c..0e6aba81605b 100644 --- a/drivers/acpi/acpica/nsxfname.c +++ b/drivers/acpi/acpica/nsxfname.c @@ -516,7 +516,7 @@ acpi_status acpi_install_method(u8 *buffer) method_flags = *parser_state.aml++; aml_start = parser_state.aml; - aml_length = ACPI_PTR_DIFF(parser_state.pkg_end, aml_start); + aml_length = (u32)ACPI_PTR_DIFF(parser_state.pkg_end, aml_start); /* * Allocate resources up-front. We don't want to have to delete a new -- 2.21.0