tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.fd head: 154eb19a802fdf8629273d414dbeb31eccb61587 commit: a5027b86a79716e98fe0b8e1247743dfb5a5c080 [28/39] switch spufs_calls_{get,put}() to CLASS() use config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20240729/202407292309.QXlzRsZS-lkp@xxxxxxxxx/config) compiler: powerpc64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240729/202407292309.QXlzRsZS-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202407292309.QXlzRsZS-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from include/linux/file.h:14, from arch/powerpc/platforms/cell/spu_syscalls.c:10: >> include/linux/cleanup.h:111:21: error: function declaration isn't a prototype [-Werror=strict-prototypes] 111 | static inline _type class_##_name##_constructor(_init_args) \ | ^~~~~~ arch/powerpc/platforms/cell/spu_syscalls.c:59:1: note: in expansion of macro 'DEFINE_CLASS' 59 | DEFINE_CLASS(spufs_calls, struct spufs_calls *, spufs_calls_put(_T), spufs_calls_get()) | ^~~~~~~~~~~~ cc1: some warnings being treated as errors vim +111 include/linux/cleanup.h 54da6a0924311c Peter Zijlstra 2023-05-26 82 54da6a0924311c Peter Zijlstra 2023-05-26 83 54da6a0924311c Peter Zijlstra 2023-05-26 84 /* 54da6a0924311c Peter Zijlstra 2023-05-26 85 * DEFINE_CLASS(name, type, exit, init, init_args...): 54da6a0924311c Peter Zijlstra 2023-05-26 86 * helper to define the destructor and constructor for a type. 54da6a0924311c Peter Zijlstra 2023-05-26 87 * @exit is an expression using '_T' -- similar to FREE above. 54da6a0924311c Peter Zijlstra 2023-05-26 88 * @init is an expression in @init_args resulting in @type 54da6a0924311c Peter Zijlstra 2023-05-26 89 * 54da6a0924311c Peter Zijlstra 2023-05-26 90 * EXTEND_CLASS(name, ext, init, init_args...): 54da6a0924311c Peter Zijlstra 2023-05-26 91 * extends class @name to @name@ext with the new constructor 54da6a0924311c Peter Zijlstra 2023-05-26 92 * 54da6a0924311c Peter Zijlstra 2023-05-26 93 * CLASS(name, var)(args...): 54da6a0924311c Peter Zijlstra 2023-05-26 94 * declare the variable @var as an instance of the named class 54da6a0924311c Peter Zijlstra 2023-05-26 95 * 54da6a0924311c Peter Zijlstra 2023-05-26 96 * Ex. 54da6a0924311c Peter Zijlstra 2023-05-26 97 * 54da6a0924311c Peter Zijlstra 2023-05-26 98 * DEFINE_CLASS(fdget, struct fd, fdput(_T), fdget(fd), int fd) 54da6a0924311c Peter Zijlstra 2023-05-26 99 * 54da6a0924311c Peter Zijlstra 2023-05-26 100 * CLASS(fdget, f)(fd); a825760957e3aa Al Viro 2024-05-31 101 * if (!fd_file(f)) 54da6a0924311c Peter Zijlstra 2023-05-26 102 * return -EBADF; 54da6a0924311c Peter Zijlstra 2023-05-26 103 * 54da6a0924311c Peter Zijlstra 2023-05-26 104 * // use 'f' without concern 54da6a0924311c Peter Zijlstra 2023-05-26 105 */ 54da6a0924311c Peter Zijlstra 2023-05-26 106 54da6a0924311c Peter Zijlstra 2023-05-26 107 #define DEFINE_CLASS(_name, _type, _exit, _init, _init_args...) \ 54da6a0924311c Peter Zijlstra 2023-05-26 108 typedef _type class_##_name##_t; \ 54da6a0924311c Peter Zijlstra 2023-05-26 109 static inline void class_##_name##_destructor(_type *p) \ 54da6a0924311c Peter Zijlstra 2023-05-26 110 { _type _T = *p; _exit; } \ 54da6a0924311c Peter Zijlstra 2023-05-26 @111 static inline _type class_##_name##_constructor(_init_args) \ 54da6a0924311c Peter Zijlstra 2023-05-26 112 { _type t = _init; return t; } 54da6a0924311c Peter Zijlstra 2023-05-26 113 :::::: The code at line 111 was first introduced by commit :::::: 54da6a0924311c7cf5015533991e44fb8eb12773 locking: Introduce __cleanup() based infrastructure :::::: TO: Peter Zijlstra <peterz@xxxxxxxxxxxxx> :::::: CC: Peter Zijlstra <peterz@xxxxxxxxxxxxx> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki