linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scripts/tags: Add more declarations
@ 2018-12-17 12:41 Kirill Tkhai
  2018-12-17 21:09 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Kirill Tkhai @ 2018-12-17 12:41 UTC (permalink / raw)
  To: akpm, yamada.masahiro, const, ktkhai, joeypabalinas, willy,
	arend.vanspriel, linux-kernel

New declarations and identifier (__always_inline).

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 scripts/tags.sh |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 4fa070f9231a..f470d9919ed7 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -191,7 +191,7 @@ regex_c=(
 	'/^DEF_PCI_AC_\(\|NO\)RET(\([[:alnum:]_]*\).*/\2/'
 	'/^PCI_OP_READ(\(\w*\).*[1-4])/pci_bus_read_config_\1/'
 	'/^PCI_OP_WRITE(\(\w*\).*[1-4])/pci_bus_write_config_\1/'
-	'/\<DEFINE_\(MUTEX\|SEMAPHORE\|SPINLOCK\)(\([[:alnum:]_]*\)/\2/v/'
+	'/\<DEFINE_\(RT_MUTEX\|MUTEX\|SEMAPHORE\|SPINLOCK\)(\([[:alnum:]_]*\)/\2/v/'
 	'/\<DEFINE_\(RAW_SPINLOCK\|RWLOCK\|SEQLOCK\)(\([[:alnum:]_]*\)/\2/v/'
 	'/\<DECLARE_\(RWSEM\|COMPLETION\)(\([[:alnum:]_]\+\)/\2/v/'
 	'/\<DECLARE_BITMAP(\([[:alnum:]_]*\)/\1/v/'
@@ -204,6 +204,15 @@ regex_c=(
 	'/\(^\s\)OFFSET(\([[:alnum:]_]*\)/\2/v/'
 	'/\(^\s\)DEFINE(\([[:alnum:]_]*\)/\2/v/'
 	'/\<\(DEFINE\|DECLARE\)_HASHTABLE(\([[:alnum:]_]*\)/\2/v/'
+	'/\<DEFINE_ID\(R\|A\)(\([[:alnum:]_]\+\)/\2/'
+	'/\<DEFINE_WD_CLASS(\([[:alnum:]_]\+\)/\1/'
+	'/\<ATOMIC_NOTIFIER_HEAD(\([[:alnum:]_]\+\)/\1/'
+	'/\<RAW_NOTIFIER_HEAD(\([[:alnum:]_]\+\)/\1/'
+	'/\<DECLARE_FAULT_ATTR(\([[:alnum:]_]\+\)/\1/'
+	'/\<BLOCKING_NOTIFIER_HEAD(\([[:alnum:]_]\+\)/\1/'
+	'/\<DEVICE_ATTR_\(RW\|RO\|WO\)(\([[:alnum:]_]\+\)/dev_attr_\2/'
+	'/\<DRIVER_ATTR_\(RW\|RO\|WO\)(\([[:alnum:]_]\+\)/driver_attr_\2/'
+	'/\<\(DEFINE\|DECLARE\)_STATIC_KEY_\(TRUE\|FALSE\)\(\|_RO\)(\([[:alnum:]_]\+\)/\4/'
 )
 regex_kconfig=(
 	'/^[[:blank:]]*\(menu\|\)config[[:blank:]]\+\([[:alnum:]_]\+\)/\2/'
@@ -249,7 +258,7 @@ exuberant()
 	-I __initdata,__exitdata,__initconst,__ro_after_init	\
 	-I __initdata_memblock					\
 	-I __refdata,__attribute,__maybe_unused,__always_unused \
-	-I __acquires,__releases,__deprecated			\
+	-I __acquires,__releases,__deprecated,__always_inline	\
 	-I __read_mostly,__aligned,____cacheline_aligned        \
 	-I ____cacheline_aligned_in_smp                         \
 	-I __cacheline_aligned,__cacheline_aligned_in_smp	\


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scripts/tags: Add more declarations
  2018-12-17 12:41 [PATCH] scripts/tags: Add more declarations Kirill Tkhai
@ 2018-12-17 21:09 ` Matthew Wilcox
  2018-12-18  8:12   ` Kirill Tkhai
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2018-12-17 21:09 UTC (permalink / raw)
  To: Kirill Tkhai
  Cc: akpm, yamada.masahiro, const, joeypabalinas, arend.vanspriel,
	linux-kernel

On Mon, Dec 17, 2018 at 03:41:46PM +0300, Kirill Tkhai wrote:
> -	'/\<DEFINE_\(MUTEX\|SEMAPHORE\|SPINLOCK\)(\([[:alnum:]_]*\)/\2/v/'
> +	'/\<DEFINE_\(RT_MUTEX\|MUTEX\|SEMAPHORE\|SPINLOCK\)(\([[:alnum:]_]*\)/\2/v/'
>  	'/\<DEFINE_\(RAW_SPINLOCK\|RWLOCK\|SEQLOCK\)(\([[:alnum:]_]*\)/\2/v/'

I don't know anything about regexes this complex or tags, but couldn't this 
be '/\<DEFINE_\([[:upper:]_]\)(\([[:alnum:]_]*\)/\2/v/' to catch all
DEFINE_THINGIES?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scripts/tags: Add more declarations
  2018-12-17 21:09 ` Matthew Wilcox
@ 2018-12-18  8:12   ` Kirill Tkhai
  0 siblings, 0 replies; 3+ messages in thread
From: Kirill Tkhai @ 2018-12-18  8:12 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: akpm, yamada.masahiro, const, joeypabalinas, arend.vanspriel,
	linux-kernel

On 18.12.2018 00:09, Matthew Wilcox wrote:
> On Mon, Dec 17, 2018 at 03:41:46PM +0300, Kirill Tkhai wrote:
>> -	'/\<DEFINE_\(MUTEX\|SEMAPHORE\|SPINLOCK\)(\([[:alnum:]_]*\)/\2/v/'
>> +	'/\<DEFINE_\(RT_MUTEX\|MUTEX\|SEMAPHORE\|SPINLOCK\)(\([[:alnum:]_]*\)/\2/v/'
>>  	'/\<DEFINE_\(RAW_SPINLOCK\|RWLOCK\|SEQLOCK\)(\([[:alnum:]_]*\)/\2/v/'
> 
> I don't know anything about regexes this complex or tags, but couldn't this 
> be '/\<DEFINE_\([[:upper:]_]\)(\([[:alnum:]_]*\)/\2/v/' to catch all
> DEFINE_THINGIES?

I think, we can, but before this it's needed to change arguments order
in macroses like DEFINE_PER_CPU(), and to check, whether tags won't be
polluted something not needed (such wrong defines will be generated
anyway, but if there will be not too many, than it's OK).

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-18  8:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-17 12:41 [PATCH] scripts/tags: Add more declarations Kirill Tkhai
2018-12-17 21:09 ` Matthew Wilcox
2018-12-18  8:12   ` Kirill Tkhai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).