Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35694332rwd; Mon, 10 Jul 2023 11:04:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlE7udSPX9rYredefghGUQwCEE2zto4O2CMH1MdJaylioixJvkw6K7p2MaUFAoX5qCVKK+lQ X-Received: by 2002:a05:6358:9910:b0:135:4003:784a with SMTP id w16-20020a056358991000b001354003784amr10131265rwa.19.1689012266760; Mon, 10 Jul 2023 11:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689012266; cv=none; d=google.com; s=arc-20160816; b=oj8gDIRtT4pSLncbLKjIGT9dgkngkOnFQuUwbfl/m3jfNNJLoGVqNuVeQLx6NItY5G OvLCzaIryucnGHcTIPLpYrDPxT7lKOJM5V7D1BUIS1EeEY2caRYv1xpY5VhIWE1+iTDQ NtGBXrT2I3GePObu49nC0jzWA7n7i82OodMpkOYR6EtfXYbsY2mEReol1nVc4NesJ677 EykBzMxM3UwUNsQw/mlg5H1uIIystm9KkdD8dVaix2mTQjqnLhZ44cFI+5SpJ+G7MW+p uW083tIBjl+iy+qixzmI3qG5iCQlSLyJIdi5PuN2bMdbjVb+uMZMZ8YkOSpT5zTIgQaJ agIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=7vihKffPUPaZb/Log3XBl4vHaqGAjJEXnKt3migA+og=; fh=odud58AEZ8dpT9wVpEi49z2KFyKsW9gCOcsWyWRzkG0=; b=ZmFhH5nN7lU6LV3sFoROx6emj5NURyS2+pGe1E2sdYjAJnumEphRHJhrp8RKU9QueO j9JTqOxMzn8o10/i7CjOvuC2rXEZcH8/v8Q+uzmjQf/g48CYbTFquJscqwanvZEqX8YX IkXjA6E05RK8MDiSDms3KOwBmSKyFfWjzq0fE6YPPmwANMOqpLyG1EgzawpOkyrnR8Nt txe/aCGywMeaVP8OQUF2HYBpihx+pW2o9j2waRiVIk5H1yLMBvvqKjjpOXeZbRQ8vMca 9h8yq40tunyNEkpBEUbgCBlA10lq/6E9vXd3FyhNP0RU6+dKaBRYizf5mDWLf1QW/t9n IyjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c4-20020a634e04000000b005440e9ee0b2si16263pgb.569.2023.07.10.11.04.12; Mon, 10 Jul 2023 11:04:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232506AbjGJRYV (ORCPT + 99 others); Mon, 10 Jul 2023 13:24:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232929AbjGJRXp (ORCPT ); Mon, 10 Jul 2023 13:23:45 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 483FEC4; Mon, 10 Jul 2023 10:23:43 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.2.0) id fbf52e4b15011c9f; Mon, 10 Jul 2023 19:23:41 +0200 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 36D34660DCF; Mon, 10 Jul 2023 19:23:41 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore , Saket Dumbre Subject: [PATCH 01/14] ACPICA: Fix GCC 12 dangling-pointer warning Date: Mon, 10 Jul 2023 19:11:30 +0200 Message-ID: <4851363.31r3eYUQgx@kreacher> In-Reply-To: <5698695.DvuYhMxLoT@kreacher> References: <5698695.DvuYhMxLoT@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrvdekgddutdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeegpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhmpdhrtghpthhtohepshgrkhgvthdrughumhgsrhgv sehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=4 Fuz1=4 Fuz2=4 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Philip Prindeville ACPICA commit aea0a5cfce262ce2ab16fd96d87c12cf5e756380 We're storing a persistent pointer to an ephemeral local variable which technically is a dangling pointer and the compiler is correct. However, since we never indirect the pointer, this is a safe operation and we can suppress the warning. Also, some C run-times (like MUSL) aren't including indirectly so we must include it explicitly or we won't have the type definition for uintptr_t. Link: https://github.com/acpica/acpica/commit/aea0a5cf Signed-off-by: Philip Prindeville Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/utdebug.c | 5 +++++ include/acpi/platform/aclinux.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c index 1bbba8585fa6..c5f6c85a3a09 100644 --- a/drivers/acpi/acpica/utdebug.c +++ b/drivers/acpi/acpica/utdebug.c @@ -37,7 +37,12 @@ void acpi_ut_init_stack_ptr_trace(void) { acpi_size current_sp; +#pragma GCC diagnostic push +#if defined(__GNUC__) && __GNUC__ >= 12 +#pragma GCC diagnostic ignored "-Wdangling-pointer=" +#endif acpi_gbl_entry_stack_pointer = ¤t_sp; +#pragma GCC diagnostic pop } /******************************************************************************* diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 1ca450e35c0d..565341c826e3 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -182,6 +182,7 @@ #ifdef ACPI_USE_STANDARD_HEADERS #include #include +#include #define ACPI_OFFSET(d, f) offsetof(d, f) #endif -- 2.35.3