* [PATCH] scripts: Have make TAGS not include structure members
@ 2013-11-15 14:36 Steven Rostedt
2013-11-16 1:02 ` Stephen Boyd
2013-11-17 9:14 ` Geert Uytterhoeven
0 siblings, 2 replies; 16+ messages in thread
From: Steven Rostedt @ 2013-11-15 14:36 UTC (permalink / raw)
To: LKML; +Cc: Michal Marek, linux-kbuild, Yang Bai, Stephen Boyd, Andrew Morton
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@goodmis.org>
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/'
}
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-15 14:36 [PATCH] scripts: Have make TAGS not include structure members Steven Rostedt
@ 2013-11-16 1:02 ` Stephen Boyd
2013-11-16 1:20 ` Steven Rostedt
2013-11-17 9:14 ` Geert Uytterhoeven
1 sibling, 1 reply; 16+ messages in thread
From: Stephen Boyd @ 2013-11-16 1:02 UTC (permalink / raw)
To: Steven Rostedt, LKML; +Cc: Michal Marek, linux-kbuild, Yang Bai, Andrew Morton
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?
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-16 1:02 ` Stephen Boyd
@ 2013-11-16 1:20 ` Steven Rostedt
0 siblings, 0 replies; 16+ messages in thread
From: Steven Rostedt @ 2013-11-16 1:20 UTC (permalink / raw)
To: Stephen Boyd; +Cc: LKML, Michal Marek, linux-kbuild, Yang Bai, Andrew Morton
On Fri, 15 Nov 2013 17:02:36 -0800
Stephen Boyd <sboyd@codeaurora.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@goodmis.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/' \
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-15 14:36 [PATCH] scripts: Have make TAGS not include structure members Steven Rostedt
2013-11-16 1:02 ` Stephen Boyd
@ 2013-11-17 9:14 ` Geert Uytterhoeven
2013-11-17 14:27 ` Steven Rostedt
2013-11-19 23:59 ` Andrew Morton
1 sibling, 2 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2013-11-17 9:14 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Michal Marek, linux-kbuild, Yang Bai, Stephen Boyd, Andrew Morton
On Fri, Nov 15, 2013 at 3:36 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> 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.
While I'm also annoyed by this (although with vim/tags), I regularly do search
for struct members, so losing this ability would hurt, too.
Is there a solution, without throwing out the baby with the bath water?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-17 9:14 ` Geert Uytterhoeven
@ 2013-11-17 14:27 ` Steven Rostedt
2013-11-17 15:19 ` Geert Uytterhoeven
2013-11-19 23:59 ` Andrew Morton
1 sibling, 1 reply; 16+ messages in thread
From: Steven Rostedt @ 2013-11-17 14:27 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: LKML, Michal Marek, linux-kbuild, Yang Bai, Stephen Boyd, Andrew Morton
On Sun, 17 Nov 2013 10:14:46 +0100
Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Fri, Nov 15, 2013 at 3:36 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > 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.
>
> While I'm also annoyed by this (although with vim/tags), I regularly do search
> for struct members, so losing this ability would hurt, too.
>
> Is there a solution, without throwing out the baby with the bath water?
>
Or perhaps make it only do it for TAGS. vim gives you a list of
locations that you can go to, and even marks if it is a member of a
structure or a function or whatever. With emacs, you have to iterate
over each location. That is, with my devname example, I had to hit M^.
then Ctrl^U M^. another 12 times before I got to the function name.
It makes it absolutely worthless, that after two or three misses, I
give up and just grep for it.
I don't think there's a single emacs users that would not like this
change.
Thus, I'll make it for emacs only, and I think that will be a good
compromise.
-- Steve
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-17 14:27 ` Steven Rostedt
@ 2013-11-17 15:19 ` Geert Uytterhoeven
2013-11-17 17:08 ` Steven Rostedt
0 siblings, 1 reply; 16+ messages in thread
From: Geert Uytterhoeven @ 2013-11-17 15:19 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Michal Marek, linux-kbuild, Yang Bai, Stephen Boyd, Andrew Morton
On Sun, Nov 17, 2013 at 3:27 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
>> On Fri, Nov 15, 2013 at 3:36 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
>> > 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.
>>
>> While I'm also annoyed by this (although with vim/tags), I regularly do search
>> for struct members, so losing this ability would hurt, too.
>>
>> Is there a solution, without throwing out the baby with the bath water?
>>
>
> Or perhaps make it only do it for TAGS. vim gives you a list of
> locations that you can go to, and even marks if it is a member of a
> structure or a function or whatever. With emacs, you have to iterate
> over each location. That is, with my devname example, I had to hit M^.
> then Ctrl^U M^. another 12 times before I got to the function name.
> It makes it absolutely worthless, that after two or three misses, I
> give up and just grep for it.
Thanks! Now I have to look into my vim setup, why it doesn't do the
above...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-17 15:19 ` Geert Uytterhoeven
@ 2013-11-17 17:08 ` Steven Rostedt
2013-11-20 8:29 ` Geert Uytterhoeven
0 siblings, 1 reply; 16+ messages in thread
From: Steven Rostedt @ 2013-11-17 17:08 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: LKML, Michal Marek, linux-kbuild, Yang Bai, Stephen Boyd, Andrew Morton
On Sun, 17 Nov 2013 16:19:53 +0100
Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Thanks! Now I have to look into my vim setup, why it doesn't do the
> above...
>
$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 11 2013 12:28:07)
And from the ctags man pages, I did:
:ta dev_name
and it gave me a list of tags.
# pri kind tag file
1 F m dev_name drivers/clk/samsung/clk.h
struct:samsung_clock_alias
const char *dev_name;
2 F m dev_name drivers/clk/samsung/clk.h
struct:samsung_div_clock
const char *dev_name;
3 F m dev_name drivers/clk/samsung/clk.h
struct:samsung_gate_clock
const char *dev_name;
4 F m dev_name drivers/clk/samsung/clk.h
struct:samsung_mux_clock
const char *dev_name;
5 F m dev_name drivers/clk/samsung/clk.h
struct:samsung_pll_clock
const char *dev_name;
6 F m dev_name drivers/edac/edac_core.h
struct:edac_device_ctl_info
const char *dev_name; /* pci/platform/etc... name */
7 F m dev_name drivers/edac/edac_core.h
struct:edac_pci_ctl_info
const char *dev_name; /* pci/platform/etc... name */
8 F m dev_name drivers/infiniband/hw/cxgb3/cxio_hal.h
struct:cxio_rdev
char dev_name[T3_MAX_DEV_NAME_LEN];
9 F m dev_name drivers/pinctrl/core.h
struct:pinctrl_setting
const char *dev_name;
10 F m dev_name drivers/scsi/dpt/dpti_i2o.h
struct:i2o_device
char dev_name[8]; /* linux /dev name if available */
11 F v dev_name drivers/target/target_core_stat.c
DEV_STAT_SCSI_TRANSPORT_ATTR_RO(dev_name);
12 F m dev_name drivers/video/cyber2000fb.h
struct:cyberpro_info
char dev_name[32];
13 F m dev_name drivers/video/sticore.h
struct:sti_conf_outptr
u8 dev_name[STI_DEV_NAME_LENGTH]; /* null terminated product name */
14 F m dev_name include/linux/device.h
struct:bus_type
const char *dev_name;
15 F f dev_name include/linux/device.h
static inline const char *dev_name(const struct device *dev)
16 F m dev_name include/linux/edac.h
struct:mem_ctl_info
const char *dev_name;
17 F m dev_name include/linux/mfd/ti_ssp.h
struct:ti_ssp_dev_data
const char *dev_name;
18 F m dev_name include/linux/netpoll.h
struct:netpoll
char dev_name[IFNAMSIZ];
19 F m dev_name include/linux/omap-dma.h
struct:omap_dma_lch
const char *dev_name;
20 F m dev_name include/linux/phy/phy.h
struct:phy_consumer
const char *dev_name;
21 F m dev_name include/linux/pinctrl/machine.h
struct:pinctrl_map
const char *dev_name;
22 F m dev_name include/linux/regulator/machine.h
struct:regulator_consumer_supply
-- More --
-- Steve
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-17 9:14 ` Geert Uytterhoeven
2013-11-17 14:27 ` Steven Rostedt
@ 2013-11-19 23:59 ` Andrew Morton
2013-11-20 0:04 ` Steven Rostedt
1 sibling, 1 reply; 16+ messages in thread
From: Andrew Morton @ 2013-11-19 23:59 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Steven Rostedt, LKML, Michal Marek, linux-kbuild, Yang Bai, Stephen Boyd
On Sun, 17 Nov 2013 10:14:46 +0100 Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Fri, Nov 15, 2013 at 3:36 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > 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.
>
> While I'm also annoyed by this (although with vim/tags), I regularly do search
> for struct members, so losing this ability would hurt, too.
metoo.
> Is there a solution, without throwing out the baby with the bath water?
Remove the tags for those struct members whose name duplicates some
other symbol?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-19 23:59 ` Andrew Morton
@ 2013-11-20 0:04 ` Steven Rostedt
2013-11-20 0:08 ` Andrew Morton
0 siblings, 1 reply; 16+ messages in thread
From: Steven Rostedt @ 2013-11-20 0:04 UTC (permalink / raw)
To: Andrew Morton
Cc: Geert Uytterhoeven, LKML, Michal Marek, linux-kbuild, Yang Bai,
Stephen Boyd
On Tue, 19 Nov 2013 15:59:07 -0800
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Sun, 17 Nov 2013 10:14:46 +0100 Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> > On Fri, Nov 15, 2013 at 3:36 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > > 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.
> >
> > While I'm also annoyed by this (although with vim/tags), I regularly do search
> > for struct members, so losing this ability would hurt, too.
>
> metoo.
You're a vim user too. Do I hear any complaints about removing it just
for emacs users?
>
> > Is there a solution, without throwing out the baby with the bath water?
>
> Remove the tags for those struct members whose name duplicates some
> other symbol?
For vim, I could write a perl script that could do that.
-- Steve
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-20 0:04 ` Steven Rostedt
@ 2013-11-20 0:08 ` Andrew Morton
2013-11-20 0:14 ` Steven Rostedt
0 siblings, 1 reply; 16+ messages in thread
From: Andrew Morton @ 2013-11-20 0:08 UTC (permalink / raw)
To: Steven Rostedt
Cc: Geert Uytterhoeven, LKML, Michal Marek, linux-kbuild, Yang Bai,
Stephen Boyd
On Tue, 19 Nov 2013 19:04:26 -0500 Steven Rostedt <rostedt@goodmis.org> wrote:
> On Tue, 19 Nov 2013 15:59:07 -0800
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
> > On Sun, 17 Nov 2013 10:14:46 +0100 Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >
> > > On Fri, Nov 15, 2013 at 3:36 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > > > 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.
> > >
> > > While I'm also annoyed by this (although with vim/tags), I regularly do search
> > > for struct members, so losing this ability would hurt, too.
> >
> > metoo.
>
> You're a vim user too.
You really don't wanna know what I use ;)
> Do I hear any complaints about removing it just
> for emacs users?
Probably not, as only 0.0001% of them are reading this thread :(
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-20 0:08 ` Andrew Morton
@ 2013-11-20 0:14 ` Steven Rostedt
2013-11-20 0:18 ` Stephen Boyd
0 siblings, 1 reply; 16+ messages in thread
From: Steven Rostedt @ 2013-11-20 0:14 UTC (permalink / raw)
To: Andrew Morton
Cc: Geert Uytterhoeven, LKML, Michal Marek, linux-kbuild, Yang Bai,
Stephen Boyd
On Tue, 19 Nov 2013 16:08:55 -0800
Andrew Morton <akpm@linux-foundation.org> wrote:
> > Do I hear any complaints about removing it just
> > for emacs users?
>
> Probably not, as only 0.0001% of them are reading this thread :(
Then I'm guessing that the answer is to just do it for emacs users.
That way, if anyone uses this feature, they will complain then :-)
The worse we can do is to just revert it, as this isn't something like
a user ABI or anything.
-- Steve
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-20 0:14 ` Steven Rostedt
@ 2013-11-20 0:18 ` Stephen Boyd
2013-11-20 0:34 ` Steven Rostedt
0 siblings, 1 reply; 16+ messages in thread
From: Stephen Boyd @ 2013-11-20 0:18 UTC (permalink / raw)
To: Steven Rostedt, Andrew Morton
Cc: Geert Uytterhoeven, LKML, Michal Marek, linux-kbuild, Yang Bai
On 11/19/13 16:14, Steven Rostedt wrote:
> On Tue, 19 Nov 2013 16:08:55 -0800
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
>
>>> Do I hear any complaints about removing it just
>>> for emacs users?
>> Probably not, as only 0.0001% of them are reading this thread :(
> Then I'm guessing that the answer is to just do it for emacs users.
> That way, if anyone uses this feature, they will complain then :-)
>
> The worse we can do is to just revert it, as this isn't something like
> a user ABI or anything.
I didn't have exuberant-ctags installed so 'make tags' was building the
emacs tag file as 'tags' and vim was using it just fine. Please note
that you may be affecting vim users with this change if they haven't
installed exuberant-ctags.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-20 0:18 ` Stephen Boyd
@ 2013-11-20 0:34 ` Steven Rostedt
2014-01-03 13:24 ` mmarek
0 siblings, 1 reply; 16+ messages in thread
From: Steven Rostedt @ 2013-11-20 0:34 UTC (permalink / raw)
To: Stephen Boyd
Cc: Andrew Morton, Geert Uytterhoeven, LKML, Michal Marek,
linux-kbuild, Yang Bai
On Tue, 19 Nov 2013 16:18:07 -0800
Stephen Boyd <sboyd@codeaurora.org> wrote:
> I didn't have exuberant-ctags installed so 'make tags' was building the
> emacs tag file as 'tags' and vim was using it just fine. Please note
> that you may be affecting vim users with this change if they haven't
> installed exuberant-ctags.
I'm aware of that, as one of my boxes I tested this on also doesn't have
exuberant-ctags either.
I wasn't going to use this change, but instead add this change:
---
scripts/tags.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-trace.git/scripts/tags.sh
===================================================================
--- linux-trace.git.orig/scripts/tags.sh 2013-11-19 19:29:34.352371615 -0500
+++ linux-trace.git/scripts/tags.sh 2013-11-19 19:32:37.821152204 -0500
@@ -218,7 +218,7 @@ exuberant()
emacs()
{
- all_target_sources | xargs $1 -a \
+ all_target_sources | xargs $@ -a \
--regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \
--regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \
--regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \
@@ -263,7 +263,7 @@ xtags()
if $1 --version 2>&1 | grep -iq exuberant; then
exuberant $1
elif $1 --version 2>&1 | grep -iq emacs; then
- emacs $1
+ emacs $@
else
all_target_sources | xargs $1 -a
fi
@@ -313,7 +313,7 @@ case "$1" in
"TAGS")
rm -f TAGS
- xtags etags
+ xtags etags --no-members
remove_structs=y
;;
esac
-- Steve
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-17 17:08 ` Steven Rostedt
@ 2013-11-20 8:29 ` Geert Uytterhoeven
0 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2013-11-20 8:29 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Michal Marek, linux-kbuild, Yang Bai, Stephen Boyd, Andrew Morton
On Sun, Nov 17, 2013 at 6:08 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Sun, 17 Nov 2013 16:19:53 +0100
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
>> Thanks! Now I have to look into my vim setup, why it doesn't do the
>> above...
>
> $ vim --version
> VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 11 2013 12:28:07)
I have 7.3.
> And from the ctags man pages, I did:
>
> :ta dev_name
>
> and it gave me a list of tags.
Not for me.
> # pri kind tag file
> 1 F m dev_name drivers/clk/samsung/clk.h
> struct:samsung_clock_alias
> const char *dev_name;
I do remember seeing such a list on a different machine, though.
However, this encouraged me to dive into some docs.
":ts <tag>" (or just ":ts" after a previous ":ta") does give me the list.
The same for "g CTRL-]" instead of plain "CTRL-]", so I'm happy now ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2013-11-20 0:34 ` Steven Rostedt
@ 2014-01-03 13:24 ` mmarek
2014-01-06 19:32 ` Steven Rostedt
0 siblings, 1 reply; 16+ messages in thread
From: mmarek @ 2014-01-03 13:24 UTC (permalink / raw)
To: Steven Rostedt
Cc: Stephen Boyd, Andrew Morton, Geert Uytterhoeven, LKML,
linux-kbuild, Yang Bai
On Tue, Nov 19, 2013 at 07:34:14PM -0500, Steven Rostedt wrote:
> I wasn't going to use this change, but instead add this change:
[...]
> --- linux-trace.git.orig/scripts/tags.sh 2013-11-19 19:29:34.352371615 -0500
> +++ linux-trace.git/scripts/tags.sh 2013-11-19 19:32:37.821152204 -0500
> @@ -218,7 +218,7 @@ exuberant()
>
> emacs()
> {
> - all_target_sources | xargs $1 -a \
> + all_target_sources | xargs $@ -a \
> --regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \
> --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \
> --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \
> @@ -263,7 +263,7 @@ xtags()
> if $1 --version 2>&1 | grep -iq exuberant; then
> exuberant $1
> elif $1 --version 2>&1 | grep -iq emacs; then
> - emacs $1
> + emacs $@
> else
> all_target_sources | xargs $1 -a
> fi
> @@ -313,7 +313,7 @@ case "$1" in
>
> "TAGS")
> rm -f TAGS
> - xtags etags
> + xtags etags --no-members
> remove_structs=y
The logic looks OK, but it is not completely obvious that $@ means
'etags --no-members, iff called as etags'. How about using a more
descriptive variable like this?
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 58c4559..3afc479 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -219,7 +219,7 @@ exuberant()
emacs()
{
- all_target_sources | xargs $1 -a \
+ all_target_sources | xargs $1 $no_members -a \
--regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \
--regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \
--regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \
@@ -308,12 +308,15 @@ case "$1" in
"tags")
rm -f tags
+ no_members=
xtags ctags
remove_structs=y
;;
"TAGS")
rm -f TAGS
+ # Do not index struct members when generating Emacs TAGS
+ no_members=--no-members
xtags etags
remove_structs=y
;;
Michal
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH] scripts: Have make TAGS not include structure members
2014-01-03 13:24 ` mmarek
@ 2014-01-06 19:32 ` Steven Rostedt
0 siblings, 0 replies; 16+ messages in thread
From: Steven Rostedt @ 2014-01-06 19:32 UTC (permalink / raw)
To: mmarek
Cc: Stephen Boyd, Andrew Morton, Geert Uytterhoeven, LKML,
linux-kbuild, Yang Bai
On Fri, 3 Jan 2014 14:24:32 +0100
mmarek <mmarek@suse.cz> wrote:
>
> The logic looks OK, but it is not completely obvious that $@ means
Hmm, it $@ is standard shell variable of "all commands". In fact, we
probably should change all the $1 to that instead. But I don't care how
we do it.
> 'etags --no-members, iff called as etags'. How about using a more
> descriptive variable like this?
>
> diff --git a/scripts/tags.sh b/scripts/tags.sh
> index 58c4559..3afc479 100755
> --- a/scripts/tags.sh
> +++ b/scripts/tags.sh
> @@ -219,7 +219,7 @@ exuberant()
>
> emacs()
> {
> - all_target_sources | xargs $1 -a \
> + all_target_sources | xargs $1 $no_members -a \
> --regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/' \
> --regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/' \
> --regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/' \
> @@ -308,12 +308,15 @@ case "$1" in
>
> "tags")
> rm -f tags
> + no_members=
> xtags ctags
> remove_structs=y
> ;;
>
> "TAGS")
> rm -f TAGS
> + # Do not index struct members when generating Emacs TAGS
> + no_members=--no-members
> xtags etags
Sure, I'll update this and send another patch.
Thanks,
-- Steve
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2014-01-06 19:32 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-15 14:36 [PATCH] scripts: Have make TAGS not include structure members Steven Rostedt
2013-11-16 1:02 ` Stephen Boyd
2013-11-16 1:20 ` Steven Rostedt
2013-11-17 9:14 ` Geert Uytterhoeven
2013-11-17 14:27 ` Steven Rostedt
2013-11-17 15:19 ` Geert Uytterhoeven
2013-11-17 17:08 ` Steven Rostedt
2013-11-20 8:29 ` Geert Uytterhoeven
2013-11-19 23:59 ` Andrew Morton
2013-11-20 0:04 ` Steven Rostedt
2013-11-20 0:08 ` Andrew Morton
2013-11-20 0:14 ` Steven Rostedt
2013-11-20 0:18 ` Stephen Boyd
2013-11-20 0:34 ` Steven Rostedt
2014-01-03 13:24 ` mmarek
2014-01-06 19:32 ` Steven Rostedt
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.