Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2318674rdb; Thu, 21 Sep 2023 15:19:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpf2d9if2BWrlKYOvUDsOhrP/MOKzXQYraph87YswdG4gPxxBaP9AXCLmWnCjywA7kFJqD X-Received: by 2002:a17:903:2303:b0:1bc:422a:b9fd with SMTP id d3-20020a170903230300b001bc422ab9fdmr7573204plh.13.1695334763978; Thu, 21 Sep 2023 15:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695334763; cv=none; d=google.com; s=arc-20160816; b=ZOAFlbL290h3lV41qfrzh2jsZyNmjkfya2M7pfHz0xgOl0o5RysSZIeQ7sIJoFx0bp xkXEH/yH6/vkbYgHuDUb++al4VFhhrQ+RRKWLC/PAH/9QzabrPZUnZW/B1q1U/MynJrD 9O+VG2aFlNFmXD0Y/Vwq5PFwoF6kiHIK3V/DyTfcDlLNAJxOGXtl+8W3elMpLEevkIzk p8X9dxCzauvixo8Lbi/uVGnbdKbtTFP+THtqxrPuCEYCuPH5bQEqUsmu+4UbQujdhR/l IhVG+cB07/dmrrO2ChrfFMmD9g3UAXmojmh/W468vxC6qPXGfqEPxO/4EHHo4somxl7I niVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=BkPa8MYtzf7uxAAtSXWD1yzgtAyKXwkMEHvnrBwzmpQ=; fh=wMDa2mdemCcGSay+xCwdxp/tSR1YCG89pJ7+2Y2XeJw=; b=HgYrOey0/+JIoeJi+jp6NM9S2+dCiR8a5Y6isNBxPJlBf9w+EtqGXqEl5LmoXK9uCJ gIOYKtiWk95vjZ8H+NHhXvFyH04RhCpi4fCuF0pcZT1Ev7Pm9BWFXZDuOKUr358LvUsK nENurSYADAvzEw1THWDxhteGPQmr3T70RbhBCoRb5yBjlVl9J3rDmVnIgu+QCIrwq2PQ iuPgqsufc4y3eMvEGChg0ddOit0M6+eMZoUv3zmSxpLY8NW0tWV6mNMHU89VcQG0LkRT jjtzydWktUbB2/9Nd3pgC18P6zrVGQ+pS/K50pvYqtmPspaR0B9M8qjtVL7aGtP4ZJC6 b/Zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y20-20020a170902e19400b001c33b5c1fdbsi2155674pla.18.2023.09.21.15.19.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 15:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 9D8D4829BD7D; Thu, 21 Sep 2023 15:12:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230352AbjIUWMn convert rfc822-to-8bit (ORCPT + 99 others); Thu, 21 Sep 2023 18:12:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232756AbjIUWMQ (ORCPT ); Thu, 21 Sep 2023 18:12:16 -0400 Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6DAB88486; Thu, 21 Sep 2023 10:38:55 -0700 (PDT) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.95) with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1qjG4o-0001JE-6A; Thu, 21 Sep 2023 11:34:26 +0200 Received: from p5b13a40a.dip0.t-ipconnect.de ([91.19.164.10] helo=[192.168.178.81]) by inpost2.zedat.fu-berlin.de (Exim 4.95) with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1qjG4n-002kwl-Uq; Thu, 21 Sep 2023 11:34:26 +0200 Message-ID: Subject: Re: [PATCH] sh: mm: Re-add lost __ref to ioremap_prot() to fix modpost warning From: John Paul Adrian Glaubitz To: Geert Uytterhoeven , Yoshinori Sato , Rich Felker , Andrew Morton , Baoquan He Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 21 Sep 2023 11:34:25 +0200 In-Reply-To: <20230911093850.1517389-1-geert+renesas@glider.be> References: <20230911093850.1517389-1-geert+renesas@glider.be> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.4 MIME-Version: 1.0 X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 91.19.164.10 X-ZEDAT-Hint: PO X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 21 Sep 2023 15:12:46 -0700 (PDT) On Mon, 2023-09-11 at 11:38 +0200, Geert Uytterhoeven wrote: > When __ioremap_caller() was replaced by ioremap_prot(), the __ref > annotation added in commit af1415314a4190b8 ("sh: Flag > __ioremap_caller() __init_refok.") was removed, causing a modpost > warning: > > WARNING: modpost: vmlinux: section mismatch in reference: ioremap_prot+0x88 (section: .text) -> ioremap_fixed (section: .init.text) > > ioremap_prot() calls ioremap_fixed() (which is marked __init), but only > before mem_init_done becomes true, so this is safe. Hence fix this by > re-adding the lost __ref. > > Fixes: 0453c9a78015cb22 ("sh: mm: convert to GENERIC_IOREMAP") > Signed-off-by: Geert Uytterhoeven > --- > arch/sh/mm/ioremap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c > index c33b3daa4ad1a3e6..33d20f34560fd5cb 100644 > --- a/arch/sh/mm/ioremap.c > +++ b/arch/sh/mm/ioremap.c > @@ -72,8 +72,8 @@ __ioremap_29bit(phys_addr_t offset, unsigned long size, pgprot_t prot) > #define __ioremap_29bit(offset, size, prot) NULL > #endif /* CONFIG_29BIT */ > > -void __iomem *ioremap_prot(phys_addr_t phys_addr, size_t size, > - unsigned long prot) > +void __iomem __ref *ioremap_prot(phys_addr_t phys_addr, size_t size, > + unsigned long prot) > { > void __iomem *mapped; > pgprot_t pgprot = __pgprot(prot); Acked-by: John Paul Adrian Glaubitz -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913