1
0
Fork 0
Commit Graph

70 Commits (faf50ef0dec164eb4033ec228d305c25f8338215)

Author SHA1 Message Date
Robert Jarzmik cbf52a3e6a tags: honor COMPILED_SOURCE with apart output directory
When the kernel is compiled with an "O=" argument, the object files are
not in the source tree, but in the build tree.

This patch fixes O= build by looking for object files in the build tree.

Fixes: 923e02ecf3 ("scripts/tags.sh: Support compiled source")
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-06-06 08:42:34 +09:00
Hou Tao 7659c655be scripts/tags.sh: include arch/Kconfig* for tags generation
Kconfig files under arch/ directory are ignored by all_kconfigs(),
so include them for tags generation.

Link: http://lkml.kernel.org/r/1486206053-38223-1-git-send-email-houtao1@huawei.com
Signed-off-by: Hou Tao <houtao1@huawei.com>
Cc: Michal Marek <mmarek@suse.com>
Cc: Joe Perches <joe@perches.com>
Cc: Mathieu Maret <mathieu.maret@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-22 16:41:26 -08:00
Sam Protsenko 779d5eb375 scripts/tags.sh: handle OMAP platforms properly
When SUBARCH is "omap1" or "omap2", plat-omap/ directory must be
indexed.  Handle this special case properly.

While at it, check if mach- directory exists at all.

