All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akira Yokosawa <akiyks@gmail.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: perfbook@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: [PATCH -perfbook 2/4] periodcheck: Add check of '\@.' and '.\@' uses
Date: Fri, 30 Apr 2021 13:53:04 +0900	[thread overview]
Message-ID: <efced609-63b4-9023-77ff-f4a4789fefb4@gmail.com> (raw)
In-Reply-To: <9ccade63-dbc0-a089-b79d-3f1b619a6932@gmail.com>

"\@." should be at the end of an input line.
".\@" should be in the middle of a line.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 utilities/periodcheck.pl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/utilities/periodcheck.pl b/utilities/periodcheck.pl
index b1551c44..11313981 100755
--- a/utilities/periodcheck.pl
+++ b/utilities/periodcheck.pl
@@ -64,6 +64,10 @@ sub check_line {
 		$safe = 1;
 	    }
 	}
+	if ($line =~ /^(?=[\s]*+[^%])[^%]*\.\\\@(\s*$|\s*%.*$)/ ||
+	    $line =~ /^(?=[\s]*+[^%])[^%]*\\\@\.\s+[^\s%]+/){
+	    $safe = 0;
+	}
 	unless ($safe) {
 	    print $ARGV[0], ':', $line_num, ':', $line_raw;
 	}
-- 
2.17.1



  parent reply	other threads:[~2021-04-30  4:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30  4:42 [PATCH -perfbook 0/4] periodcheck and other updates Akira Yokosawa
2021-04-30  4:51 ` [PATCH -perfbook 1/4] Auto run periodcheck on 'make' Akira Yokosawa
2021-04-30  4:53 ` Akira Yokosawa [this message]
2021-04-30  4:53 ` [PATCH -perfbook 3/4] locking: Fix typo Akira Yokosawa
2021-04-30  4:55 ` [PATCH -perfbook 4/4] formal: Add v5.12 rcu-test data in Figure 12.4 Akira Yokosawa
2021-04-30 19:09 ` [PATCH -perfbook 0/4] periodcheck and other updates Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=efced609-63b4-9023-77ff-f4a4789fefb4@gmail.com \
    --to=akiyks@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=perfbook@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.