Skip to content

Commit b038175

Browse files
makelinuxgregkh
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 074c224 commit b038175

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

scripts/tags.sh

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -259,19 +259,29 @@ exuberant()
259259
CTAGS_EXTRA="extras"
260260
fi
261261
setup_regex exuberant asm c
262-
all_target_sources | xargs $1 -a \
263-
-I __initdata,__exitdata,__initconst,__ro_after_init \
264-
-I __initdata_memblock \
265-
-I __refdata,__attribute,__maybe_unused,__always_unused \
266-
-I __acquires,__releases,__deprecated,__always_inline \
267-
-I __read_mostly,__aligned,____cacheline_aligned \
268-
-I ____cacheline_aligned_in_smp \
269-
-I __cacheline_aligned,__cacheline_aligned_in_smp \
270-
-I ____cacheline_internodealigned_in_smp \
271-
-I __used,__packed,__packed2__,__must_check,__must_hold \
272-
-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL,ACPI_EXPORT_SYMBOL \
273-
-I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \
274-
-I static,const \
262+
# identifiers to ignore by ctags
263+
local ign=(
264+
ACPI_EXPORT_SYMBOL
265+
DEFINE_TRACE
266+
EXPORT_SYMBOL EXPORT_SYMBOL_GPL
267+
EXPORT_TRACEPOINT_SYMBOL EXPORT_TRACEPOINT_SYMBOL_GPL
268+
____cacheline_aligned ____cacheline_aligned_in_smp
269+
____cacheline_internodealigned_in_smp
270+
__acquires __aligned __always_inline __always_unused
271+
__attribute
272+
__cacheline_aligned __cacheline_aligned_in_smp
273+
__deprecated
274+
__exitdata
275+
__initconst __initdata __initdata_memblock
276+
__maybe_unused __must_check __must_hold
277+
__packed __packed2__
278+
__read_mostly __refdata __releases __ro_after_init
279+
__used
280+
const
281+
static
282+
)
283+
all_target_sources | \
284+
xargs $1 -a -I "$(IFS=','; echo "${ign[*]}")" \
275285
--$CTAGS_EXTRA=+fq --c-kinds=+px --fields=+iaS --langmap=c:+.h \
276286
"${regex[@]}"
277287

0 commit comments

Comments
 (0)