Link: http://lkml.kernel.org/r/20161202122148.15001-1-joe.skb7@gmail.com
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Cc: Michal Marek <mmarek@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-12 18:55:06 -08:00
Mathieu Maret d0c75f33f0 scripts/tags.sh: enable code completion in VIM
Vim, with the omnicppcomplete(#1) plugin, can do code completion using
information build by ctags.  Add flags needed by omnicppcomplete(#2) to
have completion on member of structure.

1: https://github.com/vim-scripts/omnicppcomplete
2: https://github.com/vim-scripts/OmniCppComplete/blob/master/doc/omnicppcomplete.txt#L93

Link: http://lkml.kernel.org/r/20160830191546.4469-1-mathieu.maret@gmail.com
Signed-off-by: Mathieu Maret <mathieu.maret@gmail.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-10-11 15:06:33 -07:00
Joe Perches 7e93215990 treewide: remove references to the now unnecessary DEFINE_PCI_DEVICE_TABLE
It's been eliminated from the sources, remove it from everywhere else.

Link: http://lkml.kernel.org/r/076eff466fd7edb550c25c8b25d76924ca0eba62.1472660229.git.joe@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-09-01 17:52:01 -07:00
Vladimir Davydov 632c0a1aff mm: clean up non-standard page->_mapcount users
- Add a proper comment to page->_mapcount.

 - Introduce a macro for generating helper functions.

 - Place all special page->_mapcount values next to each other so that
   readers can see all possible values and so we don't get duplicates.

Link: http://lkml.kernel.org/r/502f49000e0b63e6c62e338fac6b420bf34fb526.1464079537.git.vdavydov@virtuozzo.com
Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-07-26 16:19:19 -07:00
Naveen N. Rao 0a9e7da660 scripts/tags.sh: add regex to map kprobe helpers
Add regex for [get|free]_[insn|optinsn|dmainsn]_slot() functions.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-02-18 20:56:37 +01:00
Linus Torvalds 90bf353bc1 Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull misc kbuild updates from Michal Marek:
 - Fix for make O=... perf-tar*
 - make tags revamp and fix for the fallout.  Patch for warnings about
   line breaks inside DEFINE_PER_CPU macros is pending
 - New coccinelle test

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  coccinelle: tests: unsigned value cannot be lesser than zero
  tags: Unify emacs and exuberant rules
  tags: Drop the _PE rule
  tags: Do not try to index defconfigs
  tags: Process Kconfig files in a single pass
  tags: Fix erroneous pattern match in a comment
  aic7xxx: Avoid name collision with <linux/list.h>
  tags: Treat header files as C code
  package Makefile: fix perf-tar targets when outdir is set
  scripts/tags.sh: Teach tags about more powerpc macros
2016-01-20 10:10:23 -08:00
Kirill A. Shutemov 685eaade56 page-flags: drop __TestClearPage*() helpers
Nobody uses them.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-01-15 17:56:32 -08:00
Michal Marek 93209d65c1 tags: Unify emacs and exuberant rules
The emacs rules were constantly lagging behind the exuberant ones. Use a
single set of rules for both, to make the script easier to maintain.
The language understood by both tools is basic regular expression with
some limitations, which are documented in a comment. To be able to store
the rules in an array and easily iterate over it, the script requires
bash now. In the exuberant case, the change fixes some false matches in
<linux/page-flags.h> and also some too greedy matches in the arguments
of the DECLARE_*/DEFINE_* macros. In the emacs case, several previously
not working rules are matching now. Tested with these versions of the
tools:

  Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  etags (GNU Emacs 24.5)

Signed-off-by: Michal Marek <mmarek@suse.com>
2016-01-05 22:18:48 +01:00
Michal Marek a1ccdb63b5 tags: Drop the _PE rule
We are not indexing the userspace tools, so the rules only match some
false positives in the kernel code.

Signed-off-by: Michal Marek <mmarek@suse.com>
2016-01-05 22:11:48 +01:00
Michal Marek ab9ca615f5 tags: Do not try to index defconfigs
The defconfig files are in predictable locations, so there is no need to
index them. Plus, the script was only looking for files named
'defconfig', which only works on a few architectures nowadays.

Signed-off-by: Michal Marek <mmarek@suse.com>
2016-01-05 22:10:45 +01:00
Michal Marek a281b8569e tags: Process Kconfig files in a single pass
Signed-off-by: Michal Marek <mmarek@suse.com>
2016-01-05 22:10:42 +01:00
Michal Marek c26206f23a tags: Fix erroneous pattern match in a comment
Apparently, ctags applies the rules before deleting comments:

ctags: Warning: include/linux/completion.h:22: null expansion of name pattern "\2"

Work around this particular case by requiring the group to contain at
least one character. Leave the other patters as they are, until a better
solution is found.

Signed-off-by: Michal Marek <mmarek@suse.com>
2016-01-05 22:10:39 +01:00
Michal Marek d2fb5aeda9 tags: Treat header files as C code
This allows to apply the same patters to both source and header files.
The effect is mostly visible in the case of DECLARE_BITMAP, but there
are small gains all over the place. There is also lots of random changes
in the diff, I believe this is simply because there are still lots of
unexpanded macros in the code and the C and C++ parsers fail and recover
at different points. Also, qconf.h is parsed as C, but that's a
negligible regression.

Signed-off-by: Michal Marek <mmarek@suse.com>
2016-01-05 22:10:29 +01:00
Michael Ellerman 0f684317a7 scripts/tags.sh: Teach tags about more powerpc macros
Teach tags.sh about the powerpc PCI macros, eg. readl/writel etc.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Michal Marek <mmarek@suse.com>
2015-11-20 15:50:34 +01:00
Michael Ellerman 60fb33afb9 scripts/tags.sh: Teach tags about some powerpc macros
The IO accessors on powerpc are generated using macro fu, ie. out_be32()
etc. Also there are some debugger related symbols that are macro
generated. Teach scripts/tags.sh about both.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Michal Marek <mmarek@suse.com>
2015-10-13 13:53:57 +02:00
Linus Torvalds d9241b22b5 Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull misc kbuild updates from Michal Marek:
 - deb-pkg:
     + module signing fix
     + dtb files are added to the package
     + do not require `hostname -f` to work during build
     + make deb-pkg generates a source package, bindeb-pkg has been
       added to only generate the binary package
 - rpm-pkg packages /lib/modules as well
 - new coccinelle patch and updates to existing ones
 - new stackusage & stackdelta script to collect and compare stack usage
   info (using gcc's -fstack-usage)
 - make tags understands trace_*_rcuidle() macros
 - .gitignore updates, misc cleanups

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (27 commits)
  deb-pkg: add source package
  package/Makefile: move source tar creation to a function
  scripts: add stackdelta script
  kbuild: remove *.su files generated by -fstack-usage
  .gitignore: add *.su pattern
  scripts: add stackusage script
  kbuild: avoid listing /lib/modules in kernel spec file
  fallback to hostname in scripts/package/builddeb
  coccinelle: api: extend spatch for dropping unnecessary owner
  deb-pkg: simplify directory creation
  scripts/tags.sh: Include trace_*_rcuidle() in tags
  scripts/package/Makefile: rpmbuild is needed for rpm targets
  Kbuild: Add ID files to .gitignore
  gitignore: Add MIPS vmlinux.32 to the list
  coccinelle: simple_return: Add a blank line
  coccinelle: irqf_oneshot.cocci: Improve the generated commit log
  coccinelle: api: add vma_pages.cocci
  scripts/coccinelle/misc/irqf_oneshot.cocci: Fix grammar
  scripts/coccinelle/misc/semicolon.cocci: Use imperative mood
  coccinelle: simple_open: Use imperative mood
  ...
2015-09-08 14:23:13 -07:00
Stephen Boyd 3c42f0b803 scripts/tags.sh: Include trace_*_rcuidle() in tags
Every tracepoint creates two functions, the usual one 'trace_*()'
and the rcuidle one 'trace_*_rcuidle()'. Add regex for the
rcuidle variant so that we can jump to the tracepoints that use
rcuidle.

Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
2015-08-19 15:26:30 +02:00
Paul Gortmaker 22c1587adf init: delete the __cpuinit related stubs
The __cpuinit support was removed several releases ago in 3.11-rc1 with
commit 22f0a27367 ("init.h: remove __cpuinit
sections from the kernel")

People have had a chance to update their out of tree code, so now we remove
the no-op stubs to ensure no more new use cases can creep back in.

Also delete the mention of __cpuinitdata from the tag script.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2015-06-16 14:12:23 -04:00
Linus Torvalds da92da3638 Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull misc kbuild updates from Michal Marek:
 "This is the less critical kbuild stuff for v3.18-rc1:

   - make deb-pkg debuginfo fix, ppc64el support and warning fix for
     recent dpkg tools
   - make TAGS fixes
   - new coccinelle patch
   - kbuild documentation improvements"

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  deb-pkg: remove obsolete -isp option to dpkg-gencontrol
  coccinelle: misc: semantic patch to delete overly complex return code processing
  deb-pkg: Add support for powerpc little endian
  builddeb: put the dbg files into the correct directory
  scripts/tags.sh: fix DEFINE_HASHTABLE in emacs case
  scripts/tags.sh: remove *PCGFLAGS regular expressions
  scripts/tags.sh: Don't specify kind-spec for emacs' ctags/etags
  Documentation: kbuild: Improve grammar
  Documentation: kbuild: Remove obsolete dtc_cpp section
  Documentation: kbuild: Improve if_changed documentation
  Documentation: kbuild: Remove obsolete include/asm symlink step
2014-10-14 09:27:48 +02:00
Zefan Li e0e5070b20 sched: add macros to define bitops for task atomic flags
This will simplify code when we add new flags.

v3:
- Kees pointed out that no_new_privs should never be cleared, so we
shouldn't define task_clear_no_new_privs(). we define 3 macros instead
of a single one.

v2:
- updated scripts/tags.sh, suggested by Peter

Cc: Ingo Molnar <mingo@kernel.org>
Cc: Miao Xie <miaox@cn.fujitsu.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2014-09-24 22:16:06 -04:00
Dirk Gouders 8e170655b5 scripts/tags.sh: fix DEFINE_HASHTABLE in emacs case
The emacs --regex for DEFINE_HASHTABLE produced a warning because of
an unmatched '\('.  Further, the whole entry did not work, because the
regex needs to match from the beginning of a line, including keywords
like 'static'.  Finally, '\w' should not be used, because it
stops at underscores which are often part of variable names in C,
resulting in wrong entries in the tags file.

Signed-off-by: Dirk Gouders <dirk@gouders.net>
Inspired-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-08-19 11:12:43 +02:00
Dirk Gouders a60113d6a7 scripts/tags.sh: remove *PCGFLAGS regular expressions
Commit 0a31bc97c8 (mm: memcontrol: rewrite uncharge API)
removed the macros {TEST,SET,CLEAR,TESTCLEAR}PCFLAG.  Remove
corresponding entries from tags.sh -- in the emacs case they also
produced warnigs because of unmatched '\('.

Signed-off-by: Dirk Gouders <dirk@gouders.net>
Inspired-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-08-19 11:12:43 +02:00
Dirk Gouders 8bf4abaddd scripts/tags.sh: Don't specify kind-spec for emacs' ctags/etags
Emacs' ctags/etags don't know about kind-spec in --regex and
produce warnings:

etags: invalid regexp modifier `v', ignoring
etags: invalid regexp modifier `/', ignoring

Fix it by removing kind-spec for the emacs case.

Signed-off-by: Dirk Gouders <dirk@gouders.net>
Inspired-by: Masatake YAMATO <yamato@redhat.com>
Tested-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-08-19 11:12:43 +02:00
Catalin Marinas c965526a82 scripts/tags.sh: include compat_sys_* symbols in the generated tags
Since the kernel now has a COMPAT_SYSCALL infrastructure via commit
4683661388 ("COMPAT_SYSCALL_DEFINE: infrastructure"), add the
corresponding regex for generating compat_sys_* symbols in the tags
files (similar to sys_*).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:27 -07:00
Masahiro Yamada bb66fc6719 kbuild: trivial - use tabs for code indent where possible
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-06-10 14:00:53 +02:00
Yann Droneaud 9b24a15d81 scripts/tags.sh: ignore symlink'ed source files
Since commit 22d651dcef ('selftests/powerpc:
Import Anton's memcpy / copy_tofrom_user tests'), some source files in the
tree appear as symlink.
Until commit 8c38a5328a ('scripts/tags.sh:
ignore code of user space tools'), those symlinks made cscope report some
warnings:

    $ make ALLSOURCE_ARCHS=all O=./obj-cscope/ cscope
      GEN     cscope
    cscope: cannot find
file .../tools/testing/selftests/powerpc/copyloops/copyuser_power7.S
    cscope: cannot find
file .../tools/testing/selftests/powerpc/copyloops/memcpy_64.S
    cscope: cannot find
file .../tools/testing/selftests/powerpc/copyloops/memcpy_power7.S
    cscope: cannot find
file .../tools/testing/selftests/powerpc/copyloops/copyuser_64.S

In order to prevent the same kind of warnings to be triggered by future
addition of symlinks, the best option is to ignore all symlinks when
building the file list to be processed by cscope (and other tools
supported by scripts/tags.sh).

Ignoring symlinks won't hide source files from cscope (and others) as the
target of these symlinks already appear somewhere else in the tree, and,
as such, should be processed by cscope (or others).

Note that, cscope, when used with -R option to make it find the files to
process by itself, already skip symlinks: it's not expected that cscope
access source files through symlink.

On top of commit 8c38a5328a ('scripts/tags.sh:
ignore code of user space tools'), scripts/tags.sh output from
"make cscope tags TAGS" is the same with and without this patch: it doesn't
seems to introduce any regression (on Fedora 20).

Link: http://lkml.kernel.org/r/1396530975.4361.28.camel@localhost.localdomain
Link: http://mid.gmane.org/534312F8.5090609@t-online.de
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Anton Blanchard <anton@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Hans-Bernhard Bröker <broeker@users.sourceforge.net>,
Cc: Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>,
Cc: Neil Horman <nhorman@users.sourceforge.net>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Gerhard Sittig <gsi@denx.de>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-06-09 22:59:24 +02:00
Jianyu Zhan 79c704a878 scripts/tags.sh: add regular expression replacement pattern for memcg
Currently, while using ctags to read code, we would get stumbled on
PageCgroup* symbols: no definition found. And it is quite dull to
manually dig it out.

This patch adds regular expression replacement pattern for such symbols,
like what have done for the PageXXX flag. It will teach ctags to find
out the definition for us.

Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-05-14 13:43:05 +02:00
Konstantin Khlebnikov 8c38a5328a scripts/tags.sh: ignore code of user space tools
User space code in tools/ often reuses names of kernel constructions,
this confuses navigation in the normal kernel code. Let's fix this mess.

Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-04-24 15:16:57 +02:00
Jianyu Zhan 3005286ee3 scripts/tags.sh: add pattern for DEFINE_HASHTABLE
Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-04-16 23:25:41 +02:00
Prarit Bhargava ae63b2d7bd scripts/tags.sh: Ignore *.mod.c
CONFIG_MODVERSIONS=y results in a .mod.c for every compiled file in the
kernel. Issuing a 'make cscope' on a compiled kernel tree results in
the cscope files containing *.mod.c files.

[prarit@prarit linux]# make cscope
[prarit@prarit linux]# cat cscope.files | grep mod.c | wc -l
4807

These files are not useful for cscope and should be ignored. For example,

   #   line  filename / context / line
   1    105  arch/x86/kvm/kvm-intel.mod.c <<GLOBAL>>
             { 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },
   2    508  drivers/block/mtip32xx/mtip32xx.h <<GLOBAL>>
             int numa_node;
   3     55  drivers/block/mtip32xx/mtip32xx.mod.c <<GLOBAL>>
             { 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },
   4     37  drivers/cpufreq/acpi-cpufreq.mod.c <<GLOBAL>>
             { 0x618911fc, __VMLINUX_SYMBOL_STR(numa_node) },
   <snip>

Add an export to RCS_FIND_IGNORE so it can be used in scripts/tags.sh
and add explicitly ignore *.mod.c files.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kirill Tkhai <tkhai@yandex.ru>
Cc: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-02-06 16:52:07 +01:00
Michael Opdenacker 6cf3a6eff7 scripts/tags.sh: remove obsolete __devinit[const|data]
This removes the use of __devinitconst and __devinitdata in scripts/tags.sh,
which were removed in 3.8.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-11-08 10:57:20 +01:00
Kirill Tkhai f5a82137a5 scripts/tags.sh: Increase identifier list
Add		__maybe_unused
		__always_unused
		__cacheline_aligned
		__cacheline_aligned_in_smp
		ACPI_EXPORT_SYMBOL
to the list.

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-10-23 15:08:49 +02:00
Kirill Tkhai 987d0c8e9d scripts/tags.sh: Add magic for OFFSET and DEFINE
Add rules for definitions which is generally used in asm-offsets files.

Signed-off-by: Kirill V Tkhai <tkhai@yandex.ru>
CC: Michal Marek <mmarek@suse.cz>
CC: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-03-27 14:22:03 +01:00
Linus Torvalds ad60a93330 Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull misc non-critical kbuild changes from Michal Marek:

 - Fix for make TAGS

 - Fix for make rpm

 - Some new coccinelle semantic patches

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  scripts/coccinelle: find constant additions that could be bit ors
  coccicheck: Allow to show the executed command line
  coccicheck: Allow the user to give a V= (verbose) argument
  scripts/coccinelle/misc/memcpy-assign.cocci: Replace memcpy with struct assignment
  kbuild: clear KBUILD_SRC when calling 'make' in RPM spec
  scripts/coccinelle/misc/semicolon.cocci: Add unneeded semicolon test
  scripts/tags.sh: Fix regex syntax for etags
2013-02-27 12:27:18 -08:00
Kirill Tkhai 1b2643f0d0 scripts/tags.sh: add ctags magic for declarations of popular kernel type
- Add magic for declarations of variables of popular kernel type like
  spinlock_t, list_head, wait_queue_head_t and other.

- Add a set of specially handled declaration extentions like
  __attribute, __aligned and other.

- Simplify pci_bus_* magic

Signed-off-by: Kirill V Tkhai <tkhai@yandex.ru>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21 17:22:19 -08:00
Andreas Schwab 9f14b42012 scripts/tags.sh: Fix regex syntax for etags
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Tested-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-01-13 22:15:27 +01:00
Joonsoo Kim 923e02ecf3 scripts/tags.sh: Support compiled source
We usually have interst in compiled files only,
because they are strongly related to individual's work.
Current tags.sh can't select compiled files, so support it.

We can use this functionality like below.
"make cscope O=. SRCARCH=xxxx COMPILED_SOURCE=compiled"

It must be executed after building the kernel.

Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-12-11 14:25:42 +01:00
Joonsoo Kim 596585090a scripts/tags.sh: Support subarch for ARM
Current tags.sh doesn't handle subarch for ARM.
There are too many subarch on ARM, it is hard that we locate some
functions which are defined in every subarch with tags util family.
Therefore support subarch for removing this unconvenience.

We can use ARM subarch functionality like below.
"make cscope O=. SRCARCH=arm SUBARCH=xxx"

Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-12-11 14:24:35 +01:00
Kirill Tkhai 22beb565d4 scripts/tags.sh: Add magic for pci access functions
scripts/tags.sh: Add magic for pci access functions

Make [ce]tags find the pci_bus_read_config_* and pci_bus_write_config_*
definitions

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-08-31 17:14:19 +02:00
Namhyung Kim 1fa850596d scripts/tags.sh: Teach [ce]tags about libtraceeevent error codes
As we use a macro trick to sync each error codes with its
description string, teach [ce]tags to process them properly.

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/n/tip-qt5fv4pzigr2nnl27ydimg4h@git.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-26 14:31:23 +02:00
Stephen Boyd 0eb043d0ee Subject: [PATCH] tags.sh: Add missing quotes
When $remove_structs is empty a test for empty string will turn
into test -n with no arguments meaning true. Add quotes so an
empty string is tested and so that make cscope works again.

Reported-and-tested-by: Jike Song <albcamus@gmail.com>
Reported-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Yang Bai <hamo.by@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-04-02 11:28:17 +02:00
Yang Bai 66979224c0 scripts: refactor remove structure forward declarations
Since now it has some problems when generate TAGS,
refactor this code. Now it will not show the error
message and will remove declarations using emacs etags.

Signed-off-by: Yang Bai <hamo.by@gmail.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-03-26 22:22:15 +02:00
Jianbin Kang 98bd462233 kbuild: incremental tags update for GNU Global
GNU gtags support '-i' for updating tag files incrementally.
It runs more quickly than generating new tags after kernel source update.

Signed-off-by:  Jianbin Kang <kjbmail@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-03-26 15:29:52 +02:00
Alexey Dobriyan ff894e396b ctags: remove struct forward declarations
They're quite pointless and obscure location of real structure definition.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-12-18 22:36:06 +01:00
Stephen Boyd 358142dd8c scripts/tags.sh: Add Page flag function magic
It takes a while to find the macro-magically defined Page*()
functions defined in include/linux/page-flags.h if you're new to
the kernel. Add some magic to the tags script to transform these
macros into the actual functions they are, so that tag jumping in
the mm code is a bit easier.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-11-14 22:19:25 +01:00
Ian Munsie 9c65426ad2 tags, powerpc: Update tags.sh to support _GLOBAL symbols
On PowerPC we use _GLOBAL throughout the assembly to define symbols, but
currently these symbols are missing from the tags generated with
ARCH=powerpc make tags. This patch modifies the tags.sh script to
recognise _GLOBAL(.*) so that these symbols will be in the tags.

This is almost (but not quite) PowerPC specific and this change should
not affect anyone else:

$ git grep -E '^_GLOBAL\(([^)]*)\).*' |sed 's/^\([^/]*\/[^/]*\)\/.*$/\1/'|uniq -c
    627 arch/powerpc
      2 arch/um

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-08-31 16:31:18 +02:00
Steven Rostedt 4d7a2fa876 scripts/tags.sh: Add magic for trace-events for etags too
Seems that Peter Zijlstra treats us emacs users as second class
citizens and the commit:

 commit 15664125f7
 Author: Peter Zijlstra <peterz@infradead.org>
 scripts/tags.sh: Add magic for trace-events

only updated ctags (for vim) and did not do the work to let us
lowly emacs users benefit from such a change.

Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-25 19:56:31 -04:00
Steven Rostedt 50d6828e89 scripts/tags.sh: Fix ctags for DEFINE_EVENT()
The regex to handle DEFINE_EVENT() should not be the same as
the TRACE_EVENT() as the first parameter in DEFINE_EVENT is the
template name, not the event name. We need the second parameter
as that is what the trace_... will use.

Tested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-05-25 19:56:28 -04:00