Re: [2.6 patch] proper prototypes for mmc_attach_*()

From: Adrian Bunk
Date: Wed Apr 16 2008 - 13:59:01 EST


On Wed, Apr 16, 2008 at 07:32:15PM +0200, Pierre Ossman wrote:
> On Sun, 13 Apr 2008 21:15:50 +0300
> Adrian Bunk <bunk@xxxxxxxxxx> wrote:
>
> > This patch adds proper prototypes for mmc_attach_*() in
> > drivers/mmc/core/core.h
> >
> > Signed-off-by: Adrian Bunk <bunk@xxxxxxxxxx>
> >
>
> I'm not entirely convinced about these, but seems they seem to bother
> you... ;)

With proper prototypes in a header gcc can check that caller and callee
agree about the function signature.

Otherwise someone might accidentally change only one of them.

That's a rare issue, but when it happens it's a nasty runtime error.

> -- Pierre Ossman

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

--
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/