[v2] drivers/virtio: fix duplicate naming of include guard

Message ID 1553162993-42643-1-git-send-email-andrius.sirvys@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series [v2] drivers/virtio: fix duplicate naming of include guard |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Andrius Sirvys March 21, 2019, 10:09 a.m. UTC
  "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.

Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")
Cc: jianfeng.tan@intel.com
Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
---
v2: changed the name of the variable
---
 drivers/net/virtio/virtio_user/vhost.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Tiwei Bie March 22, 2019, 6:06 a.m. UTC | #1
On Thu, Mar 21, 2019 at 10:09:53AM +0000, Andrius Sirvys wrote:
> "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.
> 
> Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")
> Cc: jianfeng.tan@intel.com
> Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
> Acked-by: Rami Rosen <ramirose@gmail.com>
> ---
> v2: changed the name of the variable
> ---
>  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..55f4703 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 _VIRTIO_USER_VHOST_H
> +#define _VIRTIO_USER_VHOST_H
>  
>  #include <stdint.h>
>  #include <linux/types.h>
> -- 
> 2.7.4

Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
  
Maxime Coquelin March 27, 2019, 11:13 a.m. UTC | #2
On 3/21/19 11:09 AM, Andrius Sirvys wrote:
> "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.
> 
> Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")
> Cc: jianfeng.tan@intel.com
> Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
> Acked-by: Rami Rosen <ramirose@gmail.com>
> ---
> v2: changed the name of the variable
> ---
>   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..55f4703 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 _VIRTIO_USER_VHOST_H
> +#define _VIRTIO_USER_VHOST_H
>   
>   #include <stdint.h>
>   #include <linux/types.h>
> 

Applied to dpdk-next-virtio/master.

Next time please run the check-git-log script before posting,
I fixed the issues while applying.

Thanks,
Maxime
  

Patch

diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h
index 83a85cc..55f4703 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 _VIRTIO_USER_VHOST_H
+#define _VIRTIO_USER_VHOST_H
 
 #include <stdint.h>
 #include <linux/types.h>