Skip to content

Commit

Permalink
scripts/kernel-doc: handle struct member __aligned
Browse files Browse the repository at this point in the history
scripts/kernel-doc erroneously says:

Warning(include/linux/skbuff.h:410): Excess struct/union/enum/typedef member 'cb' description in 'sk_buff'

on this line in struct sk_buff:
	char			cb[48] __aligned(8);

due to treating the last field as the struct member name, so teach
kernel-doc to ignore __aligned(x) in structs.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
rddunlap authored and torvalds committed Mar 24, 2010
1 parent 05731b9 commit ef5da59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,8 @@ sub dump_struct($$) {
$nested =~ s/\/\*.*?\*\///gos;
# strip kmemcheck_bitfield_{begin,end}.*;
$members =~ s/kmemcheck_bitfield_.*?;//gos;
# strip attributes
$members =~ s/__aligned\s*\(\d+\)//gos;

create_parameterlist($members, ';', $file);
check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested);
Expand Down

0 comments on commit ef5da59

Please sign in to comment.