From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F40BFA0A0E; Tue, 11 May 2021 14:24:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76B6440140; Tue, 11 May 2021 14:24:40 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id E19E14003E for ; Tue, 11 May 2021 14:24:38 +0200 (CEST) IronPort-SDR: SW1xKfBNcNAh5cPOuotdPyOyy6x8gDuKZSi38jf70CrSzGfAO+eKu4FB3kjNsHgHfJ35pX3xm3 +PBMvL/1fE4A== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="179021154" X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="179021154" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 05:24:38 -0700 IronPort-SDR: 35UL/QnssmlejgytzF1u7b8B1NVlQFP5VL5YCwdx0J2pjfIs3ShGxqaHbGlZa/2XleQXsr8jD1 5CZ6RqArne9w== X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="609466264" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.2.198]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 11 May 2021 05:24:36 -0700 Date: Tue, 11 May 2021 13:24:31 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@intel.com, David Marchand Message-ID: References: <20210409124334.24479-1-david.marchand@redhat.com> <20210511100927.824319-1-thomas@monjalon.net> <1803102.QjYkUBZ0BM@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1803102.QjYkUBZ0BM@thomas> Subject: Re: [dpdk-dev] [PATCH v3] log: register with standardized names X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, May 11, 2021 at 02:10:47PM +0200, Thomas Monjalon wrote: > 11/05/2021 13:59, Bruce Richardson: > > On Tue, May 11, 2021 at 12:09:27PM +0200, Thomas Monjalon wrote: > > > --- a/drivers/meson.build > > > +++ b/drivers/meson.build > > > @@ -59,6 +59,11 @@ foreach subpath:subdirs > > > drivers += driver_path[1] > > > else > > > class = subpath > > > + endif > > > + > > > + log_prefix = 'pmd.' + class > > > + > > > + if drivers.length() == 0 > > > subdir(class) > > > endif > > > > > > > Minor nit - rather than splitting the existing block here, I suggest > > setting log_prefix = '' at the start of the loop, and leaving the existing > > else as-is. Then after the "subdir(class)" just check if log_prefix == > > '' and then set it to the default. I think it might be easier to read that > > way. [See suggested change below (untested)] > > > > /Bruce > > > > diff --git a/drivers/meson.build b/drivers/meson.build > > index 0052247a5..9d518d361 100644 > > --- a/drivers/meson.build > > +++ b/drivers/meson.build > > @@ -51,6 +51,7 @@ endif > > foreach subpath:subdirs > > drivers = [] > > std_deps = [] > > + log_prefix = '' > > > > # subpath can be either "class" or "class/driver" > > if subpath.contains('/') > > @@ -62,6 +63,10 @@ foreach subpath:subdirs > > subdir(class) > > endif > > > > + if log_prefix == '': > > + log_prefix = 'pmd.' + class > > + endif > > + > > OK with this change, I'll send a v4. > > Nit: please remove useless huge context when replying :) > +1 I had planned to - I just forgot to do so before hitting send!