All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] seqlock: <linux/seqlock.h>: fix multiple kernel-doc warnings
@ 2020-08-16 22:26 Randy Dunlap
  2020-08-16 23:26   ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Randy Dunlap @ 2020-08-16 22:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Randy Dunlap, Peter Zijlstra, Ingo Molnar

Fix kernel-doc warnings in <linux/seqlock.h>.

../include/linux/seqlock.h:152: warning: Incorrect use of kernel-doc format:  * seqcount_LOCKNAME_init() - runtime initializer for seqcount_LOCKNAME_t
../include/linux/seqlock.h:164: warning: Incorrect use of kernel-doc format:  * SEQCOUNT_LOCKTYPE() - Instantiate seqcount_LOCKNAME_t and helpers
../include/linux/seqlock.h:229: warning: Function parameter or member 'seq_name' not described in 'SEQCOUNT_LOCKTYPE_ZERO'
../include/linux/seqlock.h:229: warning: Function parameter or member 'assoc_lock' not described in 'SEQCOUNT_LOCKTYPE_ZERO'
../include/linux/seqlock.h:229: warning: Excess function parameter 'name' description in 'SEQCOUNT_LOCKTYPE_ZERO'
../include/linux/seqlock.h:229: warning: Excess function parameter 'lock' description in 'SEQCOUNT_LOCKTYPE_ZERO'
../include/linux/seqlock.h:695: warning: duplicate section name 'NOTE'

Demote kernel-doc notation for the macros "seqcount_LOCKNAME_init()" and
"SEQCOUNT_LOCKTYPE()"; scripts/kernel-doc does not handle them correctly.

Move the definition of seqcount_LOCKNAME_init() to just after its
documentation instead of having them separated by SEQCOUNT_LOCKTYPE().

Rename function parameters in SEQCNT_LOCKNAME_ZERO() documentation
to match the macro's argument names. Change the macro name in the
documentation to SEQCOUNT_LOCKTYPE_ZERO() to match the macro's name.

For raw_write_seqcount_latch(), rename the second NOTE: to NOTE2:
to prevent a kernel-doc warning. However, the generated output is not
quite as nice as it could be for this.

Fix a typo: s/LOCKTYPR/LOCKTYPE/

Fixes: 0efc94c5d15c ("seqcount: Compress SEQCNT_LOCKNAME_ZERO()")
Fixes: e4e9ab3f9f91 ("seqlock: Fold seqcount_LOCKNAME_init() definition")
Fixes: a8772dccb2ec ("seqlock: Fold seqcount_LOCKNAME_t definition")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
---
 include/linux/seqlock.h |   25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

--- lnx-59-rc1.orig/include/linux/seqlock.h
+++ lnx-59-rc1/include/linux/seqlock.h
@@ -138,7 +138,7 @@ static inline void seqcount_lockdep_read
 #endif
 
 /**
- * typedef seqcount_LOCKNAME_t - sequence counter with LOCKTYPR associated
+ * typedef seqcount_LOCKNAME_t - sequence counter with LOCKTYPE associated
  * @seqcount:	The real sequence counter
  * @lock:	Pointer to the associated spinlock
  *
@@ -148,11 +148,17 @@ static inline void seqcount_lockdep_read
  * that the write side critical section is properly serialized.
  */
 
-/**
+/*
  * seqcount_LOCKNAME_init() - runtime initializer for seqcount_LOCKNAME_t
  * @s:		Pointer to the seqcount_LOCKNAME_t instance
  * @lock:	Pointer to the associated LOCKTYPE
  */
+static __always_inline void						\
+seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)	\
+{									\
+	seqcount_init(&s->seqcount);					\
+	__SEQ_LOCK(s->lock = lock);					\
+}									\
 
 /*
  * SEQCOUNT_LOCKTYPE() - Instantiate seqcount_LOCKNAME_t and helpers
@@ -167,13 +173,6 @@ typedef struct seqcount_##lockname {
 	__SEQ_LOCK(locktype	*lock);					\
 } seqcount_##lockname##_t;						\
 									\
-static __always_inline void						\
-seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)	\
-{									\
-	seqcount_init(&s->seqcount);					\
-	__SEQ_LOCK(s->lock = lock);					\
-}									\
-									\
 static __always_inline seqcount_t *					\
 __seqcount_##lockname##_ptr(seqcount_##lockname##_t *s)			\
 {									\
@@ -218,9 +217,9 @@ SEQCOUNT_LOCKTYPE(struct mutex,		mutex,
 SEQCOUNT_LOCKTYPE(struct ww_mutex,	ww_mutex,	true,	&s->lock->base)
 
 /**
- * SEQCNT_LOCKNAME_ZERO - static initializer for seqcount_LOCKNAME_t
- * @name:	Name of the seqcount_LOCKNAME_t instance
- * @lock:	Pointer to the associated LOCKTYPE
+ * SEQCOUNT_LOCKTYPE_ZERO - static initializer for seqcount_LOCKNAME_t
+ * @seq_name:	Name of the seqcount_LOCKNAME_t instance
+ * @assoc_lock:	Pointer to the associated LOCKTYPE
  */
 
 #define SEQCOUNT_LOCKTYPE_ZERO(seq_name, assoc_lock) {			\
@@ -688,7 +687,7 @@ static inline int raw_read_seqcount_t_la
  *	to miss an entire modification sequence, once it resumes it might
  *	observe the new entry.
  *
- * NOTE:
+ * NOTE2:
  *
  *	When data is a dynamic data structure; one should use regular RCU
  *	patterns to manage the lifetimes of the objects within.

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

* Re: [PATCH] seqlock: <linux/seqlock.h>: fix multiple kernel-doc warnings
  2020-08-16 22:26 [PATCH] seqlock: <linux/seqlock.h>: fix multiple kernel-doc warnings Randy Dunlap
