Re: [PATCH] scsi: buslogic: mark blogic_pci_tbl as __maybe_unused

From: Damien Le Moal
Date: Wed Jul 30 2025 - 23:57:57 EST


On 7/31/25 6:44 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> A previous patch removed an #ifdef check around the array definition, but
> this is not actually used when the driver is built-in, and now causes
> a warning when -Wunused-const-variable is set:
>
> drivers/scsi/BusLogic.c:3727:35: error: 'blogic_pci_tbl' defined but not used [-Werror=unused-const-variable=]
>
> Mark it as __maybe_unused for this configuration.
>
> Ideally this should be fixed instead by using the array as part of
> a pci_driver definition, instead of the linux-2.4 style manual bus
> scan.
>
> Fixes: 204689f0ea20 ("scsi: Always define blogic_pci_tbl structure")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>

--
Damien Le Moal
Western Digital Research