From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 6FDAF1B465; Thu, 21 Mar 2019 10:26:16 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C47A83084213; Thu, 21 Mar 2019 09:26:15 +0000 (UTC) Received: from [10.36.112.59] (ovpn-112-59.ams2.redhat.com [10.36.112.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 34DE519C57; Thu, 21 Mar 2019 09:26:13 +0000 (UTC) To: Tiwei Bie , Andrius Sirvys Cc: dev@dpdk.org, Zhihong Wang , stable@dpdk.org, jianfeng.tan@intel.com References: <1553090259-30893-1-git-send-email-andrius.sirvys@intel.com> <20190321075906.GA29047@dpdk-tbie.sh.intel.com> From: Maxime Coquelin Message-ID: <5d054e50-0c67-17c5-1ad7-3a8cd6f2f20e@redhat.com> Date: Thu, 21 Mar 2019 10:26:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190321075906.GA29047@dpdk-tbie.sh.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 21 Mar 2019 09:26:15 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] drivers/virtio: fix duplicate naming of include guard X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Mar 2019 09:26:16 -0000 On 3/21/19 8:59 AM, Tiwei Bie wrote: > On Wed, Mar 20, 2019 at 01:57:39PM +0000, Andrius Sirvys wrote: >> The LGTM static code analysis tool is reporting >> >> "The macro name '_VHOST_NET_USER_H' of this include guard is used >> in 2 different header files." >> >> lib/librte_vhost/vhost_user.h has the same include guard. >> Renamed the include guard in vhost.h to differentiate. > > Above two files are private headers in two individual modules, > there is no chance that they will be included by the same file. > But I agree it's not a good name for any of them. > >> >> Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer") >> Cc: jianfeng.tan@intel.com >> Signed-off-by: Andrius Sirvys >> --- >> drivers/net/virtio/virtio_user/vhost.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h >> index 83a85cc..f8d26b6 100644 >> --- a/drivers/net/virtio/virtio_user/vhost.h >> +++ b/drivers/net/virtio/virtio_user/vhost.h >> @@ -2,8 +2,8 @@ >> * Copyright(c) 2010-2016 Intel Corporation >> */ >> >> -#ifndef _VHOST_NET_USER_H >> -#define _VHOST_NET_USER_H >> +#ifndef ANOTHER_VHOST_NET_USER_H >> +#define ANOTHER_VHOST_NET_USER_H > > If we want to change it, I prefer to change it to _PATH_NAME_, > e.g. _VIRTIO_USER_VHOST_H_ or similar. +1 for _VIRTIO_USER_VHOST_H_ > > Thanks, > Tiwei > >> >> #include >> #include >> -- >> 2.7.4 >> From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id CDAABA00E6 for ; Thu, 21 Mar 2019 10:26:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 413111B478; Thu, 21 Mar 2019 10:26:17 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 6FDAF1B465; Thu, 21 Mar 2019 10:26:16 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C47A83084213; Thu, 21 Mar 2019 09:26:15 +0000 (UTC) Received: from [10.36.112.59] (ovpn-112-59.ams2.redhat.com [10.36.112.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 34DE519C57; Thu, 21 Mar 2019 09:26:13 +0000 (UTC) To: Tiwei Bie , Andrius Sirvys Cc: dev@dpdk.org, Zhihong Wang , stable@dpdk.org, jianfeng.tan@intel.com References: <1553090259-30893-1-git-send-email-andrius.sirvys@intel.com> <20190321075906.GA29047@dpdk-tbie.sh.intel.com> From: Maxime Coquelin Message-ID: <5d054e50-0c67-17c5-1ad7-3a8cd6f2f20e@redhat.com> Date: Thu, 21 Mar 2019 10:26:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190321075906.GA29047@dpdk-tbie.sh.intel.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 21 Mar 2019 09:26:15 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] drivers/virtio: fix duplicate naming of include guard X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Message-ID: <20190321092612.9ZcT-QfHMIu3h6KSSPnIw_qdh0neUVV7Bl4bLCrHPE0@z> On 3/21/19 8:59 AM, Tiwei Bie wrote: > On Wed, Mar 20, 2019 at 01:57:39PM +0000, Andrius Sirvys wrote: >> The LGTM static code analysis tool is reporting >> >> "The macro name '_VHOST_NET_USER_H' of this include guard is used >> in 2 different header files." >> >> lib/librte_vhost/vhost_user.h has the same include guard. >> Renamed the include guard in vhost.h to differentiate. > > Above two files are private headers in two individual modules, > there is no chance that they will be included by the same file. > But I agree it's not a good name for any of them. > >> >> Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer") >> Cc: jianfeng.tan@intel.com >> Signed-off-by: Andrius Sirvys >> --- >> drivers/net/virtio/virtio_user/vhost.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h >> index 83a85cc..f8d26b6 100644 >> --- a/drivers/net/virtio/virtio_user/vhost.h >> +++ b/drivers/net/virtio/virtio_user/vhost.h >> @@ -2,8 +2,8 @@ >> * Copyright(c) 2010-2016 Intel Corporation >> */ >> >> -#ifndef _VHOST_NET_USER_H >> -#define _VHOST_NET_USER_H >> +#ifndef ANOTHER_VHOST_NET_USER_H >> +#define ANOTHER_VHOST_NET_USER_H > > If we want to change it, I prefer to change it to _PATH_NAME_, > e.g. _VIRTIO_USER_VHOST_H_ or similar. +1 for _VIRTIO_USER_VHOST_H_ > > Thanks, > Tiwei > >> >> #include >> #include >> -- >> 2.7.4 >>