All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhaoyu Liu <zackary.liu.pro@gmail.com>
To: masahiroy@kernel.org, ripxorip@gmail.com,
	gregkh@linuxfoundation.org, matthieu.baerts@tessares.net,
	mpe@ellerman.id.au
Cc: maz@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] tags: add a space regex to DECLARE_BITMAP
Date: Mon, 1 Nov 2021 23:59:53 +0800	[thread overview]
Message-ID: <20211101155948.GA10424@pc> (raw)

When "make tags", it prompts a warning:

    ctags: Warning: drivers/pci/controller/pcie-apple.c:150:
    null expansion of name pattern "\1"

The reason is that there is an indentation beside arguments of
DECLARE_BITMAP, but it can parsed normally by gtags. It's also
allowed in C.

So fix this regex temporarily, and wait for better solutions
applied to other regexs.

Reviewed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Zhaoyu Liu <zackary.liu.pro@gmail.com>
---
 scripts/tags.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index b24bfaec6290..7e5f19391f20 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -186,7 +186,7 @@ regex_c=(
 	'/\<DEFINE_\(RT_MUTEX\|MUTEX\|SEMAPHORE\|SPINLOCK\)(\([[:alnum:]_]*\)/\2/v/'
 	'/\<DEFINE_\(RAW_SPINLOCK\|RWLOCK\|SEQLOCK\)(\([[:alnum:]_]*\)/\2/v/'
 	'/\<DECLARE_\(RWSEM\|COMPLETION\)(\([[:alnum:]_]\+\)/\2/v/'
-	'/\<DECLARE_BITMAP(\([[:alnum:]_]*\)/\1/v/'
+	'/\<DECLARE_BITMAP([[:space:]]*\([[:alnum:]_]*\)/\1/v/'
 	'/\(^\|\s\)\(\|L\|H\)LIST_HEAD(\([[:alnum:]_]*\)/\3/v/'
 	'/\(^\|\s\)RADIX_TREE(\([[:alnum:]_]*\)/\2/v/'
 	'/\<DEFINE_PER_CPU([^,]*, *\([[:alnum:]_]*\)/\1/v/'
-- 
2.17.1


             reply	other threads:[~2021-11-01 16:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01 15:59 Zhaoyu Liu [this message]
2021-11-01 16:53 ` [PATCH] tags: add a space regex to DECLARE_BITMAP Marc Zyngier
     [not found]   ` <CAOk_PdPzKukZZiQJ2HYN_j3Zw_t7UXUqqcjDb4OBB39o-LbvNA@mail.gmail.com>
2021-11-02 16:08     ` Marc Zyngier

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=20211101155948.GA10424@pc \
    --to=zackary.liu.pro@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=matthieu.baerts@tessares.net \
    --cc=maz@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=ripxorip@gmail.com \
    /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.