Re: include/linux/nfs/nfsfh.h declares a symbol

From: Jörn Engel
Date: Mon Oct 13 2003 - 04:23:33 EST


On Mon, 13 October 2003 14:43:57 +1000, Neil Brown wrote:
> On Wednesday October 1, joern@xxxxxxxxxxxxxxxxxxxx wrote:
> > Neil, the function SVCFH_fmt uses a static variable to sprintf into.
> > Looks like this variable is declared locally for every .c file
> > including nfsfh.h, which is quite a few.
> >
> > You could remove the static, but that would increase the stack usage,
> > which might be a problem too. The buffer could be reduced to 64
> > chars, to reduce that problem. kmalloc()ing it seems a bit expensive,
> > but might be an option, too.
>
> Thanks. I think it is best to simply make SVCFH_fmt a real function
> instead of inline, as below.
>
> NeilBrown
>
> =======================================
> Move SVCFH_fmt from being 'inline' to being 'extern'.
>
> This way, the "static char buf" is defined only once instead
> of once per file.

Patch looks good. Thanks!

Jörn

--
To recognize individual spam features you have to try to get into the
mind of the spammer, and frankly I want to spend as little time inside
the minds of spammers as possible.
-- Paul Graham
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/