From: Javier Carrasco <javier.carrasco@wolfvision.net>
To: Nathan Chancellor <nathan@kernel.org>,
Dave Penkler <dpenkler@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, llvm@lists.linux.dev,
patches@lists.linux.dev
Subject: Re: [PATCH] staging: gpib: Fix PCI header include guard
Date: Wed, 16 Oct 2024 07:06:13 +0200 [thread overview]
Message-ID: <14a202f2-aa79-4171-9f39-fa9eeec21823@wolfvision.net> (raw)
In-Reply-To: <20241015-staging-gpib-fix-pci-header-guard-v1-1-dfa45fe8d63f@kernel.org>
On 15/10/2024 21:55, Nathan Chancellor wrote:
> Clang warns (or errors with CONFIG_WERROR=y):
>
> In file included from drivers/staging/gpib/ines/ines_gpib.c:19:
> drivers/staging/gpib/include/gpib_pci_ids.h:3:9: error: '__GPIB_PCI_IDS_H' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
> 3 | #ifndef __GPIB_PCI_IDS_H
> | ^~~~~~~~~~~~~~~~
> drivers/staging/gpib/include/gpib_pci_ids.h:4:9: note: '__GPIB_LINUX_PCI_IDS_H' is defined here; did you mean '__GPIB_PCI_IDS_H'?
> 4 | #define __GPIB_LINUX_PCI_IDS_H
> | ^~~~~~~~~~~~~~~~~~~~~~
> | __GPIB_PCI_IDS_H
>
> Fix the define to match the guard like the note suggests, as that is
> clearly what was intended here.
>
> Fixes: 6c52d5e3cde2 ("staging: gpib: Add common include files for GPIB drivers")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> drivers/staging/gpib/include/gpib_pci_ids.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/gpib/include/gpib_pci_ids.h b/drivers/staging/gpib/include/gpib_pci_ids.h
> index 162b02deb0ade7ede08ad81ebd41a79727374448..52dcab07a7d188925a4d696d6b658f397f3b0153 100644
> --- a/drivers/staging/gpib/include/gpib_pci_ids.h
> +++ b/drivers/staging/gpib/include/gpib_pci_ids.h
> @@ -1,7 +1,7 @@
> /* SPDX-License-Identifier: GPL-2.0 */
>
> #ifndef __GPIB_PCI_IDS_H
> -#define __GPIB_LINUX_PCI_IDS_H
> +#define __GPIB_PCI_IDS_H
>
> #ifndef PCI_VENDOR_ID_AMCC
> #define PCI_VENDOR_ID_AMCC 0x10e8
>
> ---
> base-commit: e0eb7cc4d70d672cf9344916aba58136fd6e495e
> change-id: 20241015-staging-gpib-fix-pci-header-guard-997bbc923818
>
> Best regards,
I just faced this issue when compiling linux-next/master with GCC and
allyesconfig. Renaming the guard as Nathan fixed the bug.
Tested-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
next prev parent reply other threads:[~2024-10-16 5:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 19:55 [PATCH] staging: gpib: Fix PCI header include guard Nathan Chancellor
2024-10-16 5:06 ` Javier Carrasco [this message]
2024-10-17 9:49 ` Dave Penkler
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=14a202f2-aa79-4171-9f39-fa9eeec21823@wolfvision.net \
--to=javier.carrasco@wolfvision.net \
--cc=dpenkler@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-staging@lists.linux.dev \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=patches@lists.linux.dev \
/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