[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131115202013.252e3a24@gandalf.local.home>
Date: Fri, 15 Nov 2013 20:20:13 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Stephen Boyd <sboyd@...eaurora.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Michal Marek <mmarek@...e.cz>,
linux-kbuild@...r.kernel.org, Yang Bai <hamo.by@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] scripts: Have make TAGS not include structure members
On Fri, 15 Nov 2013 17:02:36 -0800
Stephen Boyd <sboyd@...eaurora.org> wrote:
> On 11/15/13 06:36, Steven Rostedt wrote:
> > diff --git a/scripts/tags.sh b/scripts/tags.sh
> > index 74f02e4..b985371 100755
> > --- a/scripts/tags.sh
> > +++ b/scripts/tags.sh
> > @@ -218,7 +218,7 @@ exuberant()
> >
> > emacs()
> > {
> > - all_target_sources | xargs $1 -a \
> > + all_target_sources | xargs $1 -a --no-members \
> > --regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \
> > --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \
> > --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \
> > @@ -248,13 +248,13 @@ emacs()
> > --regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \
> > --regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/'
> >
> > - all_kconfigs | xargs $1 -a \
> > + all_kconfigs | xargs $1 -a --no-members \
> > --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'
> >
> > - all_kconfigs | xargs $1 -a \
> > + all_kconfigs | xargs $1 -a --no-members \
> > --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/CONFIG_\3/'
> >
> > - all_defconfigs | xargs -r $1 -a \
> > + all_defconfigs | xargs -r $1 -a --no-members \
> > --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'
> > }
> >
>
> Does it actually matter for the kconfigs and defconfigs?
>
Actually no. I noticed that after I sent the patch. Here's v2:
scripts: Have make TAGS not include structure members
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 and ctags program comes with an option
"--no-members", which does exactly what I want, and I'm sure all other
kernel developers want too.
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
Index: linux-trace.git/scripts/tags.sh
===================================================================
--- linux-trace.git.orig/scripts/tags.sh
+++ linux-trace.git/scripts/tags.sh
@@ -218,7 +218,7 @@ exuberant()
emacs()
{
- all_target_sources | xargs $1 -a \
+ all_target_sources | xargs $1 -a --no-members \
--regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \
--regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \
--regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists