From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <tiwei.bie@intel.com>
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id 5648A1B3FD;
 Thu, 21 Mar 2019 08:59:25 +0100 (CET)
X-Amp-Result: UNSCANNABLE
X-Amp-File-Uploaded: False
Received: from fmsmga008.fm.intel.com ([10.253.24.58])
 by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 21 Mar 2019 00:59:24 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,252,1549958400"; d="scan'208";a="133445099"
Received: from dpdk-tbie.sh.intel.com ([10.67.104.173])
 by fmsmga008.fm.intel.com with ESMTP; 21 Mar 2019 00:59:22 -0700
Date: Thu, 21 Mar 2019 15:59:06 +0800
From: Tiwei Bie <tiwei.bie@intel.com>
To: Andrius Sirvys <andrius.sirvys@intel.com>
Cc: dev@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>,
 Zhihong Wang <zhihong.wang@intel.com>, stable@dpdk.org,
 jianfeng.tan@intel.com
Message-ID: <20190321075906.GA29047@dpdk-tbie.sh.intel.com>
References: <1553090259-30893-1-git-send-email-andrius.sirvys@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <1553090259-30893-1-git-send-email-andrius.sirvys@intel.com>
User-Agent: Mutt/1.9.4 (2018-02-28)
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Mar 2019 07:59:26 -0000

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 <andrius.sirvys@intel.com>
> ---
>  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.

Thanks,
Tiwei

>  
>  #include <stdint.h>
>  #include <linux/types.h>
> -- 
> 2.7.4
> 

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 3BF73A00E6
	for <public@inbox.dpdk.org>; Thu, 21 Mar 2019 08:59:28 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 318261B433;
	Thu, 21 Mar 2019 08:59:27 +0100 (CET)
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id 5648A1B3FD;
 Thu, 21 Mar 2019 08:59:25 +0100 (CET)
X-Amp-Result: UNSCANNABLE
X-Amp-File-Uploaded: False
Received: from fmsmga008.fm.intel.com ([10.253.24.58])
 by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 21 Mar 2019 00:59:24 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,252,1549958400"; d="scan'208";a="133445099"
Received: from dpdk-tbie.sh.intel.com ([10.67.104.173])
 by fmsmga008.fm.intel.com with ESMTP; 21 Mar 2019 00:59:22 -0700
Date: Thu, 21 Mar 2019 15:59:06 +0800
From: Tiwei Bie <tiwei.bie@intel.com>
To: Andrius Sirvys <andrius.sirvys@intel.com>
Cc: dev@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>,
 Zhihong Wang <zhihong.wang@intel.com>, stable@dpdk.org,
 jianfeng.tan@intel.com
Message-ID: <20190321075906.GA29047@dpdk-tbie.sh.intel.com>
References: <1553090259-30893-1-git-send-email-andrius.sirvys@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
In-Reply-To: <1553090259-30893-1-git-send-email-andrius.sirvys@intel.com>
User-Agent: Mutt/1.9.4 (2018-02-28)
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Message-ID: <20190321075906.v5uPGqQezKf6JdHMemlp_vlMsGS8_Rd0fb_Uannen-M@z>

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 <andrius.sirvys@intel.com>
> ---
>  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.

Thanks,
Tiwei

>  
>  #include <stdint.h>
>  #include <linux/types.h>
> -- 
> 2.7.4
>