The patch titled Subject: checkpatch: add __ro_after_init to known $Attribute has been added to the -mm tree. Its filename is checkpatch-add-__ro_after_init-to-known-attribute.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-add-__ro_after_init-to-known-attribute.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-add-__ro_after_init-to-known-attribute.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: Joe Perches <joe@xxxxxxxxxxx> Subject: checkpatch: add __ro_after_init to known $Attribute __ro_after_init is a specific __attribute__ that checkpatch does currently not understand. Add it to the known $Attribute types so that code that uses variables declared with __ro_after_init are not thought to be a modifier type. This appears as a defect in checkpatch output of code like: static bool trust_cpu __ro_after_init = IS_ENABLED(CONFIG_RANDOM_TRUST_CPU); [...] if (trust_cpu && arch_init) { where checkpatch reports: ERROR: space prohibited after that '&&' (ctx:WxW) if (trust_cpu && arch_init) { Link: http://lkml.kernel.org/r/0fa8a2cb83ade4c525e18261ecf6cfede3015983.camel@xxxxxxxxxxx Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> Reported-by: Kees Cook <keescook@xxxxxxxxxxxx> Tested-by: Kees Cook <keescook@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) --- a/scripts/checkpatch.pl~checkpatch-add-__ro_after_init-to-known-attribute +++ a/scripts/checkpatch.pl @@ -380,6 +380,7 @@ our $Attribute = qr{ __noclone| __deprecated| __read_mostly| + __ro_after_init| __kprobes| $InitAttribute| ____cacheline_aligned| _ Patches currently in -mm which might be from joe@xxxxxxxxxxx are checkpatch-add-optional-static-const-to-blank-line-declarations-test.patch checkpatch-add-__ro_after_init-to-known-attribute.patch