Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4937622rdb; Tue, 12 Dec 2023 13:50:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJa726BScZi5Tzwjuug8/Eckcr89SHCLtmanVDWFZsgpzCp3wqhVRYgLwmxn14xSfknJGa X-Received: by 2002:a05:6a20:7344:b0:18f:97c:4f46 with SMTP id v4-20020a056a20734400b0018f097c4f46mr4331403pzc.82.1702417848595; Tue, 12 Dec 2023 13:50:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702417848; cv=none; d=google.com; s=arc-20160816; b=uSioPtGp9akNJAKY5qS8Tpvriq3KlRSNwcpFa9L64xeoU3m0SG1+3nkxg4TW7a8twD 6qCo51Kk+jIDNyDntptDLSZKY9O0BwX9JIp1KNU8kizXCGiqklboxosFarts2Pzn69q8 yxda91QYsJpaMwdhZ3kTIYP8JMigNv+TeMGLz5dnR07mvI7b9xOk9voiMLVIli4s88Qt JRcbWQAENtMZ/F/NLCHUU/XVqyX4YreyyNrMamttO+cH5sYI9mUqgSSko2JAtD+LxkDc 5Pm5SHxG61lVyhW/TAkmi/jOHzVsut3D1yLTWym4Iws+fRAWrasqcCGk4jL48tUOEmYT gEmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3uClximZzwnb18RG7C6YTRkXGc3v0rEsvpjej2a59BE=; fh=POWDVf+FKK/q3uBcC2rk5vkJ+MhSHLlS184PFNs0OCM=; b=VG31/AsMnSG+L25gYMX921LcQF+sc+f8j+sHBZ6Axx+wWYTIlLVYPIjJUieEFfTICu 0LUKE0bD6yVSOwih8YSzLzaQ3r0wkRRccZOBMTGAD1KGGfhiwbGoK8cXV+fl+Ryxx5rG R845viT61xS23xNCki8dWmAhAC9aWQ1Sid4EqV+eMKSAqN9UxQXWhX2XJWl+fE/yoQmR Yd1ikWulyC0rkpnMLtIPiJAD5m/ZCfj0mEmmTFGp0B13o2du5VU6hVKG4NBctvhOfzw+ 9xrmxaGyWNERBkVW2FyzfBf4aqsk3+7tLjRH97MDKEhbZjpxEByMmwCQckZdy/9MCHeG POpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rzsvwnlo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id h3-20020a170902f7c300b001d347c432desi529565plw.450.2023.12.12.13.50.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 13:50:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rzsvwnlo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A8DEA807C5C3; Tue, 12 Dec 2023 13:50:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377610AbjLLVuD (ORCPT + 99 others); Tue, 12 Dec 2023 16:50:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377532AbjLLVuC (ORCPT ); Tue, 12 Dec 2023 16:50:02 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCC9BD3 for ; Tue, 12 Dec 2023 13:50:05 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9FF1C433C7; Tue, 12 Dec 2023 21:50:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702417805; bh=6ogrBXo4J5g4zBXsQOlW0y4FIDZEwSmJ8vaSdXm00eE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rzsvwnlo32fqTtf3/7LvOn0kX55GFA+RKbr8qR84zmtyBxBr8Z27rXb4U/6Pub9MR SZPALCeQvn2083UU6DzF9G7YUneqS+diLCLU8LotEsI+v9qPOxZhj11odGxvk5n6Iu yYJwm5kUuY6Vy6D9LYgAhKLUqWGU9OnXxgbB18lXh+hcvu9SPljiZMuBhOwujYPV8b x5LlP7Gs6hZTDH8OmivofNGvAtf7K8ZIEwfbXCbp83wdffTbNJmxqjofNZEOFXBNyK 0sZ4swf7yt8LFaX5CAqYXb07ZoIeMFPXObopMU3OU3jhLSRBwnsDhIjjrrajdlI1xP MnbKaOMp5BiWw== Date: Tue, 12 Dec 2023 14:50:02 -0700 From: Nathan Chancellor To: Arnd Bergmann Cc: Sebastian Reichel , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Arnd Bergmann , Nick Desaulniers , Bill Wendling , Justin Stitt , Yangtao Li , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] power: reset: at91: mark at91_wakeup_status non-__init Message-ID: <20231212215002.GA3300655@dev-arch.thelio-3990X> References: <20231212214658.213510-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231212214658.213510-1-arnd@kernel.org> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 12 Dec 2023 13:50:30 -0800 (PST) On Tue, Dec 12, 2023 at 10:46:49PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > Two copies of the at91_wakeup_status() function are called by the > respective probe() callbacks and are marked __init, but the probe > functions are no longer annotated that way. This works with gcc because > the functions always get inlined, but clang keeps them separate, which > can lead to executing freed memory: > > WARNING: modpost: vmlinux: section mismatch in reference: at91_poweroff_probe+0x80 (section: .text) -> at91_wakeup_status (section: .init.text) > WARNING: modpost: vmlinux: section mismatch in reference: at91_shdwc_probe+0xcc (section: .text) -> at91_wakeup_status (section: .init.text) > > Drop the incorrect annotation on these. > > Fixes: 099806de68b7 ("power: reset: at91-poweroff: Stop using module_platform_driver_probe()") > Fixes: dde74a5de817 ("power: reset: at91-sama5d2_shdwc: Stop using module_platform_driver_probe()") > Signed-off-by: Arnd Bergmann Thanks, I sent the same change three weeks ago at this point: https://lore.kernel.org/20231120-fix-at91-modpost-warnings-v1-1-813671933863@kernel.org/ Your commit message is a little better than mine and I don't really care which one goes in but it would be good if this could get cleared up soon... Reviewed-by: Nathan Chancellor > --- > drivers/power/reset/at91-poweroff.c | 2 +- > drivers/power/reset/at91-sama5d2_shdwc.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/power/reset/at91-poweroff.c b/drivers/power/reset/at91-poweroff.c > index 126e774e210c..93eece027865 100644 > --- a/drivers/power/reset/at91-poweroff.c > +++ b/drivers/power/reset/at91-poweroff.c > @@ -57,7 +57,7 @@ static struct shdwc { > void __iomem *mpddrc_base; > } at91_shdwc; > > -static void __init at91_wakeup_status(struct platform_device *pdev) > +static void at91_wakeup_status(struct platform_device *pdev) > { > const char *reason; > u32 reg = readl(at91_shdwc.shdwc_base + AT91_SHDW_SR); > diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c > index af95c7b39cb3..959ce0dbe91d 100644 > --- a/drivers/power/reset/at91-sama5d2_shdwc.c > +++ b/drivers/power/reset/at91-sama5d2_shdwc.c > @@ -107,7 +107,7 @@ static const unsigned long long sdwc_dbc_period[] = { > 0, 3, 32, 512, 4096, 32768, > }; > > -static void __init at91_wakeup_status(struct platform_device *pdev) > +static void at91_wakeup_status(struct platform_device *pdev) > { > struct shdwc *shdw = platform_get_drvdata(pdev); > const struct reg_config *rcfg = shdw->rcfg; > -- > 2.39.2 > >