Subject: Re: wd.c patch to reduce kernel stack usage
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 06/27/2002 12:55:35
On Thu, Jun 27, 2002 at 08:33:35PM +0900, YAMAMOTO Takashi wrote:
> From: David Laight <david@l8s.co.uk>
> Subject: Re: wd.c patch to reduce kernel stack usage
> Date: Thu, 27 Jun 2002 12:21:50 +0100
> > > like this?
> > 
> > 	generally....
> > 
> > > 		buf = wdperror(wd->drvp, wd->sc_wdc_bio.r_error);
> > 	...
> > >  		diskerr(bp, "wd", buf ? buf : "nomem" , LOG_PRINTF,
> > >  		    wd->sc_wdc_bio.blkdone, wd->sc_dk.dk_label);
> > 
> > Would simplify things a bit.
> 
> it's wrong. see the code above it.
>         case TIMEOUT:
>                 errbuf = "device timeout";
>                 goto retry;
> and "nomem" isn't error of disk. :)

I was just trying to suggest some test that indicates terrible
things are afoot.

Maybe "<null>" just to printf() doesn't explode.
After all if the malloc fails you probably won't get to see the
message anyway!

	David

-- 
David Laight: david@l8s.co.uk