From patchwork Fri Jan 15 13:09:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 363624 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp278941jap; Fri, 15 Jan 2021 05:10:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJysV8p6UEaGJnsc8yEg1zhKFSS3iFC8h/wDhOH4GnK14OuDDmgb+jy0YsRS9u31yDkXr6zO X-Received: by 2002:a17:906:3099:: with SMTP id 25mr8806947ejv.321.1610716233637; Fri, 15 Jan 2021 05:10:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610716233; cv=none; d=google.com; s=arc-20160816; b=GavLdIkRreVsPcdF3mobm1k0dvRZfqbaCMXXaogzB9shjIwWOKxYav1xgBiOJut/61 /pRHLkcFONeb/9MbiC/4gf2yigTDS3y+DXqXOq1BTMx4uojO036gk6c/OFO5UcKUrmLO ltKCWMuMOBmJOlzdKx4PqqGRJE8EYoHKk3DZfUAa5FD863bGFJPj/xhRguAmIqv7Hpiw dpsuRnWtsf3levKxc6g12mAiiQ3jw1ljtDERJpGNZr+MyQTKdoKrphivWQkQzfUMRwK9 MyLPcy7m2BbkXjvSyi7lqSSce69jHOYwcmeYcMSyGyYMgVz5D19JRZXsK3HImBMGBNgi +jog== 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=H77013el4oj537KcWbHAa6KZVwXfxWSrY6uuE6Q0sc4=; b=kHlQ936NUGcuuu9EJsE/0rETASIkHy1YS0MPHu1bMlsCLox4OoXHojhPBCBeWWIgHv mLWWEBk2qgj2/KFaIZpktSUwrzubQWmmNr+ZGIYXn9imHUP12KcyMxEFeAQpZ90IBQkj Z+LXyg4V7oC6nAu6/Ou5LHB4nwOHaow/3p5vet8ucbWmRucj0HbtFLrbMfggdyuQ0LG6 GbV3b/NtXbV9+MfdakA3Kb5ODznK9Ztwq/+HTaa4OEm6pp7qO9zRWdtgwC0ZFgOYD95s O6+8Dhypef0xj56Kzqj1z5jinjSfJB1AejVrJBMFxT7CCboF2Ovg71B2mEfyxS0inlN3 HA+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q9Ztcgsg; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si4418894edr.598.2021.01.15.05.10.33; Fri, 15 Jan 2021 05:10:33 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q9Ztcgsg; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732964AbhAONKJ (ORCPT + 13 others); Fri, 15 Jan 2021 08:10:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732437AbhAONKI (ORCPT ); Fri, 15 Jan 2021 08:10:08 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A069C061793 for ; Fri, 15 Jan 2021 05:09:27 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id u25so13056728lfc.2 for ; Fri, 15 Jan 2021 05:09:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H77013el4oj537KcWbHAa6KZVwXfxWSrY6uuE6Q0sc4=; b=q9Ztcgsg9ICz4CPGi3AqBhJCCqaJbGEsok4o83u+3cAvltOWTKPufA+zeM/V62Iwkk yTiRg2yJPFZ9i81ri9+DmcbXtA6s2ZQpW9iXVEiSowSmETLz8pOMMsXmWBsqOjzEy7Yl 2I5jdF6KJv3XnTVtXFowFQXXpYmcjQcsqBgnWnDu5qPovVSoGNqzas3T51ES79XsGY3t tr4OJSVbMhjKxxFVPEpS6AjNruNqaTRvHOtgQ/QsVs0bl6BkOseOZzFI4Xn0uPERH8Xq nO6GR1ysXN9yl5DSKd5FAVlgeOKH6oDsZWAqCKKOnc0N4oL2r/6eDlC9B30LOApr+pm1 u0Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H77013el4oj537KcWbHAa6KZVwXfxWSrY6uuE6Q0sc4=; b=D+42MsaF7v96WuojI0gXXEfxldZILJ7hLUe0KsP+F+WDKOsWgMSCjxkuljoR2uSDIL gLPgnZ2eaXNG8OT1MP48FFTfO6wb6pp/gVseqi7rdLtma7onCQQPsG/VJ7gq6xjrivCl JWHEZ1Woh9mMRFnYg4BBbfGRaWdcMWyqfc4SmAK1+Ddhrjuo5hWHtF0Hp1tLkMS3WdL7 Y2C9AILUa/HtR9b7SD3W1IBRhil8AShzeqmdawFhEUUwI+weD68Ql6mTfFBCth/0p3gS xr6Dg5idpSrrtgsWneQFRbzdiKbNyRKcvLYBWq6/7Wihg8Gq1eulzimkV3UMjI54V8aA /zjA== X-Gm-Message-State: AOAM530S9oqoStiTUOJy5mjys5Pv4cetvsEyf1EPe3bQex7nJiUS4fRy Mz0PrsEh6+cqzyK+99adtei2xZs+JIsvJ5NF X-Received: by 2002:a19:8c18:: with SMTP id o24mr5567101lfd.121.1610716165947; Fri, 15 Jan 2021 05:09:25 -0800 (PST) Received: from localhost (c-9b28e555.07-21-73746f28.bbcust.telenor.se. [85.229.40.155]) by smtp.gmail.com with ESMTPSA id 25sm897153lfr.74.2021.01.15.05.09.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:09:25 -0800 (PST) From: Anders Roxell To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Anders Roxell , Nick Desaulniers , Thomas Bogendoerfer Subject: [PATCH] mips: fix Section mismatch in reference Date: Fri, 15 Jan 2021 14:09:05 +0100 Message-Id: <20210115130906.1084281-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org commit ad4fddef5f2345aa9214e979febe2f47639c10d9 upstream. When building mips tinyconfig with clang the following error show up: WARNING: modpost: vmlinux.o(.text+0x1940c): Section mismatch in reference from the function r4k_cache_init() to the function .init.text:loongson3_sc_init() The function r4k_cache_init() references the function __init loongson3_sc_init(). This is often because r4k_cache_init lacks a __init annotation or the annotation of loongson3_sc_init is wrong. Remove marked __init from function loongson3_sc_init(), mips_sc_probe_cm3(), and mips_sc_probe(). Cc: # v5.4+ Signed-off-by: Anders Roxell Reviewed-by: Nick Desaulniers Signed-off-by: Thomas Bogendoerfer --- arch/mips/mm/c-r4k.c | 2 +- arch/mips/mm/sc-mips.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.29.2 diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 9cede7ce37e6..c9644c38ec28 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c @@ -1609,7 +1609,7 @@ static void __init loongson2_sc_init(void) c->options |= MIPS_CPU_INCLUSIVE_CACHES; } -static void __init loongson3_sc_init(void) +static void loongson3_sc_init(void) { struct cpuinfo_mips *c = ¤t_cpu_data; unsigned int config2, lsize; diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c index dd0a5becaabd..06ec304ad4d1 100644 --- a/arch/mips/mm/sc-mips.c +++ b/arch/mips/mm/sc-mips.c @@ -146,7 +146,7 @@ static inline int mips_sc_is_activated(struct cpuinfo_mips *c) return 1; } -static int __init mips_sc_probe_cm3(void) +static int mips_sc_probe_cm3(void) { struct cpuinfo_mips *c = ¤t_cpu_data; unsigned long cfg = read_gcr_l2_config(); @@ -180,7 +180,7 @@ static int __init mips_sc_probe_cm3(void) return 0; } -static inline int __init mips_sc_probe(void) +static inline int mips_sc_probe(void) { struct cpuinfo_mips *c = ¤t_cpu_data; unsigned int config1, config2;