summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosta Shulyupin <costa.shul@redhat.com>2024-10-25 09:45:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-05 05:33:47 +0100
commitb03817512cb92a354c182808b55013f9886624d0 (patch)
treede27f0099a4af118c8aba808a17786e93c744ffd
parent074c2241d0fe182bb62d010625aa9faa99cbfeac (diff)
scripts/tags.sh: use list of identifiers to ignore
Literal string of ctags arguments is too long and overloaded. Replace it with neat bash list. Identifiers are sorted, and those with a new first letter start on a new line for better maintainability. Signed-off-by: Costa Shulyupin <costa.shul@redhat.com> Link: https://lore.kernel.org/r/20241025064536.3022849-1-costa.shul@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-xscripts/tags.sh36
1 files changed, 23 insertions, 13 deletions
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 4a9b75f5bd6f..933e923e085a 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -259,19 +259,29 @@ exuberant()
CTAGS_EXTRA="extras"
fi
setup_regex exuberant asm c
- all_target_sources | xargs $1 -a \
- -I __initdata,__exitdata,__initconst,__ro_after_init \
- -I __initdata_memblock \
- -I __refdata,__attribute,__maybe_unused,__always_unused \
- -I __acquires,__releases,__deprecated,__always_inline \
- -I __read_mostly,__aligned,____cacheline_aligned \
- -I ____cacheline_aligned_in_smp \
- -I __cacheline_aligned,__cacheline_aligned_in_smp \
- -I ____cacheline_internodealigned_in_smp \
- -I __used,__packed,__packed2__,__must_check,__must_hold \
- -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL,ACPI_EXPORT_SYMBOL \
- -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \
- -I static,const \
+ # identifiers to ignore by ctags
+ local ign=(
+ ACPI_EXPORT_SYMBOL
+ DEFINE_TRACE
+ EXPORT_SYMBOL EXPORT_SYMBOL_GPL
+ EXPORT_TRACEPOINT_SYMBOL EXPORT_TRACEPOINT_SYMBOL_GPL
+ ____cacheline_aligned ____cacheline_aligned_in_smp
+ ____cacheline_internodealigned_in_smp
+ __acquires __aligned __always_inline __always_unused
+ __attribute
+ __cacheline_aligned __cacheline_aligned_in_smp
+ __deprecated
+ __exitdata
+ __initconst __initdata __initdata_memblock
+ __maybe_unused __must_check __must_hold
+ __packed __packed2__
+ __read_mostly __refdata __releases __ro_after_init
+ __used
+ const
+ static
+ )
+ all_target_sources | \
+ xargs $1 -a -I "$(IFS=','; echo "${ign[*]}")" \
--$CTAGS_EXTRA=+fq --c-kinds=+px --fields=+iaS --langmap=c:+.h \
"${regex[@]}"