Skip to contentSkip to conversation

+ checkpatch-make-the-memory-barrier-test-noisier.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Oct 3, 2013 Checkpatch

lore
Share & tools
lore
#0 lore raw

Subject: + checkpatch-make-the-memory-barrier-test-noisier.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 03 Oct 2013 15:49:43 -0700

The patch titled
Subject: checkpatch: make the memory barrier test noisier
has been added to the -mm tree. Its filename is
checkpatch-make-the-memory-barrier-test-noisier.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-make-the-memory-barrier-test-noisier.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-make-the-memory-barrier-test-noisier.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/SubmitChecklist when testing your code ***

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

------------------------------------------------------
From: Joe Perches <[email protected]>
Subject: checkpatch: make the memory barrier test noisier

Peter Zijlstra prefers that comments be required near uses of memory barriers.

Change the message level for memory barrier uses from a --strict test only to a normal WARN so it's always emitted.

This might produce false positives around insertions of memory barriers when a comment is outside the patch context block.

And checkpatch is still stupid, it only looks for existence of any comment, not at the comment content.

---

 scripts/checkpatch.pl |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/checkpatch.pl renamed from scripts/checkpatch.pl~checkpatch-make-the-memory-barrier-test-noisier +2 -2
diff -puN scripts/checkpatch.pl~checkpatch-make-the-memory-barrier-test-noisier scripts/checkpatch.pl
@@ -3850,8 +3850,8 @@ sub process {
 # check for memory barriers without a comment.
 		if ($line =~ /\b(mb|rmb|wmb|read_barrier_depends|smp_mb|smp_rmb|smp_wmb|smp_read_barrier_depends)\(/) {
 			if (!ctx_has_comment($first_line, $linenr)) {
-				CHK("MEMORY_BARRIER",
-				    "memory barrier without comment\n" . $herecurr);
+				WARN("MEMORY_BARRIER",
+				     "memory barrier without comment\n" . $herecurr);
 			}
 		}
 # check of hardware specific defines

_

Patches currently in -mm which might be from [email protected] are

origin.patch kernel-timerc-convert-kmalloc_nodegfp_zero-to-kzalloc_node.patch ksm-remove-redundant-__gfp_zero-from-kcalloc.patch printk-report-console-names-during-cut-over.patch kernel-printk-printkc-convert-to-pr_foo.patch checkpatch-report-missing-spaces-around-trigraphs-with-strict.patch checkpatch-extend-camelcase-types-and-ignore-existing-camelcase-uses-in-a-patch.patch checkpatch-update-seq_foo-tests.patch checkpatch-find-camelcase-definitions-of-struct-union-enum.patch checkpatch-add-test-for-defines-of-arch_has_foo.patch checkpatch-add-rules-to-check-init-attribute-and-const-defects.patch checkpatch-make-the-memory-barrier-test-noisier.patch kernel-modulec-use-pr_foo.patch
linux-next.patch