On Tue, May 27, 2025 at 07:28:59AM -0400, James Bottomley wrote:
> On Tue, 2025-05-27 at 11:07 +0200, Alexey Gladkov wrote:
> > Define MODULE_DEVICE_TABLE only if a structure is defined for it.
> > 
> > drivers/scsi/BusLogic.c:3735:26: error: use of undeclared identifier
> > 'blogic_pci_tbl'
> >  3735 | MODULE_DEVICE_TABLE(pci, blogic_pci_tbl);
> 
> Well, a) need to cc the scsi list

Sorry. I miss it.

> and b) how is this possible when
> MODULE_DEVICE_TABLE() has an empty definition if MODULE isn't defined
> (so the guard you move should be over an empty statement)?

In the next patch:

[PATCH v3 4/6] modpost: Create modalias for builtin modules

I remove this condition for the MODULE_DEVICE_TABLE macro and it will be
always defined.

I put the drivers/scsi/BusLogic.c change before these changes to avoid
errors. Besides, even an empty macro uses a structure name that is not
defined (if MODULE isn't defined). This seems wrong in any case.

-- 
Rgrds, legion


Reply via email to