PCMCIA stack reduction patch [Was: Re: Realtime Preemption, 2.6.12, Beginners Guide?]

Dominik Brodowski linux at dominikbrodowski.net
Sun Jul 10 15:01:28 EDT 2005


Hi,

On Sat, Jul 09, 2005 at 03:26:57PM +0200, Ingo Molnar wrote:
> 
> > (gdb) ####################################
> > (gdb) # c02a0a26, stack size:  416 bytes #
> > (gdb) ####################################
> > (gdb) 0xc02a0a26 is in pcmcia_device_query (drivers/pcmcia/ds.c:436).
> 
> ----
> this patch reduces the stack footprint of pcmcia_device_query() from 416 
> bytes to 36 bytes. (patch only build-tested)

Applied and tested, but without the final hunk.

> @@ -856,7 +868,9 @@ static int bind_request(struct pcmcia_bu
>  rescan:
>  	p_dev->cardmgr = p_drv;
>  
> -	pcmcia_device_query(p_dev);
> +	ret = pcmcia_device_query(p_dev);
> +	if (ret)
> +		goto err_put_module;
>  
>  	/*
>  	 * Prevent this racing with a card insertion.


We don't check the return value here for a reason.

Thanks,

	Dominik



More information about the linux-pcmcia mailing list