Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5186196iob; Mon, 9 May 2022 10:25:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx56p8iyzYMs3RZhb7DwEFGWdw2t3blrGllZDqHllIpqHloRe7CfaYbFwhgIaNRWS/Ol/wI X-Received: by 2002:aca:4b95:0:b0:326:1179:5414 with SMTP id y143-20020aca4b95000000b0032611795414mr11578235oia.256.1652117116873; Mon, 09 May 2022 10:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652117116; cv=none; d=google.com; s=arc-20160816; b=t1fnVPqopCqG5aarJNeGnjL2A7rHhWxELomsx048w2jYH47h1DJq96sgNYKHA+aQ6b OdzYVUKIe5/fmZ8XNxJoe3RAb1otuPUr1YdYrIYtOa2ah50/ROA9pOKFdDiBXQPQU9S+ ekxwjnWci3xrsZqAUeFWvAC15C8XRgHX/jbBTNakKRZutzD0IH4LMIfS4vbfNCBZBiYi Chw7ePl0L4ofKAtKUdffy7tSrx6jFBIeXmHbM5empap+PPVcYwv1/g6/0s3O2vP7ZMyA pifqUkZ19151Fuo9zPxWqm3fJ/a6XhuMkNAsOufDNIp5UsxOjSv63Mgw0wxGsj4vfV5Q Cfsg== 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=Xq5ml2d/MeiCgCuvTz1iX/vBFJV/Zf5wkHsF94chv1Q=; b=pZ7GBNJJ5FBTXaaY4wGxx4D17JXVg6KmLIQ8Xus5Ajk5yDtEqvzRxN+cxHjYg7o6Cb cmu+OAKHzq7IEnZt3zGRIIE7TSrO/nu/mFk6ARJabO0bi2ckeZ6kmp9HI+MtuYDb2KVU Kd+RmDVgkI10mQPBCE0Y2WWxdxIKx+OjldKWVJx05AHM9BqeUU12IyhWNo2ceDJiTtbD ZV9uMVis+y7cZBWsIE+AA8iyoKg4SFeBxgwGzfd2ArqjDcgi7XAcM3qT8Xmzeoj84wXB 3NIVB7HD6/5cfv3zcze8lqoWVbnAFGJYH1n6yj0eRIVHJRgj0m2y0NieKyk9kP2ZJ2Bk tZRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=FoDLMQ1C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d19-20020a056830139300b00606135fd0e8si11162804otq.30.2022.05.09.10.25.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 10:25:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=FoDLMQ1C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 41C9024EA02; Mon, 9 May 2022 10:20:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239610AbiEIRX7 (ORCPT + 99 others); Mon, 9 May 2022 13:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239614AbiEIRX5 (ORCPT ); Mon, 9 May 2022 13:23:57 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C54024DC63 for ; Mon, 9 May 2022 10:20:01 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id bq30so24997584lfb.3 for ; Mon, 09 May 2022 10:20:01 -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=Xq5ml2d/MeiCgCuvTz1iX/vBFJV/Zf5wkHsF94chv1Q=; b=FoDLMQ1CUcXkPH5YH2WUvQkrh4wyHkUUHZHcdPJapmG1T0eHAY1wc8brR60ppGMa5J MvFXF3tuoDWJ6lkuzwDg+uXRKK1dpjzfA/uB5GQC4TIBsPxsrPlb2FDEA+M+F9oDz5r4 vtrjLZL3T3cOwM7JK/DHccrk8RMKefToEtmE3ezQ84jzYnAtOuLgLmSS8SPIbwmYpL8e +569UZLjUuKlLJxuLia9HvqCZWJPaqW6wxZ2wKVmnB6sIpUzIEuoLVasYEAtGywHS+dy NOLgCVKyfJ/Tlp9jDY6Jr3DzFF11gOShM2S20Pm+kw6ankpEDU3X7veoarlOtuIzCHqv rMIA== 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=Xq5ml2d/MeiCgCuvTz1iX/vBFJV/Zf5wkHsF94chv1Q=; b=MKnVDPNCtv3LczYvjdhQY30AT9gHHbyBJlXk+aCFQObgd4mfoC0JUSRIWm3GFcMjt3 ++ut8E0rUjZCKD4aSNiedAr/QN7JaPNyPHS7xhm/2T84LGhnC6iuAjg9Yh1kH+M4CXIV M2rrwyn4kwc6lFLPr5SiBT6v+QwEPHwiuUw6f0sPtqujtGguEKuIA6/XH6iFFT4owj2o Jnn16Ouha8TQVM9XQG+fk2fPcVAV0tXmJycESh3Dbt4jhI/a1vCH4mpUAUuFU0vBkmlC lQm0vmjPsqPJ6FB9/eFNZnQaLVGU9J1iYvItMhDMpeNxdss+hnkDhNJmfgm5cf8uyAyO PEpw== X-Gm-Message-State: AOAM530E7Puk7ljnNKmo9Uzt6KLfL65WivFXIevyK3P/uzJik86GnwwK DsjpekAmrZxQjNOyTbvpxBERGbupXY1pVWrVveSGOA== X-Received: by 2002:a19:4303:0:b0:473:f5fb:27b2 with SMTP id q3-20020a194303000000b00473f5fb27b2mr12343182lfa.626.1652116799064; Mon, 09 May 2022 10:19:59 -0700 (PDT) MIME-Version: 1.0 References: <20220508190631.2386038-1-masahiroy@kernel.org> <20220508190631.2386038-4-masahiroy@kernel.org> In-Reply-To: <20220508190631.2386038-4-masahiroy@kernel.org> From: Nick Desaulniers Date: Mon, 9 May 2022 10:19:47 -0700 Message-ID: Subject: Re: [PATCH v4 03/14] modpost: split the section mismatch checks into section-check.c To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor , Nicolas Schier , Peter Zijlstra , linux-modules@vger.kernel.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Ard Biesheuvel , Sami Tolvanen , clang-built-linux Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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 On Sun, May 8, 2022 at 12:10 PM Masahiro Yamada wrote: > > modpost.c is too big, and the half of the code is for section checks. > Split it. > > I fixed some style issues in the moved code. It would be helpful for review if the split and restyle were distinct patches. Otherwise I can't tell what has changed. This does lose the ability to use git blame to get more context on some of the oddities in modpost (which I have found useful in the past). I don't feel strongly though. > > Signed-off-by: Masahiro Yamada > --- > > Changes in v4: > - New patch > > scripts/mod/Makefile | 2 +- > scripts/mod/modpost.c | 1202 +--------------------------------- > scripts/mod/modpost.h | 34 +- > scripts/mod/section-check.c | 1222 +++++++++++++++++++++++++++++++++++ > 4 files changed, 1240 insertions(+), 1220 deletions(-) > create mode 100644 scripts/mod/section-check.c > > diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile > index c9e38ad937fd..ca739c6c68a1 100644 > --- a/scripts/mod/Makefile > +++ b/scripts/mod/Makefile > @@ -5,7 +5,7 @@ CFLAGS_REMOVE_empty.o += $(CC_FLAGS_LTO) > hostprogs-always-y += modpost mk_elfconfig > always-y += empty.o > > -modpost-objs := modpost.o file2alias.o sumversion.o > +modpost-objs := modpost.o section-check.o file2alias.o sumversion.o > > devicetable-offsets-file := devicetable-offsets.h > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index a78b75f0eeb0..e7e2c70a98f5 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -31,7 +31,7 @@ static bool external_module; > /* Only warn about unresolved symbols */ > static bool warn_unresolved; > > -static int sec_mismatch_count; > +int sec_mismatch_count; ^ this should go in modpost.h if it is to be used in two translation units, rather than forward declaring it in section-check.c. You did this for the functions. -- Thanks, ~Nick Desaulniers