Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp32846pxb; Fri, 15 Jan 2021 05:11:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6r1wFfhyizfMVyfY4sjLUqO9Lr9wFdn7O+VPMndIIjQXv5GySwBeyyT94JF+K+k0DrlZ0 X-Received: by 2002:a17:907:3e02:: with SMTP id hp2mr8577342ejc.411.1610716293632; Fri, 15 Jan 2021 05:11:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610716293; cv=none; d=google.com; s=arc-20160816; b=d2b+1TCUttWKWy2OWkbS+bumRMn3GQGPL7POthArmmMUzSJ71eEAmu+5BVD6P6CxL/ 0rV2o84A7uwnBXWQ0knGqECsgV4iQFp0vENwHhkToVJ1USz3wDQsvnxl3qGtgjCwdGfr GDKkgSNnkiFFceqWde28RmjvhRv3heqN1RXG7SzTH7OmFvPTVjB0Xt24AsWEHDZL/9XY AX+e5KHP15Fx1lQo1PvLnm+ZiC3rnNJiUqS08vlQrb+8Y0DhrzM4a2KxoBRAzFX7C7AO OeGtVuh9BERrg7UmwtZx8aQ8/nUde19EZEBBAUTpP7O2uu6JDjIAtbnE1lIzgPzo8c54 XJWg== 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=BQsjH0COPeyg0LXC2OgzTyfcu33N+hWVPjso2MeHX35WGkSgmQNdqmkG2G9gZAHwvs i6LAQtGStT5039dVNyHIGzJcDb3fG+imlY9H2x6otu1g/ZZfo10LssjOA1cXOqFC2+Cy arh3hHWGqdTBMJ+xxBCHVq/48u8yxt3Qw3jQ19Ijpq2hZirLT0+UzWePnuRrvH599sg5 vAMsuwMEzk+wdSIFFEpbeKk8MYaV/EHq7qUpRnV69a6h3VAHvAZ9JlFqf7EgRWBNqXaf cooNmwquGMmg7x33MAjpkIc/1alToE2X9aWTHBK8zPDm910JH+2tZX5GRAXbChWTx6y9 653g== 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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 a21si3590858ejr.58.2021.01.15.05.11.09; Fri, 15 Jan 2021 05:11:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S2388244AbhAONKJ (ORCPT + 99 others); Fri, 15 Jan 2021 08:10:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732483AbhAONKI (ORCPT ); Fri, 15 Jan 2021 08:10:08 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A95CC061794 for ; Fri, 15 Jan 2021 05:09:27 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id v24so6378736lfr.7 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=sNyXk2exrqBDZDwIQzoxxebG9r9PKfO+96ud2pehshuu/OeAme5ZAaTucYrxfkCCAW 2dYZ81XgaedJaInuxM5oHkZGDwuedqcALnCFZeIWStKCSlBtEXaRc8AX4U4gUX9eZ2Iy bcE0GsWyRVCtOG+06Aim7loNbq5Q1tXh36Vgjw3oTg4KPXB9l2LfCqaqWjJseqAtpSrG 9mto1HWyb6SeeAxTsEDRNkXS8HrLaRWt59GTztq+wnH0K+hHDM8iBT4POoMLlnFyNPjO Y+xDHyPZPFY+H61ob5Wg0ydd67QyIfwcNw4cJiFUgGVp9mMKshf38MNt9TD97VnVhM7e PIPQ== X-Gm-Message-State: AOAM530auDJzolvgNTA3nFfTOyKCUB0Q1FTNyokibCMai0lSlsFw6j+S rqcecAJ+p4Ac7CB2zIjdMA6qjg== 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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; -- 2.29.2