uti/lint/checkpatch: Fix __attribute__ struct errors for OPEN_BRACE
commit010905ed2fdaea92116f5d2764073176c06dce31
authorMartin Roth <martinroth@google.com>
Sun, 5 Mar 2017 02:28:37 +0000 (4 19:28 -0700)
committerMartin Roth <martinroth@google.com>
Thu, 9 Mar 2017 03:37:43 +0000 (9 04:37 +0100)
tree0b1517dc41d48f89939c1b8c61999f167373525c
parent2e17eaed1bfb2e6362790b4a7590c48c6602a8bf
uti/lint/checkpatch: Fix __attribute__ struct errors for OPEN_BRACE

The __attribute__((weak)) lines on structs were being read as functions,
causing a warning that the brace should be on the next line.
Add a check to see if it's a struct with an attribute, and ignore it for
the OPEN_BRACE check if it is.

Change-Id: Ieb0c96027e8df842f60ca7c9de7aac941eed1dc2
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/18570
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com>
util/lint/checkpatch.pl