@ 2020-08-16 23:26   ` kernel test robot
  2020-08-16 23:31   ` kernel test robot
  2020-08-16 23:58   ` kernel test robot
  2 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-08-16 23:26 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: kbuild-all, Randy Dunlap, Peter Zijlstra, Ingo Molnar

[-- Attachment #1: Type: text/plain, Size: 4371 bytes --]

Hi Randy,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.9-rc1 next-20200814]
[cannot apply to tip/locking/core linux/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
config: x86_64-randconfig-s022-20200817 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-180-g49f7e13a-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/mmzone.h:16,
                    from include/linux/gfp.h:6,
                    from include/linux/slab.h:15,
                    from include/linux/crypto.h:20,
                    from arch/x86/kernel/asm-offsets.c:9:
>> include/linux/seqlock.h:157:10: error: stray '##' in program
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |          ^~
>> include/linux/seqlock.h:157:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'lockname'
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |            ^~~~~~~~
   include/linux/seqlock.h:157:20: error: stray '##' in program
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |                    ^~
>> include/linux/seqlock.h:157:12: error: unknown type name 'lockname'
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |            ^~~~~~~~
   include/linux/seqlock.h:157:37: error: stray '##' in program
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |                                     ^~
   include/linux/seqlock.h:157:47: error: stray '##' in program
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |                                               ^~
   make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1203: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:185: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.

# https://github.com/0day-ci/linux/commit/360da27b2632939e5188f48d211b8a39cfdb8cde
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
git checkout 360da27b2632939e5188f48d211b8a39cfdb8cde
vim +157 include/linux/seqlock.h

   139	
   140	/**
   141	 * typedef seqcount_LOCKNAME_t - sequence counter with LOCKTYPE associated
   142	 * @seqcount:	The real sequence counter
   143	 * @lock:	Pointer to the associated spinlock
   144	 *
   145	 * A plain sequence counter with external writer synchronization by a
   146	 * spinlock. The spinlock is associated to the sequence count in the
   147	 * static initializer or init function. This enables lockdep to validate
   148	 * that the write side critical section is properly serialized.
   149	 */
   150	
   151	/*
   152	 * seqcount_LOCKNAME_init() - runtime initializer for seqcount_LOCKNAME_t
   153	 * @s:		Pointer to the seqcount_LOCKNAME_t instance
   154	 * @lock:	Pointer to the associated LOCKTYPE
   155	 */
   156	static __always_inline void						\
 > 157	seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)	\
   158	{									\
   159		seqcount_init(&s->seqcount);					\
   160		__SEQ_LOCK(s->lock = lock);					\
   161	}									\
   162	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41237 bytes --]

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

* Re: [PATCH] seqlock: <linux/seqlock.h>: fix multiple kernel-doc warnings
@ 2020-08-16 23:26   ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-08-16 23:26 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4463 bytes --]

Hi Randy,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.9-rc1 next-20200814]
[cannot apply to tip/locking/core linux/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
config: x86_64-randconfig-s022-20200817 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-180-g49f7e13a-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/mmzone.h:16,
                    from include/linux/gfp.h:6,
                    from include/linux/slab.h:15,
                    from include/linux/crypto.h:20,
                    from arch/x86/kernel/asm-offsets.c:9:
>> include/linux/seqlock.h:157:10: error: stray '##' in program
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |          ^~
>> include/linux/seqlock.h:157:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'lockname'
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |            ^~~~~~~~
   include/linux/seqlock.h:157:20: error: stray '##' in program
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |                    ^~
>> include/linux/seqlock.h:157:12: error: unknown type name 'lockname'
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |            ^~~~~~~~
   include/linux/seqlock.h:157:37: error: stray '##' in program
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |                                     ^~
   include/linux/seqlock.h:157:47: error: stray '##' in program
     157 | seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock) \
         |                                               ^~
   make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1203: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:185: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.

# https://github.com/0day-ci/linux/commit/360da27b2632939e5188f48d211b8a39cfdb8cde
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
git checkout 360da27b2632939e5188f48d211b8a39cfdb8cde
vim +157 include/linux/seqlock.h

   139	
   140	/**
   141	 * typedef seqcount_LOCKNAME_t - sequence counter with LOCKTYPE associated
   142	 * @seqcount:	The real sequence counter
   143	 * @lock:	Pointer to the associated spinlock
   144	 *
   145	 * A plain sequence counter with external writer synchronization by a
   146	 * spinlock. The spinlock is associated to the sequence count in the
   147	 * static initializer or init function. This enables lockdep to validate
   148	 * that the write side critical section is properly serialized.
   149	 */
   150	
   151	/*
   152	 * seqcount_LOCKNAME_init() - runtime initializer for seqcount_LOCKNAME_t
   153	 * @s:		Pointer to the seqcount_LOCKNAME_t instance
   154	 * @lock:	Pointer to the associated LOCKTYPE
   155	 */
   156	static __always_inline void						\
 > 157	seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)	\
   158	{									\
   159		seqcount_init(&s->seqcount);					\
   160		__SEQ_LOCK(s->lock = lock);					\
   161	}									\
   162	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 41237 bytes --]

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

* Re: [PATCH] seqlock: <linux/seqlock.h>: fix multiple kernel-doc warnings
  2020-08-16 22:26 [PATCH] seqlock: <linux/seqlock.h>: fix multiple kernel-doc warnings Randy Dunlap
@ 2020-08-16 23:31   ` kernel test robot
  2020-08-16 23:31   ` kernel test robot
  2020-08-16 23:58   ` kernel test robot
  2 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-08-16 23:31 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: kbuild-all, clang-built-linux, Randy Dunlap, Peter Zijlstra, Ingo Molnar

