Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1132474rwb; Wed, 26 Jul 2023 08:04:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlEMqf4HFCobXEsgzJRxIkpGuZUc/URlp58tknju0OceJzKw9xGY7XE2e+epBBzr0zPYp1XV X-Received: by 2002:a17:902:bf4b:b0:1b7:e355:d1ea with SMTP id u11-20020a170902bf4b00b001b7e355d1eamr2309074pls.24.1690383848827; Wed, 26 Jul 2023 08:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690383848; cv=none; d=google.com; s=arc-20160816; b=I6V6Az/cQKmdB5us6Z1/quUdnOqMlLSpbRkzBFq9oK+mEiccFfFhgxObHsgCr/3eRF SgOX5XyIxTFAfXPEkwWWEOmslb6+it///LQPqTeTA5L+5CjnVYEtMKrwdZiIIkYzmtQv zyLz5mGg7gWYSwaEBD02leixrjD2+EixtFR4UU7yqXVOVKxbpOyb1n32U4h554aDwNwu tw8pqohyOVc2KXEgVUrH2YAKEgfqXZR6wO9lg7SerrpiS50+Ht8uaBPzxNk/nilyBY1a hvsu+Yz7EM2IcuZSMCA1QaUf33v8+/Wuu28x/Pvo+YuAIUHVNtKVwMTqdYnyQ9A7FdfY G2mA== 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:dkim-signature; bh=6y45BOoTVJSqsvYwCP/XyMUI7FJ+SIe+lBjnHGCJlD8=; fh=XUz3uwuUHVfMpZ7oWgJF4T/6N206/v4hLj4LYnxhsoU=; b=w0LcIZnbCD5S/m9OdPgBnGWeSbCDl7aY3vxfcjA+5eY/t2MDGVuJxLjyCVaE8U6Hu5 Mp2/cn7ZVNyCINXPmbngr6mrLcg49ufLwNx09E53J+F8K2e1wZX+hPXHfO1+XuTHxCOj 60rxKn76EcEVx5jrnmMZdy8X69WvxZPxgC3a4IoHl8Fr09g9UuwOVkOoGMIGaSB+jrnL 6IIIiB/CaW2b0BotyQ549FTSHXdqdgZn0XHuzWDEj9eX/wtuLrYHRx5BrTGfxEYd8EX6 pFS3Hn+WsQcwi1bH2ve8s9IObomkXiTTv8krLyL3CBTXvPBqXtBsBJNTRcjGD/tjEZ5z Eggw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Um6LU4UQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a170902e5cb00b001b8c4021be9si14294216plf.397.2023.07.26.08.03.54; Wed, 26 Jul 2023 08:04:08 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Um6LU4UQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234042AbjGZOyl (ORCPT + 99 others); Wed, 26 Jul 2023 10:54:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234020AbjGZOyk (ORCPT ); Wed, 26 Jul 2023 10:54:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFF451FF2 for ; Wed, 26 Jul 2023 07:54:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 61CC461B0D for ; Wed, 26 Jul 2023 14:54:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACC13C433C7; Wed, 26 Jul 2023 14:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690383278; bh=6COAuBhHi+E6Wb3ufv0iUJ71l4MhF1eap+s4qSwyeU4=; h=From:To:Cc:Subject:Date:From; b=Um6LU4UQwX8QYWM2zwHJ2pvxGQ2sJOCrDvQkIIsUMJH0MYu6M2Y98v5/TPkfwMszS uOz8UxRFkjPHsdLtcsgR6Te4Xok49IEO5sHwMIZbaxvZ1mVL/6M3kFzDUMUmwYMF1o B3Pa115+S1LpK8afkcrIOkFP3w4NyjqGvbXrOb6lM6YJbnoVG4akmhgwrKsgh1Uwr8 bGW+zq0hRuu8f/hYTbJJQeOsMTN5Dx0J+qa6woriDly0FGUCgcKtLh+ONJeIkmzgOT BwPh/tq9yd1LQt+ps/aLxLM2pgnwkLzKDr4Pkq/AVRwr4FO9SbIbcm2B2V+0ZeMdM2 xjnjLP6CgEbTA== From: Arnd Bergmann To: Andrew Morton Cc: Arnd Bergmann , Baoquan He , linux-kernel@vger.kernel.org Subject: [PATCH] iomem: remove __weak ioremap_cache helper Date: Wed, 26 Jul 2023 16:54:09 +0200 Message-Id: <20230726145432.1617809-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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: Arnd Bergmann No portable code calls into this function any more, and on architectures that don't use or define their own, it causes a warning: kernel/iomem.c:10:22: warning: no previous prototype for 'ioremap_cache' [-Wmissing-prototypes] 10 | __weak void __iomem *ioremap_cache(resource_size_t offset, unsigned long size) Fold it into the only caller that uses it on architectures without the #define. Note that the fallback to ioremap is probably still wrong on those architectures, but this is what it's always done there. Signed-off-by: Arnd Bergmann --- kernel/iomem.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/kernel/iomem.c b/kernel/iomem.c index 9682471e64717..dc2120776e1c3 100644 --- a/kernel/iomem.c +++ b/kernel/iomem.c @@ -5,18 +5,14 @@ #include #include -#ifndef ioremap_cache -/* temporary while we convert existing ioremap_cache users to memremap */ -__weak void __iomem *ioremap_cache(resource_size_t offset, unsigned long size) -{ - return ioremap(offset, size); -} -#endif - #ifndef arch_memremap_wb static void *arch_memremap_wb(resource_size_t offset, unsigned long size) { +#ifdef ioremap_cache return (__force void *)ioremap_cache(offset, size); +#else + return (__force void *)ioremap(offset, size); +#endif } #endif -- 2.39.2