Re: [PATCH 5/5] checkpatch: fix false EXPORT_SYMBOL warning

From: Andy Whitcroft
Date: Fri Oct 02 2009 - 03:39:12 EST


On Thu, Oct 01, 2009 at 07:28:11AM -0700, Daniel Walker wrote:
> On Wed, 2009-09-30 at 18:46 +0100, Andy Whitcroft wrote:
>
> > In theory the thing we are exporting can be an arbitrary number of lines
> > prior to the EXPORT_SYMBOL statement. We actually want to look at the
> > statement before the EXPORT_*.
>
> Why not maintain a variable that holds the name of the function of
> structure that is currently getting parsed .. So that you wouldn't need
> to look back X lines to find anything ? Or did you do that in the
> 0.29-5-* version?

We already have the concept of the current statement which is used
mostly for conditional handling. I leverage that to say if the 'next'
statement is an EXPORT_SYMBOL_* does this statement have anything to say
about the exported symbol name. Seems to work better.

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