+ checkpatch-add-_notifier_head-as-var-definition.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: checkpatch: add *_NOTIFIER_HEAD as var definition
has been added to the -mm tree.  Its filename is
     checkpatch-add-_notifier_head-as-var-definition.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-add-_notifier_head-as-var-definition.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-add-_notifier_head-as-var-definition.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Gilad Ben-Yossef <gilad@xxxxxxxxxxxxx>
Subject: checkpatch: add *_NOTIFIER_HEAD as var definition

Add *_NOTIFIER_HEAD as variable definition to avoid code like this:

ATOMIC_NOTIFIER_HEAD(foo);
EXPORT_SYMBOL_GPL(foo);

By triggering the following warning:
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Link: http://lkml.kernel.org/r/20190704104457.30045-1-gilad@xxxxxxxxxxxxx
Signed-off-by: Gilad Ben-Yossef <gilad@xxxxxxxxxxxxx>
Cc: Ofir Drang <ofir.drang@xxxxxxx>
Cc: Joe Perches <joe@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 scripts/checkpatch.pl |    1 +
 1 file changed, 1 insertion(+)

--- a/scripts/checkpatch.pl~checkpatch-add-_notifier_head-as-var-definition
+++ a/scripts/checkpatch.pl
@@ -3877,6 +3877,7 @@ sub process {
 				^.DEFINE_$Ident\(\Q$name\E\)|
 				^.DECLARE_$Ident\(\Q$name\E\)|
 				^.LIST_HEAD\(\Q$name\E\)|
+				^.{$Ident}_NOTIFIER_HEAD\(\Q$name\E\)|
 				^.(?:$Storage\s+)?$Type\s*\(\s*\*\s*\Q$name\E\s*\)\s*\(|
 				\b\Q$name\E(?:\s+$Attribute)*\s*(?:;|=|\[|\()
 			    )/x) {
_

Patches currently in -mm which might be from gilad@xxxxxxxxxxxxx are

checkpatch-add-_notifier_head-as-var-definition.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux