Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2193029rdb; Mon, 11 Sep 2023 13:56:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDpoLRE7SNE5gD0rvpPoUlYRavd1gOKX0Km7gQ6SV+epRtu+x5YAnhuVogd1w7D+7Kmriq X-Received: by 2002:a17:902:e849:b0:1bb:83ec:832 with SMTP id t9-20020a170902e84900b001bb83ec0832mr12852559plg.2.1694465807645; Mon, 11 Sep 2023 13:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694465807; cv=none; d=google.com; s=arc-20160816; b=pSmWW6WIC0fEK16Ohi8TxqxYtYhwOMKUm/x5LQNdBIKM+MqlaF+v8W7wJXEb75qCi3 x6DUl/FLKvsmzM/ApDC+Kq4IeCnG1HRoQwZR2ooXPSYkM5C/Lx3SQrGARbiRgYk4wY2j jJ0GLbfeEg6ucCoIfiXFVBNf0S//33AZOqyB43JUmqsbI3WmrteDog43309RBhTawfKw ajut2Dl7cti+yiKXlZfsb6lmuAXqpqBswZiNvgyww4glMq1fKDkUDSfEr9pH5+iISFpd JsctbEIv19/pknKbku6hzNJuq9/i3rIQwQ0vegQcSjkRmb1T0E4P75c+jdlRDd8PNPej mG/Q== 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 :message-id:date:subject:cc:to:from; bh=ZuDmqlAhN3jvTNLfOPEOrhjq2MRmz8ulp+t//dGaAYU=; fh=uqhoPqKAyfEOVW6GhPt0FtlglQygd4yxdDyis5D8+gQ=; b=1CyY7D8HXs1Qfw2SNEooxA47JO3WdMneEukbbXglB+V8c9EZV7/7IEB0Eszn5/8JRF ATtF3smMIfMN78Olrzqq1iNskpnk0RgVtp8S0rxRoy7vW3BTkubw4q9TKzO+U9UXDzn6 da7ZhbWKgeiEwJQIVHS22sgX6jxc+nWiNOn0IeMPlaHq36s10yTS+QdmYFwcO7UXQ/Iy /EbvRIXkpM3R1yu8FomRBjy7Hhg9opaBp0hIgAKQLmv8q5DMIa/RSOUJvNgF8pltlQsE eZ5flmwkmdpaLc/A3KdyoOwHGihI4ao9BWH/gHjZC5DHqvn6wafbPPJZMhuIaB/KMIG8 dE+Q== 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 q9-20020a17090311c900b001bbaa5e95fdsi6893012plh.102.2023.09.11.13.56.18; Mon, 11 Sep 2023 13:56:47 -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 S237971AbjIKUyk (ORCPT + 99 others); Mon, 11 Sep 2023 16:54:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235792AbjIKJjJ (ORCPT ); Mon, 11 Sep 2023 05:39:09 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA000EE for ; Mon, 11 Sep 2023 02:39:03 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:a989:d413:f41f:af52]) by xavier.telenet-ops.be with bizsmtp id kZez2A00b43UkUk01Zez9u; Mon, 11 Sep 2023 11:39:01 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qfdNT-002zNf-F0; Mon, 11 Sep 2023 11:38:59 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qfdNj-006NE7-O5; Mon, 11 Sep 2023 11:38:59 +0200 From: Geert Uytterhoeven To: Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , Andrew Morton , Baoquan He Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] sh: mm: Re-add lost __ref to ioremap_prot() to fix modpost warning Date: Mon, 11 Sep 2023 11:38:50 +0200 Message-Id: <20230911093850.1517389-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE autolearn=no 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 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); -- 2.34.1