[build] Remove unsafe disable function wrapper from legacy NIC drivers

The legacy NIC drivers do not consistently take a second parameter in
their disable function.  We currently use an unsafe function wrapper
that declares no parameters, and rely on the ABI allowing a second
parameter to be silently ignored if not expected by the caller.  As of
GCC 15, this hack results in an incompatible pointer type warning.

Fix by removing the hack, and instead updating all relevant legacy NIC
drivers to take an unused second parameter in their disable function.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-04-27 17:37:44 +01:00
parent 7741756afc
commit 15c1111c78
16 changed files with 26 additions and 21 deletions

View File

@@ -217,8 +217,7 @@ static inline void * legacy_isa_get_drvdata ( void *hwdev ) {
} \
static inline void \
_name ## _disable ( struct nic *nic, void *hwdev ) { \
void ( * _unsafe_disable ) () = _disable; \
_unsafe_disable ( nic, hwdev ); \
_disable ( nic, hwdev ); \
} \
static inline int \
_name ## _pci_legacy_probe ( struct pci_device *pci ) { \