Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1744847ybp; Fri, 11 Oct 2019 20:23:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjKuXo17AtxyAzzcSfZqfZLOLL5DfsPwK4Hg0XEmUWEq05gTjH6LvjKujLPLy9/iWGLcsh X-Received: by 2002:a05:6402:886:: with SMTP id e6mr17212490edy.152.1570850635165; Fri, 11 Oct 2019 20:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570850635; cv=none; d=google.com; s=arc-20160816; b=TjL9Wgkg3huBQZ8fDq2pFPudNps1XE8j5YEBdTN7tOzw3DxUP8uJ5QALoLyVJ2xpDN FxULnmBvW2ubjYNTuRj4fJQqsU/CRafp9XFdLkJB6mHv6CPwRQOT3C0+wG+DnIF6Fyzc Qy89839+i6CSQPrMRYcY8YEtjHWGH9RaEuutrFvaCQ7p7ijVTcfe/rHGgbQSIvE6Vc55 H7hdXJKYCm/6s+nkiVVPMRUxKM+OnWhrcnjua1R5g34Twj7eb3o2IeQ/nNwuTv8mgdKE 7JWrgJDgqgCJ/nUSH4FKGgpZ63yBv3zJmeceEXIPRxDk3eKYYzODzqY//5X8FNqvugXS e7tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=fVr6myVWeNkwM1bzUYkAV3KR6w6/G/BTVwiRy1YKeFE=; b=tP1J1vMxU+ugU1e7b6ZJri+J5+OcXXAOHe5uso0Tk/yJUR/SkDrrRvlqo8wAA3vug2 UVoYyluLdS1bahOZplRaVQte8brqy78POEMOx2BZtkmLBQHS6YmoApyZvsNT1lLWo4Sz 1aklMnhK+upqmWPFgCUpcsa97ohUpwkbWGBJ1YeFadB44THlFhVaN5uXgroVrpUeQvs3 h1vCbvcZhNqBP7ZzH6He5sgQApGMfnPz3NYwOp8AfDEE/1EWAHlQO06eQ+EUC4CFbb03 XU2/7RCH9AtK4tLWyJNpThZfG4DNXsw8qQ3TC3O1GLjZo2+W6U4kxUv/zSlpVTZAHzH2 5zUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jBGzyU5M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n19si6426867ejk.264.2019.10.11.20.23.18; Fri, 11 Oct 2019 20:23:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jBGzyU5M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727231AbfJLDUu (ORCPT + 99 others); Fri, 11 Oct 2019 23:20:50 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:31646 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726391AbfJLDUu (ORCPT ); Fri, 11 Oct 2019 23:20:50 -0400 Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com [209.85.217.42]) (authenticated) by conssluserg-01.nifty.com with ESMTP id x9C3KZvC029353; Sat, 12 Oct 2019 12:20:35 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com x9C3KZvC029353 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1570850436; bh=fVr6myVWeNkwM1bzUYkAV3KR6w6/G/BTVwiRy1YKeFE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jBGzyU5Mq7JX//jH7mWGJu9NdKguZyZXnVGNj3iCJS5PRSD3xLkJRY0TGS4Dk2k0G PJQ7rHVBvJb3mZkIbGIpgatVzi0UNBGZW3Oa2TAi1tVvoegSiHlWCBzOUQtFg/wGSW 9t9f3+QGAgRYXfE3wrIe0ip/p3bytfQVfw/nQvT4u3bYR4T8Vk6zvfIXG7KTzYmZfD 3QERovRA/lXLHDqYZCmp4F2raHSRboVWEeLWepwohRaE56ray+aQB3i17uJAu9wpXj wiWyYHDDm4LRjw50yOhTz56hoox7MNupUsWV4924Ir95zuqk9ECeRDvXtUz0+XBKNc FVtnRymLipdlg== X-Nifty-SrcIP: [209.85.217.42] Received: by mail-vs1-f42.google.com with SMTP id z14so7481125vsz.13; Fri, 11 Oct 2019 20:20:35 -0700 (PDT) X-Gm-Message-State: APjAAAW1xwzad01EzQvNacNbHmX0+XbtwRiUi9FQqHD8/aksLmU/mbFD epPPHsweGjzTP0pJT6Z3vEiwTkxpHfuWt2qS3yk= X-Received: by 2002:a67:e354:: with SMTP id s20mr11109571vsm.54.1570850434646; Fri, 11 Oct 2019 20:20:34 -0700 (PDT) MIME-Version: 1.0 References: <20191010151443.7399-1-maennich@google.com> <20191010151443.7399-2-maennich@google.com> <20191011153253.GB1283883@kroah.com> In-Reply-To: <20191011153253.GB1283883@kroah.com> From: Masahiro Yamada Date: Sat, 12 Oct 2019 12:19:58 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] modpost: delegate updating namespaces to separate function To: Greg Kroah-Hartman Cc: Matthias Maennich , Linux Kernel Mailing List , "Cc: Android Kernel" , Jessica Yu , Martijn Coenen , Lucas De Marchi , Shaun Ruffell , Will Deacon , Linux Kbuild mailing list , linux-modules Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 12, 2019 at 12:33 AM Greg Kroah-Hartman wrote: > > On Thu, Oct 10, 2019 at 04:14:40PM +0100, Matthias Maennich wrote: > > Let the function 'sym_update_namespace' take care of updating the > > namespace for a symbol. While this currently only replaces one single > > location where namespaces are updated, in a following patch, this > > function will get more call sites. > > > > The function signature is intentionally close to sym_update_crc and > > taking the name by char* seems like unnecessary work as the symbol has > > to be looked up again. In a later patch of this series, this concern > > will be addressed. > > > > This function ensures that symbol::namespace is either NULL or has a > > valid non-empty value. Previously, the empty string was considered 'no > > namespace' as well and this lead to confusion. > > > > Signed-off-by: Matthias Maennich > > --- > > scripts/mod/modpost.c | 21 ++++++++++++++++++--- > > 1 file changed, 18 insertions(+), 3 deletions(-) > > > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > > index 4d2cdb4d71e3..9f5dcdff4d2f 100644 > > --- a/scripts/mod/modpost.c > > +++ b/scripts/mod/modpost.c > > @@ -362,6 +362,22 @@ static char *sym_extract_namespace(const char **symname) > > return namespace; > > } > > > > +static void sym_update_namespace(const char *symname, const char *namespace) > > +{ > > + struct symbol *s = find_symbol(symname); > > + /* That symbol should have been created earlier and thus this is > > + * actually an assertion. */ > > Do we care about checkpatch issues in tools? Personally, I do. > > If so, you need a blank line before the comment :) One more minor issue, the block comment style is not correct. Please do like this: /* * Blah Blah ... * Blah Blha ... */ With those addressed, Reviewed-by: Masahiro Yamada > > Anyway, not a big deal > > Reviewed-by: Greg Kroah-Hartman -- Best Regards Masahiro Yamada