Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4233007iog; Tue, 28 Jun 2022 11:41:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vWo18OyWtnZFbdLXgGVEkuSo8nA4hPfzhT6PIeB8MLzSAiysSb9Yks1inL/cl+P8HjeHdo X-Received: by 2002:a05:6402:42c8:b0:435:b99c:35f9 with SMTP id i8-20020a05640242c800b00435b99c35f9mr25850642edc.137.1656441680165; Tue, 28 Jun 2022 11:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656441680; cv=none; d=google.com; s=arc-20160816; b=tMaBT+7WfLuO/a8ZwKl4d4srFuDnmw8WW7sStab1LfdKe/yHtXVu3NaJjpRyGB4eWu q93nfwRKQsYLyInr/JRT2x27Hp1bLbJDA/IPzkWYV14pQsCMgIGw7HuOhemc3vNEdhoz evOwu2mNdxiec100hvyEnW2cSNBPHhXHC3ruERK4nVjQSj+EY/aPeCLWtlzzcCPGIDYI S1FWSF7JvCAcavc9CRf+SvqbFKjEX8pMtX15kobx2lnZp5LSONvc+bpZmL/W3QKIkH73 ZB+5y/Jma4ymvcBi4JC4oZGa5cvKJSIjFyQkT5N4ot4uOdf/BxPvtl1rnFS+m/ACIhl7 JW7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=x67D86P08gZAk0fy/7+SSenQLOYBeozWxcHLqMOhLfI=; b=Q1v2a8h7qbNRXCCOqG3zc3K8HPUvXuO2/SD83gANw7YhYyDKwV3xAtE75RnN5ytNlr csGobaL8v+Y0v6YSpEArxJNLEURR+QMyRNDaOQcwPzv6dUIpKcbUaIveRY+1ltXt9wqe 4544Bcm9JCLNCVHV2aUI8N35zZO/jF/8VAavQ6xsdke2rdrnfT+6IvOPV9X7LH4NvyKn 7OeR9g7UtnLv/PphrT8TFaiEbE02KtjYnajUad2wF6q0ItcNFO59PyPp4/dj23kvPlLX 2X5U4bX6f23bP7p6Jiy56H1yyHUfzCBJcZuMmDx0fQ0+PtyEXonXrLydw//YvV/1yiIc D/lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="nJwaYdp/"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020a170906944600b006fed8dfb78dsi1777521ejx.43.2022.06.28.11.40.55; Tue, 28 Jun 2022 11:41:20 -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=@google.com header.s=20210112 header.b="nJwaYdp/"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234287AbiF1STf (ORCPT + 99 others); Tue, 28 Jun 2022 14:19:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233620AbiF1ST0 (ORCPT ); Tue, 28 Jun 2022 14:19:26 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2CB11FCDE for ; Tue, 28 Jun 2022 11:19:25 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id n15so15907755ljg.8 for ; Tue, 28 Jun 2022 11:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x67D86P08gZAk0fy/7+SSenQLOYBeozWxcHLqMOhLfI=; b=nJwaYdp/kOzT40dVHVSiMQwKsKylKgCXY3gHRylZMWNYOpSezYGtaiNCcOsA4knN7G KcxLm7S4ATT+FiSTtushtsrAP5JdM1neZLNF4qxdKoEELCAVsq5lDPf4OZ1Jsal6DMgU pyKH1NKLQZ+b17yaatEmGqYZM8xCVEzDb7zjt94J4CKpw/JOzzjJ4xWeFooYZzqal7P6 t7HXddxpGLS0Nf5+m3hZyLuhEusBg6I2OnNtm7Ct0HEXznQCqPfraa4sBm293zLafBVf L0w0GCCnKCqXZxkuvZUocSdiEWkRSpNfGNXdLF97JZPI7uo8868PABqZRY3nPHJ7bNpt xjMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x67D86P08gZAk0fy/7+SSenQLOYBeozWxcHLqMOhLfI=; b=HyKD3KSZJr5fe1YJJR5pkXUSiZzhlS01A/Uv7T04P4+1B30hqrHnglPO4oEy+ChztP ONoy0fpVb00OR8Q0fKLyWY0depTQoSWJiuajNYLAZPRJqoI+iia+/ej5IudHSE2+4oei IDDvaqjsA2g5ymlu1tX2bzFYpJ2UpVBVXq7/oQKkfYLg/7/X/wA0g6oUlFPnyA4mG4AQ o50J2SJKYB1GntTmT9B55Xqyhal2vgi9i8UEs9cHjprJiRMwH4qPP6sLOB6/1A++GBhU 4AM5VXl10Ith5bXNtb0K5BWRFxqJMFwkagGULO6jIn1FiKutjwtLiotmqszQF2z9Kbci r/Ww== X-Gm-Message-State: AJIora+IF51dPR9KPTuocL39+MxRL4qtC/Z0hi2VglmOWYshuLO4g9N8 VuDt7B1rE9Gjr23aPA/yZjPJhr2vM88lGuLifidn8g== X-Received: by 2002:a2e:8555:0:b0:25a:7efc:4670 with SMTP id u21-20020a2e8555000000b0025a7efc4670mr10755368ljj.513.1656440363944; Tue, 28 Jun 2022 11:19:23 -0700 (PDT) MIME-Version: 1.0 References: <1656314828-3544-1-git-send-email-yangtiezhu@loongson.cn> In-Reply-To: <1656314828-3544-1-git-send-email-yangtiezhu@loongson.cn> From: Nick Desaulniers Date: Tue, 28 Jun 2022 11:19:12 -0700 Message-ID: Subject: Re: [PATCH v2] modpost: Add line break in the section mismatch warning To: Tiezhu Yang Cc: Masahiro Yamada , Michal Marek , Xuefeng Li , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, kernelci@groups.io Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 On Mon, Jun 27, 2022 at 4:46 AM Tiezhu Yang wrote: > > The section mismatch warning may be too long, add a line break > to make it more readable. > > Without this patch: > > LD vmlinux.o > MODPOST vmlinux.symvers > WARNING: modpost: vmlinux.o(___ksymtab+prom_init_numa_memory+0x0): Section mismatch in reference from the variable __ksymtab_prom_init_numa_memory to the function .init.text:prom_init_numa_memory() > The symbol prom_init_numa_memory is exported and annotated __init > Fix this by removing the __init annotation of prom_init_numa_memory or drop the export. > > With this patch: > > LD vmlinux.o > MODPOST vmlinux.symvers > WARNING: modpost: vmlinux.o(___ksymtab+prom_init_numa_memory+0x0): Section mismatch in reference > from the variable __ksymtab_prom_init_numa_memory to the function .init.text:prom_init_numa_memory() > The symbol prom_init_numa_memory is exported and annotated __init > Fix this by removing the __init annotation of prom_init_numa_memory or drop the export. This might aggravate the ability of scripts parsing build logs for "warning:" case insensitive to accurately report what the warning is. > > This is based on Linux 5.19-rc4. > > Signed-off-by: Tiezhu Yang > --- > > v2: update the commit message > > scripts/mod/modpost.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index 620dc8c..4cc894f 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -1320,8 +1320,8 @@ static void report_sec_mismatch(const char *modname, > get_pretty_name(from_is_func, &from, &from_p); > get_pretty_name(to_is_func, &to, &to_p); > > - warn("%s(%s+0x%llx): Section mismatch in reference from the %s %s%s " > - "to the %s %s:%s%s\n", > + warn("%s(%s+0x%llx): Section mismatch in reference\n" > + "from the %s %s%s to the %s %s:%s%s\n", > modname, fromsec, fromaddr, from, fromsym, from_p, to, tosec, > tosym, to_p); > > -- > 2.1.0 > -- Thanks, ~Nick Desaulniers