[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20241025064536.3022849-1-costa.shul@redhat.com>
Date: Fri, 25 Oct 2024 09:45:30 +0300
From: Costa Shulyupin <costa.shul@...hat.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Wei Yang <richard.weiyang@...il.com>,
Costa Shulyupin <costa.shul@...hat.com>,
René Nyffenegger <mail@...enyffenegger.ch>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...hat.com>
---
scripts/tags.sh | 36 +++++++++++++++++++++++-------------
1 file changed, 23 insertions(+), 13 deletions(-)
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 994245ef540a..db7972b6109e 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -257,19 +257,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[@]}"
--
2.47.0
Powered by blists - more mailing lists