[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1534354.yq7QTJSTju@amdc1032>
Date: Mon, 30 Sep 2013 15:23:11 +0200
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To: Andy Whitcroft <apw@...onical.com>
Cc: Joe Perches <joe@...ches.com>, linux-kernel@...r.kernel.org,
Kyungmin Park <kyungmin.park@...sung.com>
Subject: [PATCH] checkpatch: warn about incorrect __initdata placement
__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@...sung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@...sung.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists