Re: [PATCH] staging: gpib: Fix PCI header include guard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx>
> 
Thanks.
Reviewed-by: Dave Penkler <dpenkler@xxxxxxxxx>




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux