* [PATCH] tags: add a space regex to DECLARE_BITMAP
@ 2021-11-01 15:59 Zhaoyu Liu
2021-11-01 16:53 ` Marc Zyngier
0 siblings, 1 reply; 3+ messages in thread
From: Zhaoyu Liu @ 2021-11-01 15:59 UTC (permalink / raw)
To: masahiroy, ripxorip, gregkh, matthieu.baerts, mpe; +Cc: maz, linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] tags: add a space regex to DECLARE_BITMAP 2021-11-01 15:59 [PATCH] tags: add a space regex to DECLARE_BITMAP Zhaoyu Liu @ 2021-11-01 16:53 ` Marc Zyngier [not found] ` <CAOk_PdPzKukZZiQJ2HYN_j3Zw_t7UXUqqcjDb4OBB39o-LbvNA@mail.gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Marc Zyngier @ 2021-11-01 16:53 UTC (permalink / raw) To: Zhaoyu Liu Cc: masahiroy, ripxorip, gregkh, matthieu.baerts, mpe, linux-kernel On 2021-11-01 15:59, Zhaoyu Liu wrote: > 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> No, please! I never reviewed this patch. I *suggested*i it [1] as a potential avenue for improvement. You cannot put this tag on a patch unless someone explicitly grants it. > 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/' More importantly, and assuming this is the correct approach, why should we limit this to DECLARE_BITMAP()? Thanks, M. [1] https://lore.kernel.org/r/878ry89nfp.wl-maz@kernel.org -- Jazz is not dead. It just smells funny... ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <CAOk_PdPzKukZZiQJ2HYN_j3Zw_t7UXUqqcjDb4OBB39o-LbvNA@mail.gmail.com>]
* Re: [PATCH] tags: add a space regex to DECLARE_BITMAP [not found] ` <CAOk_PdPzKukZZiQJ2HYN_j3Zw_t7UXUqqcjDb4OBB39o-LbvNA@mail.gmail.com> @ 2021-11-02 16:08 ` Marc Zyngier 0 siblings, 0 replies; 3+ messages in thread From: Marc Zyngier @ 2021-11-02 16:08 UTC (permalink / raw) To: Zackary Liu Cc: masahiroy, ripxorip, gregkh, matthieu.baerts, mpe, linux-kernel On Tue, 02 Nov 2021 14:25:19 +0000, Zackary Liu <zackary.liu.pro@gmail.com> wrote: > > Hi Marc, > > On Tue, Nov 2, 2021 at 12:53 AM Marc Zyngier <maz@kernel.org> wrote: > > > > On 2021-11-01 15:59, Zhaoyu Liu wrote: > > > 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> > > > > No, please! I never reviewed this patch. I *suggested*i it [1] > > as a potential avenue for improvement. > > > > You cannot put this tag on a patch unless someone explicitly > > grants it. > > > > I'm really sorry that I used the wrong "Reviewed-by" tag, > Perhaps "Suggested-by" tag would be more appropriate. Yes, that'd be the right one. > > Sorry again. > > > > 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/' > > > > More importantly, and assuming this is the correct approach, > > why should we limit this to DECLARE_BITMAP()? > > I will try to come up with a better approach, and commit [ patch v2 > ] later. You could try and apply the same approach consistently for all macros. Since you are using ctags, you're in a good position to test it and work out whether this is a sensible approach. Thanks, M. -- Without deviation from the norm, progress is not possible. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-02 16:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-01 15:59 [PATCH] tags: add a space regex to DECLARE_BITMAP Zhaoyu Liu
2021-11-01 16:53 ` Marc Zyngier
[not found] ` <CAOk_PdPzKukZZiQJ2HYN_j3Zw_t7UXUqqcjDb4OBB39o-LbvNA@mail.gmail.com>
2021-11-02 16:08 ` Marc Zyngier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox