Re: [patch v2 09/35] Hexagon: Add checksum functions

From: Sam Ravnborg
Date: Tue Aug 30 2011 - 15:52:22 EST


On Tue, Aug 30, 2011 at 12:34:47PM -0700, Joe Perches wrote:
> On Tue, 2011-08-30 at 14:07 -0500, Richard Kuo wrote:
> > Removed most non-assembly functions and use the generic ones instead.
> []
> > +++ linux-hexagon-kernel/arch/hexagon/include/asm/checksum.h 2011-08-24 18:45:48.133877105 -0500
> []
> > +#define do_csum do_csum
>
> That looks pretty odd.
> I have a hard time believing that's useful or necessary.

This is "the new way" to tell that an arch supply an arch specific variant of a function.
See lib/checksum.c.

It does:

#ifndef do_csum
...
#endif

So archs that do not define do_csum will get a generic version of do_csum.
And "do_csum" nicely shows up in grep - so it makes sense to do so.

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