Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on cifs/for-next]
[also build test ERROR on v5.16-rc1 next-20211115]
[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/cgel-zte-gmail-com/fs-cifs-conve...
base:
git://git.samba.org/sfrench/cifs-2.6.git for-next
config: hexagon-randconfig-r041-20211115 (attached as .config)
compiler: clang version 14.0.0 (
https://github.com/llvm/llvm-project
fbe72e41b99dc7994daac300d208a955be3e4a0a)
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
#
https://github.com/0day-ci/linux/commit/8d0f81fa94784bab585209f6cea84ea63...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
cgel-zte-gmail-com/fs-cifs-convert-from-atomic_t-to-refcount_t-on-tlink-tl_count/20211112-173127
git checkout 8d0f81fa94784bab585209f6cea84ea63a4a37ba
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from fs/cifs/cifsacl.c:18:
> fs/cifs/cifsglob.h:1156:14: error: incompatible pointer types
passing 'refcount_t *' (aka 'struct refcount_struct *') to parameter of
type 'atomic_t *' [-Werror,-Wincompatible-pointer-types]
atomic_inc(&tlink->tl_count);
^~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:179:22: note: passing argument to parameter
'v' here
atomic_inc(atomic_t *v)
^
1 error generated.
--
In file included from fs/cifs/ioctl.c:17:
> fs/cifs/cifsglob.h:1156:14: error: incompatible pointer types
passing 'refcount_t *' (aka 'struct refcount_struct *') to parameter of
type 'atomic_t *' [-Werror,-Wincompatible-pointer-types]
atomic_inc(&tlink->tl_count);
^~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:179:22: note: passing argument to parameter
'v' here
atomic_inc(atomic_t *v)
^
fs/cifs/ioctl.c:324:10: warning: variable 'caps' set but not used
[-Wunused-but-set-variable]
__u64 caps;
^
1 warning and 1 error generated.
--
In file included from fs/cifs/connect.c:36:
> fs/cifs/cifsglob.h:1156:14: error: incompatible pointer types
passing 'refcount_t *' (aka 'struct refcount_struct *') to parameter of
type 'atomic_t *' [-Werror,-Wincompatible-pointer-types]
atomic_inc(&tlink->tl_count);
^~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:179:22: note: passing argument to parameter
'v' here
atomic_inc(atomic_t *v)
^
fs/cifs/connect.c:3008:14: error: no member named 'fscache' in 'struct
cifs_tcon'
if (!tcon->fscache)
~~~~ ^
> fs/cifs/connect.c:4053:19: error: incompatible pointer types
passing 'refcount_t *' (aka 'struct refcount_struct *') to parameter of
type 'const atomic_t *' [-Werror,-Wincompatible-pointer-types]
atomic_read(&tlink->tl_count) != 0 ||
^~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:25:29: note: passing argument to parameter
'v' here
atomic_read(const atomic_t *v)
^
3 errors generated.
vim +1156 fs/cifs/cifsglob.h
7ffec372458d16 Jeff Layton 2010-09-29 1151
13cfb7334eb6fd Jeff Layton 2010-09-29 1152 static inline struct tcon_link *
13cfb7334eb6fd Jeff Layton 2010-09-29 1153 cifs_get_tlink(struct tcon_link *tlink)
13cfb7334eb6fd Jeff Layton 2010-09-29 1154 {
9d002df492b14c Jeff Layton 2010-10-06 1155 if (tlink && !IS_ERR(tlink))
9d002df492b14c Jeff Layton 2010-10-06 @1156 atomic_inc(&tlink->tl_count);
13cfb7334eb6fd Jeff Layton 2010-09-29 1157 return tlink;
13cfb7334eb6fd Jeff Layton 2010-09-29 1158 }
13cfb7334eb6fd Jeff Layton 2010-09-29 1159
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org