[-- Attachment #1: Type: text/plain, Size: 10706 bytes --]

Hi Randy,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.9-rc1 next-20200814]
[cannot apply to tip/locking/core linux/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
config: s390-randconfig-r025-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install s390 cross compiling tool for clang build
        # apt-get install binutils-s390x-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:156:8: error: 'inline' can only appear on functions
   static __always_inline void                                             \
          ^
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:16: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                  ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:156:8: warning: '__gnu_inline__' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:23: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                         ^
   include/linux/compiler_attributes.h:167:56: note: expanded from macro '__gnu_inline'
   #define __gnu_inline                    __attribute__((__gnu_inline__))
                                                          ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
>> include/linux/seqlock.h:156:8: warning: '__no_instrument_function__' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:58: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                                                            ^
   include/linux/compiler_types.h:124:34: note: expanded from macro 'notrace'
   #define notrace                 __attribute__((__no_instrument_function__))
                                                  ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:156:8: warning: '__always_inline__' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:63: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                                                 ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:156:34: error: variable has incomplete type 'void'
   static __always_inline void                                             \
                                                                           ^
   include/linux/seqlock.h:157:10: error: expected ';' after top level declarator
   seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)  \
            ^
            ;
   include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   SEQCOUNT_LOCKTYPE(raw_spinlock_t,       raw_spinlock,   false,  s->lock)
   ^
   include/linux/seqlock.h:177:29: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_ptr(seqcount_##lockname##_t *s)                 \
                               ^
   <scratch space>:28:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   include/linux/seqlock.h:183:37: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_preemptible(seqcount_##lockname##_t *s)         \
                                       ^
   <scratch space>:32:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   include/linux/seqlock.h:189:32: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_assert(seqcount_##lockname##_t *s)              \
                                  ^
   <scratch space>:36:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:751:17: error: implicit declaration of function '__seqcount_ptr' [-Werror,-Wimplicit-function-declaration]
           unsigned ret = read_seqcount_begin(&sl->seqcount);
                          ^
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:129:1: note: expanded from here
   __seqcount_ptr
   ^
   include/linux/seqlock.h:751:17: note: did you mean '__seqcount_init'?
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:129:1: note: expanded from here
   __seqcount_ptr
   ^
   include/linux/seqlock.h:71:20: note: '__seqcount_init' declared here
   static inline void __seqcount_init(seqcount_t *s, const char *name,
                      ^
   include/linux/seqlock.h:751:17: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
           unsigned ret = read_seqcount_begin(&sl->seqcount);
                          ^
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^

# https://github.com/0day-ci/linux/commit/360da27b2632939e5188f48d211b8a39cfdb8cde
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
git checkout 360da27b2632939e5188f48d211b8a39cfdb8cde
vim +/__no_instrument_function__ +156 include/linux/seqlock.h

   139	
   140	/**
   141	 * typedef seqcount_LOCKNAME_t - sequence counter with LOCKTYPE associated
   142	 * @seqcount:	The real sequence counter
   143	 * @lock:	Pointer to the associated spinlock
   144	 *
   145	 * A plain sequence counter with external writer synchronization by a
   146	 * spinlock. The spinlock is associated to the sequence count in the
   147	 * static initializer or init function. This enables lockdep to validate
   148	 * that the write side critical section is properly serialized.
   149	 */
   150	
   151	/*
   152	 * seqcount_LOCKNAME_init() - runtime initializer for seqcount_LOCKNAME_t
   153	 * @s:		Pointer to the seqcount_LOCKNAME_t instance
   154	 * @lock:	Pointer to the associated LOCKTYPE
   155	 */
 > 156	static __always_inline void						\
   157	seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)	\
   158	{									\
   159		seqcount_init(&s->seqcount);					\
   160		__SEQ_LOCK(s->lock = lock);					\
   161	}									\
   162	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21503 bytes --]

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

* Re: [PATCH] seqlock: <linux/seqlock.h>: fix multiple kernel-doc warnings
@ 2020-08-16 23:31   ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-08-16 23:31 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 10903 bytes --]

Hi Randy,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.9-rc1 next-20200814]
[cannot apply to tip/locking/core linux/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
config: s390-randconfig-r025-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install s390 cross compiling tool for clang build
        # apt-get install binutils-s390x-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:156:8: error: 'inline' can only appear on functions
   static __always_inline void                                             \
          ^
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:16: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                  ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:156:8: warning: '__gnu_inline__' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:23: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                         ^
   include/linux/compiler_attributes.h:167:56: note: expanded from macro '__gnu_inline'
   #define __gnu_inline                    __attribute__((__gnu_inline__))
                                                          ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
>> include/linux/seqlock.h:156:8: warning: '__no_instrument_function__' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:58: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                                                            ^
   include/linux/compiler_types.h:124:34: note: expanded from macro 'notrace'
   #define notrace                 __attribute__((__no_instrument_function__))
                                                  ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:156:8: warning: '__always_inline__' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:63: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                                                 ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:156:34: error: variable has incomplete type 'void'
   static __always_inline void                                             \
                                                                           ^
   include/linux/seqlock.h:157:10: error: expected ';' after top level declarator
   seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)  \
            ^
            ;
   include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   SEQCOUNT_LOCKTYPE(raw_spinlock_t,       raw_spinlock,   false,  s->lock)
   ^
   include/linux/seqlock.h:177:29: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_ptr(seqcount_##lockname##_t *s)                 \
                               ^
   <scratch space>:28:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   include/linux/seqlock.h:183:37: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_preemptible(seqcount_##lockname##_t *s)         \
                                       ^
   <scratch space>:32:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   include/linux/seqlock.h:189:32: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_assert(seqcount_##lockname##_t *s)              \
                                  ^
   <scratch space>:36:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/s390/kernel/asm-offsets.c:11:
   In file included from include/linux/kvm_host.h:12:
   In file included from include/linux/sched.h:20:
   In file included from include/linux/hrtimer.h:20:
   include/linux/seqlock.h:751:17: error: implicit declaration of function '__seqcount_ptr' [-Werror,-Wimplicit-function-declaration]
           unsigned ret = read_seqcount_begin(&sl->seqcount);
                          ^
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:129:1: note: expanded from here
   __seqcount_ptr
   ^
   include/linux/seqlock.h:751:17: note: did you mean '__seqcount_init'?
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:129:1: note: expanded from here
   __seqcount_ptr
   ^
   include/linux/seqlock.h:71:20: note: '__seqcount_init' declared here
   static inline void __seqcount_init(seqcount_t *s, const char *name,
                      ^
   include/linux/seqlock.h:751:17: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
           unsigned ret = read_seqcount_begin(&sl->seqcount);
                          ^
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^

# https://github.com/0day-ci/linux/commit/360da27b2632939e5188f48d211b8a39cfdb8cde
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
git checkout 360da27b2632939e5188f48d211b8a39cfdb8cde
vim +/__no_instrument_function__ +156 include/linux/seqlock.h

   139	
   140	/**
   141	 * typedef seqcount_LOCKNAME_t - sequence counter with LOCKTYPE associated
   142	 * @seqcount:	The real sequence counter
   143	 * @lock:	Pointer to the associated spinlock
   144	 *
   145	 * A plain sequence counter with external writer synchronization by a
   146	 * spinlock. The spinlock is associated to the sequence count in the
   147	 * static initializer or init function. This enables lockdep to validate
   148	 * that the write side critical section is properly serialized.
   149	 */
   150	
   151	/*
   152	 * seqcount_LOCKNAME_init() - runtime initializer for seqcount_LOCKNAME_t
   153	 * @s:		Pointer to the seqcount_LOCKNAME_t instance
   154	 * @lock:	Pointer to the associated LOCKTYPE
   155	 */
 > 156	static __always_inline void						\
   157	seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)	\
   158	{									\
   159		seqcount_init(&s->seqcount);					\
   160		__SEQ_LOCK(s->lock = lock);					\
   161	}									\
   162	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 21503 bytes --]

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

* Re: [PATCH] seqlock: <linux/seqlock.h>: fix multiple kernel-doc warnings
  2020-08-16 22:26 [PATCH] seqlock: <linux/seqlock.h>: fix multiple kernel-doc warnings Randy Dunlap
@ 2020-08-16 23:58   ` kernel test robot
  2020-08-16 23:31   ` kernel test robot
  2020-08-16 23:58   ` kernel test robot
  2 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-08-16 23:58 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: kbuild-all, clang-built-linux, Randy Dunlap, Peter Zijlstra, Ingo Molnar

[-- Attachment #1: Type: text/plain, Size: 24442 bytes --]

Hi Randy,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.9-rc1 next-20200814]
[cannot apply to tip/locking/core linux/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
config: x86_64-randconfig-a013-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:156:8: error: 'inline' can only appear on functions
   static __always_inline void                                             \
          ^
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:16: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                  ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:156:8: warning: '__gnu_inline__' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:23: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                         ^
   include/linux/compiler_attributes.h:167:56: note: expanded from macro '__gnu_inline'
   #define __gnu_inline                    __attribute__((__gnu_inline__))
                                                          ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:156:8: warning: 'no_instrument_function' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:58: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                                                            ^
   arch/x86/include/asm/linkage.h:8:32: note: expanded from macro 'notrace'
   #define notrace __attribute__((no_instrument_function))
                                  ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:156:8: warning: '__always_inline__' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:63: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                                                 ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:156:34: error: variable has incomplete type 'void'
   static __always_inline void                                             \
                                                                           ^
>> include/linux/seqlock.h:157:10: error: expected ';' after top level declarator
   seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)  \
            ^
            ;
>> include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   SEQCOUNT_LOCKTYPE(raw_spinlock_t,       raw_spinlock,   false,  s->lock)
   ^
   include/linux/seqlock.h:177:29: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_ptr(seqcount_##lockname##_t *s)                 \
                               ^
   <scratch space>:103:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   include/linux/seqlock.h:183:37: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_preemptible(seqcount_##lockname##_t *s)         \
                                       ^
   <scratch space>:107:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   include/linux/seqlock.h:189:32: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_assert(seqcount_##lockname##_t *s)              \
                                  ^
   <scratch space>:111:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:751:17: error: implicit declaration of function '__seqcount_ptr' [-Werror,-Wimplicit-function-declaration]
           unsigned ret = read_seqcount_begin(&sl->seqcount);
                          ^
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:184:1: note: expanded from here
   __seqcount_ptr
   ^
   include/linux/seqlock.h:751:17: note: did you mean '__seqcount_init'?
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:184:1: note: expanded from here
   __seqcount_ptr
   ^
   include/linux/seqlock.h:71:20: note: '__seqcount_init' declared here
   static inline void __seqcount_init(seqcount_t *s, const char *name,
                      ^
   include/linux/seqlock.h:751:17: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
           unsigned ret = read_seqcount_begin(&sl->seqcount);
                          ^
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:242:2: note: expanded from macro '__seqprop'
           __seqprop_case((s),     raw_spinlock,   prop),                  \
           ^
   include/linux/seqlock.h:238:2: note: expanded from macro '__seqprop_case'
           seqcount_##lockname##_t: __seqcount_##lockname##_##prop((void *)(s))
           ^
   <scratch space>:186:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   include/linux/seqlock.h:214:1: note: 'seqcount_spinlock_t' declared here
   SEQCOUNT_LOCKTYPE(spinlock_t,           spinlock,       false,  s->lock)
   ^
   include/linux/seqlock.h:174:3: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   } seqcount_##lockname##_t;                                              \
     ^
   <scratch space>:114:1: note: expanded from here
   seqcount_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
   include/linux/seqlock.h:777:9: error: implicit declaration of function '__seqcount_ptr' [-Werror,-Wimplicit-function-declaration]
           return read_seqcount_retry(&sl->seqcount, start);
                  ^
   include/linux/seqlock.h:401:24: note: expanded from macro 'read_seqcount_retry'
           read_seqcount_t_retry(__seqcount_ptr(s), start)
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:210:1: note: expanded from here
   __seqcount_ptr
   ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
   include/linux/seqlock.h:777:9: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
   include/linux/seqlock.h:401:24: note: expanded from macro 'read_seqcount_retry'
           read_seqcount_t_retry(__seqcount_ptr(s), start)
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:242:2: note: expanded from macro '__seqprop'
           __seqprop_case((s),     raw_spinlock,   prop),                  \
           ^
   include/linux/seqlock.h:238:2: note: expanded from macro '__seqprop_case'
           seqcount_##lockname##_t: __seqcount_##lockname##_##prop((void *)(s))
           ^
   <scratch space>:212:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   include/linux/seqlock.h:214:1: note: 'seqcount_spinlock_t' declared here
   SEQCOUNT_LOCKTYPE(spinlock_t,           spinlock,       false,  s->lock)
   ^
   include/linux/seqlock.h:174:3: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   } seqcount_##lockname##_t;                                              \
     ^
   <scratch space>:114:1: note: expanded from here
   seqcount_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:10:
   In file included from include/linux/sched.h:20:
>> include/linux/hrtimer.h:163:2: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
           seqcount_raw_spinlock_t seq;
           ^~~~~~~~~~~~~~~~~~~~~~~
           seqcount_spinlock_t
   include/linux/seqlock.h:214:1: note: 'seqcount_spinlock_t' declared here
   SEQCOUNT_LOCKTYPE(spinlock_t,           spinlock,       false,  s->lock)
   ^
   include/linux/seqlock.h:174:3: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   } seqcount_##lockname##_t;                                              \
     ^
   <scratch space>:114:1: note: expanded from here
   seqcount_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:13:
>> include/linux/rbtree_latch.h:148:2: error: implicit declaration of function '__seqcount_ptr' [-Werror,-Wimplicit-function-declaration]
           raw_write_seqcount_latch(&root->seq);
           ^
   include/linux/seqlock.h:696:29: note: expanded from macro 'raw_write_seqcount_latch'
           raw_write_seqcount_t_latch(__seqcount_ptr(s))
                                      ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:23:1: note: expanded from here
   __seqcount_ptr
   ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:13:
>> include/linux/rbtree_latch.h:148:2: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
   include/linux/seqlock.h:696:29: note: expanded from macro 'raw_write_seqcount_latch'
           raw_write_seqcount_t_latch(__seqcount_ptr(s))
                                      ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:242:2: note: expanded from macro '__seqprop'
           __seqprop_case((s),     raw_spinlock,   prop),                  \
           ^
   include/linux/seqlock.h:238:2: note: expanded from macro '__seqprop_case'
           seqcount_##lockname##_t: __seqcount_##lockname##_##prop((void *)(s))
           ^
   <scratch space>:25:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   include/linux/seqlock.h:214:1: note: 'seqcount_spinlock_t' declared here
   SEQCOUNT_LOCKTYPE(spinlock_t,           spinlock,       false,  s->lock)
   ^
   include/linux/seqlock.h:174:3: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   } seqcount_##lockname##_t;                                              \
     ^
   <scratch space>:114:1: note: expanded from here
   seqcount_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:13:
   include/linux/rbtree_latch.h:150:2: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
           raw_write_seqcount_latch(&root->seq);
           ^
   include/linux/seqlock.h:696:29: note: expanded from macro 'raw_write_seqcount_latch'
           raw_write_seqcount_t_latch(__seqcount_ptr(s))
                                      ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:242:2: note: expanded from macro '__seqprop'
           __seqprop_case((s),     raw_spinlock,   prop),                  \
           ^
   include/linux/seqlock.h:238:2: note: expanded from macro '__seqprop_case'
           seqcount_##lockname##_t: __seqcount_##lockname##_##prop((void *)(s))
           ^
   <scratch space>:51:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   include/linux/seqlock.h:214:1: note: 'seqcount_spinlock_t' declared here
   SEQCOUNT_LOCKTYPE(spinlock_t,           spinlock,       false,  s->lock)
   ^
   include/linux/seqlock.h:174:3: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   } seqcount_##lockname##_t;                                              \
     ^
   <scratch space>:114:1: note: expanded from here
   seqcount_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:13:
   include/linux/rbtree_latch.h:175:2: error: implicit declaration of function '__seqcount_ptr' [-Werror,-Wimplicit-function-declaration]
           raw_write_seqcount_latch(&root->seq);
           ^
   include/linux/seqlock.h:696:29: note: expanded from macro 'raw_write_seqcount_latch'
           raw_write_seqcount_t_latch(__seqcount_ptr(s))
                                      ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:75:1: note: expanded from here
   __seqcount_ptr
   ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:13:
   include/linux/rbtree_latch.h:175:2: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
   include/linux/seqlock.h:696:29: note: expanded from macro 'raw_write_seqcount_latch'
           raw_write_seqcount_t_latch(__seqcount_ptr(s))
                                      ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:242:2: note: expanded from macro '__seqprop'
           __seqprop_case((s),     raw_spinlock,   prop),                  \
           ^

# https://github.com/0day-ci/linux/commit/360da27b2632939e5188f48d211b8a39cfdb8cde
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
git checkout 360da27b2632939e5188f48d211b8a39cfdb8cde
vim +/inline +156 include/linux/seqlock.h

   139	
   140	/**
   141	 * typedef seqcount_LOCKNAME_t - sequence counter with LOCKTYPE associated
   142	 * @seqcount:	The real sequence counter
   143	 * @lock:	Pointer to the associated spinlock
   144	 *
   145	 * A plain sequence counter with external writer synchronization by a
   146	 * spinlock. The spinlock is associated to the sequence count in the
   147	 * static initializer or init function. This enables lockdep to validate
   148	 * that the write side critical section is properly serialized.
   149	 */
   150	
   151	/*
   152	 * seqcount_LOCKNAME_init() - runtime initializer for seqcount_LOCKNAME_t
   153	 * @s:		Pointer to the seqcount_LOCKNAME_t instance
   154	 * @lock:	Pointer to the associated LOCKTYPE
   155	 */
 > 156	static __always_inline void						\
 > 157	seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)	\
   158	{									\
   159		seqcount_init(&s->seqcount);					\
   160		__SEQ_LOCK(s->lock = lock);					\
   161	}									\
   162	
   163	/*
   164	 * SEQCOUNT_LOCKTYPE() - Instantiate seqcount_LOCKNAME_t and helpers
   165	 * @locktype:		actual typename
   166	 * @lockname:		name
   167	 * @preemptible:	preemptibility of above locktype
   168	 * @lockmember:		argument for lockdep_assert_held()
   169	 */
   170	#define SEQCOUNT_LOCKTYPE(locktype, lockname, preemptible, lockmember)	\
   171	typedef struct seqcount_##lockname {					\
   172		seqcount_t		seqcount;				\
   173		__SEQ_LOCK(locktype	*lock);					\
   174	} seqcount_##lockname##_t;						\
   175										\
   176	static __always_inline seqcount_t *					\
   177	__seqcount_##lockname##_ptr(seqcount_##lockname##_t *s)			\
   178	{									\
   179		return &s->seqcount;						\
   180	}									\
   181										\
   182	static __always_inline bool						\
   183	__seqcount_##lockname##_preemptible(seqcount_##lockname##_t *s)		\
   184	{									\
   185		return preemptible;						\
   186	}									\
   187										\
   188	static __always_inline void						\
   189	__seqcount_##lockname##_assert(seqcount_##lockname##_t *s)		\
   190	{									\
   191		__SEQ_LOCK(lockdep_assert_held(lockmember));			\
   192	}
   193	
   194	/*
   195	 * __seqprop() for seqcount_t
   196	 */
   197	
   198	static inline seqcount_t *__seqcount_ptr(seqcount_t *s)
   199	{
   200		return s;
   201	}
   202	
   203	static inline bool __seqcount_preemptible(seqcount_t *s)
   204	{
   205		return false;
   206	}
   207	
   208	static inline void __seqcount_assert(seqcount_t *s)
   209	{
   210		lockdep_assert_preemption_disabled();
   211	}
   212	
 > 213	SEQCOUNT_LOCKTYPE(raw_spinlock_t,	raw_spinlock,	false,	s->lock)
   214	SEQCOUNT_LOCKTYPE(spinlock_t,		spinlock,	false,	s->lock)
   215	SEQCOUNT_LOCKTYPE(rwlock_t,		rwlock,		false,	s->lock)
   216	SEQCOUNT_LOCKTYPE(struct mutex,		mutex,		true,	s->lock)
   217	SEQCOUNT_LOCKTYPE(struct ww_mutex,	ww_mutex,	true,	&s->lock->base)
   218	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33031 bytes --]

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

* Re: [PATCH] seqlock: <linux/seqlock.h>: fix multiple kernel-doc warnings
@ 2020-08-16 23:58   ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-08-16 23:58 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 24921 bytes --]

Hi Randy,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.9-rc1 next-20200814]
[cannot apply to tip/locking/core linux/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
config: x86_64-randconfig-a013-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:156:8: error: 'inline' can only appear on functions
   static __always_inline void                                             \
          ^
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:16: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                  ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:156:8: warning: '__gnu_inline__' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:23: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                         ^
   include/linux/compiler_attributes.h:167:56: note: expanded from macro '__gnu_inline'
   #define __gnu_inline                    __attribute__((__gnu_inline__))
                                                          ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:156:8: warning: 'no_instrument_function' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:41: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                           ^
   include/linux/compiler_types.h:144:58: note: expanded from macro 'inline'
   #define inline inline __gnu_inline __inline_maybe_unused notrace
                                                            ^
   arch/x86/include/asm/linkage.h:8:32: note: expanded from macro 'notrace'
   #define notrace __attribute__((no_instrument_function))
                                  ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:156:8: warning: '__always_inline__' attribute only applies to functions [-Wignored-attributes]
   include/linux/compiler_attributes.h:70:63: note: expanded from macro '__always_inline'
   #define __always_inline                 inline __attribute__((__always_inline__))
                                                                 ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:156:34: error: variable has incomplete type 'void'
   static __always_inline void                                             \
                                                                           ^
>> include/linux/seqlock.h:157:10: error: expected ';' after top level declarator
   seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)  \
            ^
            ;
>> include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   SEQCOUNT_LOCKTYPE(raw_spinlock_t,       raw_spinlock,   false,  s->lock)
   ^
   include/linux/seqlock.h:177:29: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_ptr(seqcount_##lockname##_t *s)                 \
                               ^
   <scratch space>:103:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   include/linux/seqlock.h:183:37: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_preemptible(seqcount_##lockname##_t *s)         \
                                       ^
   <scratch space>:107:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:213:1: error: unknown type name 'seqcount_raw_spinlock_t'
   include/linux/seqlock.h:189:32: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   __seqcount_##lockname##_assert(seqcount_##lockname##_t *s)              \
                                  ^
   <scratch space>:111:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
>> include/linux/seqlock.h:751:17: error: implicit declaration of function '__seqcount_ptr' [-Werror,-Wimplicit-function-declaration]
           unsigned ret = read_seqcount_begin(&sl->seqcount);
                          ^
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:184:1: note: expanded from here
   __seqcount_ptr
   ^
   include/linux/seqlock.h:751:17: note: did you mean '__seqcount_init'?
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:184:1: note: expanded from here
   __seqcount_ptr
   ^
   include/linux/seqlock.h:71:20: note: '__seqcount_init' declared here
   static inline void __seqcount_init(seqcount_t *s, const char *name,
                      ^
   include/linux/seqlock.h:751:17: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
           unsigned ret = read_seqcount_begin(&sl->seqcount);
                          ^
   include/linux/seqlock.h:306:24: note: expanded from macro 'read_seqcount_begin'
           read_seqcount_t_begin(__seqcount_ptr(s))
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:242:2: note: expanded from macro '__seqprop'
           __seqprop_case((s),     raw_spinlock,   prop),                  \
           ^
   include/linux/seqlock.h:238:2: note: expanded from macro '__seqprop_case'
           seqcount_##lockname##_t: __seqcount_##lockname##_##prop((void *)(s))
           ^
   <scratch space>:186:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   include/linux/seqlock.h:214:1: note: 'seqcount_spinlock_t' declared here
   SEQCOUNT_LOCKTYPE(spinlock_t,           spinlock,       false,  s->lock)
   ^
   include/linux/seqlock.h:174:3: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   } seqcount_##lockname##_t;                                              \
     ^
   <scratch space>:114:1: note: expanded from here
   seqcount_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
   include/linux/seqlock.h:777:9: error: implicit declaration of function '__seqcount_ptr' [-Werror,-Wimplicit-function-declaration]
           return read_seqcount_retry(&sl->seqcount, start);
                  ^
   include/linux/seqlock.h:401:24: note: expanded from macro 'read_seqcount_retry'
           read_seqcount_t_retry(__seqcount_ptr(s), start)
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:210:1: note: expanded from here
   __seqcount_ptr
   ^
   In file included from arch/x86/kernel/asm-offsets.c:9:
   In file included from include/linux/crypto.h:20:
   In file included from include/linux/slab.h:15:
   In file included from include/linux/gfp.h:6:
   In file included from include/linux/mmzone.h:16:
   include/linux/seqlock.h:777:9: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
   include/linux/seqlock.h:401:24: note: expanded from macro 'read_seqcount_retry'
           read_seqcount_t_retry(__seqcount_ptr(s), start)
                                 ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:242:2: note: expanded from macro '__seqprop'
           __seqprop_case((s),     raw_spinlock,   prop),                  \
           ^
   include/linux/seqlock.h:238:2: note: expanded from macro '__seqprop_case'
           seqcount_##lockname##_t: __seqcount_##lockname##_##prop((void *)(s))
           ^
   <scratch space>:212:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   include/linux/seqlock.h:214:1: note: 'seqcount_spinlock_t' declared here
   SEQCOUNT_LOCKTYPE(spinlock_t,           spinlock,       false,  s->lock)
   ^
   include/linux/seqlock.h:174:3: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   } seqcount_##lockname##_t;                                              \
     ^
   <scratch space>:114:1: note: expanded from here
   seqcount_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:10:
   In file included from include/linux/sched.h:20:
>> include/linux/hrtimer.h:163:2: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
           seqcount_raw_spinlock_t seq;
           ^~~~~~~~~~~~~~~~~~~~~~~
           seqcount_spinlock_t
   include/linux/seqlock.h:214:1: note: 'seqcount_spinlock_t' declared here
   SEQCOUNT_LOCKTYPE(spinlock_t,           spinlock,       false,  s->lock)
   ^
   include/linux/seqlock.h:174:3: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   } seqcount_##lockname##_t;                                              \
     ^
   <scratch space>:114:1: note: expanded from here
   seqcount_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:13:
>> include/linux/rbtree_latch.h:148:2: error: implicit declaration of function '__seqcount_ptr' [-Werror,-Wimplicit-function-declaration]
           raw_write_seqcount_latch(&root->seq);
           ^
   include/linux/seqlock.h:696:29: note: expanded from macro 'raw_write_seqcount_latch'
           raw_write_seqcount_t_latch(__seqcount_ptr(s))
                                      ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:23:1: note: expanded from here
   __seqcount_ptr
   ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:13:
>> include/linux/rbtree_latch.h:148:2: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
   include/linux/seqlock.h:696:29: note: expanded from macro 'raw_write_seqcount_latch'
           raw_write_seqcount_t_latch(__seqcount_ptr(s))
                                      ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:242:2: note: expanded from macro '__seqprop'
           __seqprop_case((s),     raw_spinlock,   prop),                  \
           ^
   include/linux/seqlock.h:238:2: note: expanded from macro '__seqprop_case'
           seqcount_##lockname##_t: __seqcount_##lockname##_##prop((void *)(s))
           ^
   <scratch space>:25:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   include/linux/seqlock.h:214:1: note: 'seqcount_spinlock_t' declared here
   SEQCOUNT_LOCKTYPE(spinlock_t,           spinlock,       false,  s->lock)
   ^
   include/linux/seqlock.h:174:3: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   } seqcount_##lockname##_t;                                              \
     ^
   <scratch space>:114:1: note: expanded from here
   seqcount_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:13:
   include/linux/rbtree_latch.h:150:2: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
           raw_write_seqcount_latch(&root->seq);
           ^
   include/linux/seqlock.h:696:29: note: expanded from macro 'raw_write_seqcount_latch'
           raw_write_seqcount_t_latch(__seqcount_ptr(s))
                                      ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:242:2: note: expanded from macro '__seqprop'
           __seqprop_case((s),     raw_spinlock,   prop),                  \
           ^
   include/linux/seqlock.h:238:2: note: expanded from macro '__seqprop_case'
           seqcount_##lockname##_t: __seqcount_##lockname##_##prop((void *)(s))
           ^
   <scratch space>:51:1: note: expanded from here
   seqcount_raw_spinlock_t
   ^
   include/linux/seqlock.h:214:1: note: 'seqcount_spinlock_t' declared here
   SEQCOUNT_LOCKTYPE(spinlock_t,           spinlock,       false,  s->lock)
   ^
   include/linux/seqlock.h:174:3: note: expanded from macro 'SEQCOUNT_LOCKTYPE'
   } seqcount_##lockname##_t;                                              \
     ^
   <scratch space>:114:1: note: expanded from here
   seqcount_spinlock_t
   ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:13:
   include/linux/rbtree_latch.h:175:2: error: implicit declaration of function '__seqcount_ptr' [-Werror,-Wimplicit-function-declaration]
           raw_write_seqcount_latch(&root->seq);
           ^
   include/linux/seqlock.h:696:29: note: expanded from macro 'raw_write_seqcount_latch'
           raw_write_seqcount_t_latch(__seqcount_ptr(s))
                                      ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:241:15: note: expanded from macro '__seqprop'
           seqcount_t:             __seqcount_##prop((void *)(s)),         \
                                   ^
   <scratch space>:75:1: note: expanded from here
   __seqcount_ptr
   ^
   In file included from arch/x86/kernel/asm-offsets.c:13:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:28:
   In file included from include/linux/cgroup-defs.h:22:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:13:
   include/linux/rbtree_latch.h:175:2: error: unknown type name 'seqcount_raw_spinlock_t'; did you mean 'seqcount_spinlock_t'?
   include/linux/seqlock.h:696:29: note: expanded from macro 'raw_write_seqcount_latch'
           raw_write_seqcount_t_latch(__seqcount_ptr(s))
                                      ^
   include/linux/seqlock.h:248:28: note: expanded from macro '__seqcount_ptr'
   #define __seqcount_ptr(s)               __seqprop(s, ptr)
                                           ^
   include/linux/seqlock.h:242:2: note: expanded from macro '__seqprop'
           __seqprop_case((s),     raw_spinlock,   prop),                  \
           ^

# https://github.com/0day-ci/linux/commit/360da27b2632939e5188f48d211b8a39cfdb8cde
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Randy-Dunlap/seqlock-linux-seqlock-h-fix-multiple-kernel-doc-warnings/20200817-062836
git checkout 360da27b2632939e5188f48d211b8a39cfdb8cde
vim +/inline +156 include/linux/seqlock.h

   139	
   140	/**
   141	 * typedef seqcount_LOCKNAME_t - sequence counter with LOCKTYPE associated
   142	 * @seqcount:	The real sequence counter
   143	 * @lock:	Pointer to the associated spinlock
   144	 *
   145	 * A plain sequence counter with external writer synchronization by a
   146	 * spinlock. The spinlock is associated to the sequence count in the
   147	 * static initializer or init function. This enables lockdep to validate
   148	 * that the write side critical section is properly serialized.
   149	 */
   150	
   151	/*
   152	 * seqcount_LOCKNAME_init() - runtime initializer for seqcount_LOCKNAME_t
   153	 * @s:		Pointer to the seqcount_LOCKNAME_t instance
   154	 * @lock:	Pointer to the associated LOCKTYPE
   155	 */
 > 156	static __always_inline void						\
 > 157	seqcount_##lockname##_init(seqcount_##lockname##_t *s, locktype *lock)	\
   158	{									\
   159		seqcount_init(&s->seqcount);					\
   160		__SEQ_LOCK(s->lock = lock);					\
   161	}									\
   162	
   163	/*
   164	 * SEQCOUNT_LOCKTYPE() - Instantiate seqcount_LOCKNAME_t and helpers
   165	 * @locktype:		actual typename
   166	 * @lockname:		name
   167	 * @preemptible:	preemptibility of above locktype
   168	 * @lockmember:		argument for lockdep_assert_held()
   169	 */
   170	#define SEQCOUNT_LOCKTYPE(locktype, lockname, preemptible, lockmember)	\
   171	typedef struct seqcount_##lockname {					\
   172		seqcount_t		seqcount;				\
   173		__SEQ_LOCK(locktype	*lock);					\
   174	} seqcount_##lockname##_t;						\
   175										\
   176	static __always_inline seqcount_t *					\
   177	__seqcount_##lockname##_ptr(seqcount_##lockname##_t *s)			\
   178	{									\
   179		return &s->seqcount;						\
   180	}									\
   181										\
   182	static __always_inline bool						\
   183	__seqcount_##lockname##_preemptible(seqcount_##lockname##_t *s)		\
   184	{									\
   185		return preemptible;						\
   186	}									\
   187										\
   188	static __always_inline void						\
   189	__seqcount_##lockname##_assert(seqcount_##lockname##_t *s)		\
   190	{									\
   191		__SEQ_LOCK(lockdep_assert_held(lockmember));			\
   192	}
   193	
   194	/*
   195	 * __seqprop() for seqcount_t
   196	 */
   197	
   198	static inline seqcount_t *__seqcount_ptr(seqcount_t *s)
   199	{
   200		return s;
   201	}
   202	
   203	static inline bool __seqcount_preemptible(seqcount_t *s)
   204	{
   205		return false;
   206	}
   207	
   208	static inline void __seqcount_assert(seqcount_t *s)
   209	{
   210		lockdep_assert_preemption_disabled();
   211	}
   212	
 > 213	SEQCOUNT_LOCKTYPE(raw_spinlock_t,	raw_spinlock,	false,	s->lock)
   214	SEQCOUNT_LOCKTYPE(spinlock_t,		spinlock,	false,	s->lock)
   215	SEQCOUNT_LOCKTYPE(rwlock_t,		rwlock,		false,	s->lock)
   216	SEQCOUNT_LOCKTYPE(struct mutex,		mutex,		true,	s->lock)
   217	SEQCOUNT_LOCKTYPE(struct ww_mutex,	ww_mutex,	true,	&s->lock->base)
   218	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33031 bytes --]

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

end of thread, other threads:[~2020-08-17  0:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-16 22:26 [PATCH] seqlock: <linux/seqlock.h>: fix multiple kernel-doc warnings Randy Dunlap
2020-08-16 23:26 ` kernel test robot
2020-08-16 23:26   ` kernel test robot
2020-08-16 23:31 ` kernel test robot
2020-08-16 23:31   ` kernel test robot
2020-08-16 23:58 ` kernel test robot
2020-08-16 23:58   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.