mirror of
https://github.com/ipxe/ipxe
synced 2026-01-28 20:12:28 +03:00
[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:
@@ -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 ) { \
|
||||
|
||||
Reference in New Issue
Block a user