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
Subject: Re: [dpdk-dev] [PATCH] drivers/virtio: fix duplicate naming of include guard
Date: Thu, 21 Mar 2019 15:59:06 +0800 [thread overview]
Message-ID: <20190321075906.GA29047@dpdk-tbie.sh.intel.com> (raw)
Message-ID: <20190321075906.v5uPGqQezKf6JdHMemlp_vlMsGS8_Rd0fb_Uannen-M@z> (raw)
In-Reply-To: <1553090259-30893-1-git-send-email-andrius.sirvys@intel.com>
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
>
next prev parent reply other threads:[~2019-03-21 7:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-20 13:57 Andrius Sirvys
2019-03-20 13:57 ` Andrius Sirvys
2019-03-21 6:19 ` Rami Rosen
2019-03-21 6:19 ` Rami Rosen
2019-03-21 7:59 ` Tiwei Bie [this message]
2019-03-21 7:59 ` Tiwei Bie
2019-03-21 9:26 ` Maxime Coquelin
2019-03-21 9:26 ` Maxime Coquelin
2019-03-21 10:09 ` [dpdk-dev] [PATCH v2] " Andrius Sirvys
2019-03-21 10:09 ` Andrius Sirvys
2019-03-22 6:06 ` Tiwei Bie
2019-03-22 6:06 ` Tiwei Bie
2019-03-27 11:13 ` Maxime Coquelin
2019-03-27 11:13 ` Maxime Coquelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190321075906.GA29047@dpdk-tbie.sh.intel.com \
--to=tiwei.bie@intel.com \
--cc=andrius.sirvys@intel.com \
--cc=dev@dpdk.org \
--cc=jianfeng.tan@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=zhihong.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).