Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5977712iob; Tue, 10 May 2022 07:50:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGKV0iDvHTOfQne1zba77DsCXjRZGCIcRBXwU/VvmI4uJyN7UXQUIL2dI3zv5qY7HBcACe X-Received: by 2002:a17:906:c10c:b0:6fa:24e1:2fd3 with SMTP id do12-20020a170906c10c00b006fa24e12fd3mr10748756ejc.231.1652194211111; Tue, 10 May 2022 07:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652194211; cv=none; d=google.com; s=arc-20160816; b=w70y9fIWR05k1ILul+WOcquBhSnq/2C3nLsEl6jMiCTaZGgDjotQuXSghpM/duXiQS OKARYN+OnJX2eW0nwlEt9nx48zZIJTCZBWI9G7Lp6RKZfkFEtDFLwsJuKy3euvyD3cQs bCH0YIMJAy7xiH2Fhb7yWmrX9OUKWQsKMA+H17dYbxvqRBVWjrHwzeOopubPMWutHAZF EULx710l0sD+1zumgnQZQoZw4A3n9K4V0vh8ZuFUKwPR4gG848K1LhnqNWY3Ja5tDbNV Yinb/tMspUMs+51ph831s1gE3Q+n3okh0bb9yW9Bjtsi/KiCAyPz5LAmxvAAEhEnjyuh TmiA== 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:dkim-filter; bh=PV2VZBmSw1vDAIYTzEMhuv3Dcr29T/TFTi8FpUXKvKs=; b=Z7mOyHDwVPmhHAaX7eNU/+YeyscbtKSz4XFTp6g1TqpuOXS4pXs/MgCJD/oTDCQUQH Wa21t9nV9yb2LEZRbFGeR5UAhFC5c6dbun9ndJrVcES8YdcjxR+CLrBkxSGycA298Nxo Kbw/5ogGrZNl2YiwkvIFwSVgLqQ+Q1e19nXB/rSyDGhMALzJnjYr4742yQ9Spwhqa8gb brZ9rm7eokBK/vfuYcVkkgTB/IJ/mxZD4iAhHnXt6ONz2MltPUatSRlWsZhpooTSqwxC uI4u7pgP+FjwFW5dG45E40nv15YtPhTOb0gNJbzgzKy5uJyBobzGEFQshC0aU/L0GKOu EYbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=TUwfcbJv; 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 v14-20020a056402348e00b0042634f81189si16375092edc.614.2022.05.10.07.49.47; Tue, 10 May 2022 07:50:11 -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=@nifty.com header.s=dec2015msa header.b=TUwfcbJv; 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 S229810AbiEJHjT (ORCPT + 99 others); Tue, 10 May 2022 03:39:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237471AbiEJHBT (ORCPT ); Tue, 10 May 2022 03:01:19 -0400 Received: from conssluserg-01.nifty.com (conssluserg-01.nifty.com [210.131.2.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31EFC7485B; Mon, 9 May 2022 23:57:17 -0700 (PDT) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 24A6v5AW020352; Tue, 10 May 2022 15:57:05 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 24A6v5AW020352 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1652165826; bh=PV2VZBmSw1vDAIYTzEMhuv3Dcr29T/TFTi8FpUXKvKs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TUwfcbJvXyEvqS8U11pqWqNmRgJzRZaBOGmPCphF+IP2bpDlMx0L9NSHPo3LizD+b ELmgfisgYc9Dkdfvq4jo1FzJ1HT3wtSW1w2WlGbqLoHqey20jM14N6UUlxyj/mqBYA AX/7/fcgrEQKWf4o2Zv+TXLqUdtc6CF5huKQGAPLIQ13xqP42a7sMHmvWBHcUd/52y JT8vHBu7Mujdb7nuqsZriXtv80/x/2pyM6DL4/oZWrEoTN/1Q96Wh7GOpeZL/rATQL 5wBCqpzWAUMi+noWjumXUHN2+1tdLCI8yrM0t16SPITEcCss048Fs238DeWc/mEgKv dRLJIW9zg0/lQ== X-Nifty-SrcIP: [209.85.214.175] Received: by mail-pl1-f175.google.com with SMTP id d17so15983766plg.0; Mon, 09 May 2022 23:57:05 -0700 (PDT) X-Gm-Message-State: AOAM532+bBKE4On1YzhYdFxIOjgwVyBIsN1qCcdz5QyhzROXdItt9Ugc 5cv7j7RqgQ9VTPjBqmYZA0XcfXG2VqFG3NBmv8E= X-Received: by 2002:a17:90a:e517:b0:1d7:5bbd:f9f0 with SMTP id t23-20020a17090ae51700b001d75bbdf9f0mr21441512pjy.77.1652165824961; Mon, 09 May 2022 23:57:04 -0700 (PDT) MIME-Version: 1.0 References: <20220508190631.2386038-1-masahiroy@kernel.org> <20220508190631.2386038-4-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Tue, 10 May 2022 15:55:53 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 03/14] modpost: split the section mismatch checks into section-check.c To: Nick Desaulniers Cc: Linux Kbuild mailing list , Linux Kernel Mailing List , Nathan Chancellor , Nicolas Schier , Peter Zijlstra , linux-modules , linux-s390 , linuxppc-dev , Ard Biesheuvel , Sami Tolvanen , clang-built-linux Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Tue, May 10, 2022 at 2:20 AM Nick Desaulniers wrote: > > 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. OK, I will just move the code in v5. > > 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. Sorry, I do not understand. In modpost.h, I put the declaration: extern int sec_mismatch_count; If I moved it to the header without 'extern' I would get multiple definitions. -- Best Regards Masahiro Yamada