• Patrick Pannuto's avatar
    checkpatch: fix extraneous EXPORT_SYMBOL* warnings · b998e001
    Patrick Pannuto authored
    These are caused by checkpatch incorrectly parsing its internal
    representation of a statement block for struct's (or anything else that is
    a statement block encapsulated in {}'s that also ends with a ';').  Fix
    this by properly parsing a statement block.
    An example:
    	+struct dummy_type dummy = {
    	+	.foo	= "baz",
    	+static int dummy_func(void)
    	+	return -EDUMMYCODE;
    	WARNING: EXPORT_SYMBOL(foo); should immediately \
    		follow its function/variable
    	#19: FILE: dummy.c:4:
    The above warning is issued when it should not be.
    Signed-off-by: default avatarPatrick Pannuto <ppannuto@codeaurora.org>
    Cc: Andy Whitcroft <apw@shadowen.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
checkpatch.pl 75.5 KB