From: Steven Rostedt <rostedt@kernel.org>
To: LKML <linux-kernel@vger.kernel.org>,
Linux trace kernel <linux-trace-kernel@vger.kernel.org>,
linux-kbuild <linux-kbuild@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Masahiro Yamada <masahiroy@kernel.org>,
Masatake YAMATO <yamato@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Michal Marek <mmarek@suse.cz>, Yang Bai <hamo.by@gmail.com>,
Stephen Boyd <sboyd@codeaurora.org>
Subject: [PATCH v2] scripts: Have make TAGS not include structure members
Date: Wed, 27 May 2026 12:11:44 -0400 [thread overview]
Message-ID: <20260527121144.08a1f676@fedora> (raw)
From: Steven Rostedt <rostedt@goodmis.org>
It is really annoying when I use emacs TAGS to search for something
like "dev_name" and have to go through 12 iterations before I find the
function "dev_name". I really do not care about structures that include
"dev_name" as one of its fields, and I'm sure pretty much all other
developers do not care either.
There's a "remove_structs" variable used by the scripts/tags.sh, which
I'm guessing is suppose to remove these structures from the TAGS file,
but it must do a poor job at it, as I'm always hitting structures when
I want the actual declaration.
Luckily, the etags program comes with an option "--no-members", which does
exactly what I want, and I'm sure all other kernel developers want too.
Create a new "no_members" variable and assign it to "--no-members" for the
"TAGS" case and pass that to the etags program to remove structures.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
Changes since v1: https://lore.kernel.org/all/20131115093645.6dc03918@gandalf.local.home/
- Use a no_members variable instead of hard coding the --no-members into
the etags call, as that can break some "tags" cases. (Michal Marek)
- Rebase to the current decade. Yes, v1 is from 2013. I've been carrying
this patch in my personal repos as a quilt entry where I would just push
it when doing a "make TAGS". I also have the conversation still in my
INBOX to remind me to send a v2. Talk about procrastination! It only
took me 13 years to send the v2 :-p
I'm still keeping the same Cc's. I wonder how many of them will be
broken. :-/
scripts/tags.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 243373683f98..018588014eed 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -305,7 +305,7 @@ exuberant()
emacs()
{
setup_regex emacs asm c
- all_target_sources | xargs $1 -a "${regex[@]}"
+ all_target_sources | xargs $1 -a $no_members "${regex[@]}"
setup_regex emacs kconfig
all_kconfigs | xargs $1 -a "${regex[@]}"
@@ -334,6 +334,7 @@ if [ "${ARCH}" = "um" ]; then
fi
remove_structs=
+no_members=
case "$1" in
"cscope")
docscope
@@ -353,6 +354,7 @@ case "$1" in
rm -f TAGS
xtags etags
remove_structs=y
+ no_members=--no-members
;;
esac
--
2.53.0
next reply other threads:[~2026-05-27 16:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 16:11 Steven Rostedt [this message]
2026-05-27 16:29 ` [PATCH v2] scripts: Have make TAGS not include structure members Peter Zijlstra
2026-05-27 16:31 ` [PATCH v2] scripts: Have make TAGS not include structure members' Peter Zijlstra
2026-05-27 18:47 ` [PATCH v2] scripts: Have make TAGS not include structure members Steven Rostedt
2026-05-27 19:36 ` Masatake YAMATO
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=20260527121144.08a1f676@fedora \
--to=rostedt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=hamo.by@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mmarek@suse.cz \
--cc=peterz@infradead.org \
--cc=sboyd@codeaurora.org \
--cc=yamato@redhat.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.