[ipxe-devel] [PATCH] fix compile error in isabus_probe with gcc4.7

Olaf Hering olaf at aepfle.de
Fri Mar 16 21:19:53 UTC 2012


On Fri, Mar 16, Michael Brown wrote:

> On Friday 16 Mar 2012 13:43:10 Olaf Hering wrote:
> > --- ipxe.orig/src/drivers/bus/isa.c
> > +++ ipxe/src/drivers/bus/isa.c
> > @@ -97,6 +97,9 @@ static int isabus_probe ( struct root_de
> >  	int ioidx;
> >  	int rc;
> > 
> > +	if ( ISA_EXTRA_PROBE_ADDR_COUNT == 0 )
> > +		return 0;
> > +
> >  	for_each_table_entry ( driver, ISA_DRIVERS ) {
> >  		for ( ioidx = ISA_IOIDX_MIN ( driver ) ;
> >  		      ioidx <= ISA_IOIDX_MAX ( driver ) ; ioidx++ ) {
> 
> This change would cause isabus_probe() to fail to use the driver's own built-
> in probe list unless some additional probe addresses were also specified via 
> ISA_PROBE_ADDRS, which would be incorrect behaviour.
> 
> The intended behaviour is that if ISA_PROBE_ADDRS is not defined, then 
> isabus_probe() should just use the driver's own probe list.  Any additional 
> addresses specified in ISA_PROBE_ADDRS should be tried before those in the 
> driver's own list.

How would you fix the code in case the array is empty because
ISA_PROBE_ADDRS is not defined?

Olaf



More information about the ipxe-devel mailing list