From: Dave Penkler <dpenkler@gmail.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, llvm@lists.linux.dev,
patches@lists.linux.dev
Subject: Re: [PATCH] staging: gpib: Fix PCI header include guard
Date: Thu, 17 Oct 2024 11:49:30 +0200 [thread overview]
Message-ID: <ZxDdquqB76HJCaI5@egonzo> (raw)
In-Reply-To: <20241015-staging-gpib-fix-pci-header-guard-v1-1-dfa45fe8d63f@kernel.org>
On Tue, Oct 15, 2024 at 12:55:33PM -0700, 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,
> --
> Nathan Chancellor <nathan@kernel.org>
>
Thanks.
Reviewed-by: Dave Penkler <dpenkler@gmail.com>
prev parent reply other threads:[~2024-10-17 9:49 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
2024-10-17 9:49 ` Dave Penkler [this message]
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=ZxDdquqB76HJCaI5@egonzo \
--to=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