mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] checkpatch: warn about incorrect __initdata placement
@ 2013-09-30 13:23 Bartlomiej Zolnierkiewicz
  2013-09-30 15:50 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2013-09-30 13:23 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: Joe Perches, linux-kernel, Kyungmin Park

__initdata tag should be placed between the variable name and equal
sign for the variable to be placed in the intended .init.data section.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 scripts/checkpatch.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 23d55bf..88d07a6 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4275,6 +4275,12 @@ sub process {
 			WARN("EXPORTED_WORLD_WRITABLE",
 			     "Exporting world writable files is usually an error. Consider more restrictive permissions.\n" . $herecurr);
 		}
+
+# check for incorrect __initdata placement
+		if ($line =~ /\bstruct\s+__initdata.*\=/) {
+			WARN("INITDATA_PLACEMENT",
+			     "__initdata tag should be placed between the variable name and equal sign\n" . $herecurr);
+		}
 	}
 
 	# If we have no input at all, then there is nothing to report on
-- 
1.8.2.3



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-30 17:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-30 13:23 [PATCH] checkpatch: warn about incorrect __initdata placement Bartlomiej Zolnierkiewicz
2013-09-30 15:50 ` Joe Perches
2013-09-30 17:11   ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®