[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOi1vP_GQ7CwQ1W0wbA_BQxHHgZBTCSSSd_g4_-czoHkKEVp7A@mail.gmail.com>
Date: Thu, 29 Sep 2022 21:52:12 +0200
From: Ilya Dryomov <idryomov@...il.com>
To: kernel test robot <lkp@...el.com>
Cc: Zhou jie <zhoujie@...china.com>, jlayton@...nel.org,
xiubli@...hat.com, llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
ceph-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs/ceph:Modify the return value to void
On Thu, Sep 29, 2022 at 5:19 PM kernel test robot <lkp@...el.com> wrote:
>
> Hi Zhou,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on ceph-client/for-linus]
> [also build test ERROR on linus/master v6.0-rc7 next-20220928]
> [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#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Zhou-jie/fs-ceph-Modify-the-return-value-to-void/20220927-165857
> base: https://github.com/ceph/ceph-client.git for-linus
> config: hexagon-randconfig-r041-20220926
> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
> 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/intel-lab-lkp/linux/commit/6c7163052ce6f51c217c650bc5592b7ef50b2280
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review Zhou-jie/fs-ceph-Modify-the-return-value-to-void/20220927-165857
> git checkout 6c7163052ce6f51c217c650bc5592b7ef50b2280
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/ceph/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@...el.com>
>
> All errors (new ones prefixed by >>):
>
> >> fs/ceph/debugfs.c:281:38: error: incompatible function pointer types passing 'void (struct inode *, struct ceph_cap *, void *)' to parameter of type 'int (*)(struct inode *, struct ceph_cap *, void *)' [-Wincompatible-function-pointer-types]
> ceph_iterate_session_caps(session, caps_show_cb, s);
> ^~~~~~~~~~~~
> fs/ceph/mds_client.h:540:16: note: passing argument to parameter 'cb' here
> int (*cb)(struct inode *,
> ^
> >> fs/ceph/debugfs.c:349:1: error: incompatible function pointer types passing 'void (struct seq_file *, void *)' to parameter of type 'int (*)(struct seq_file *, void *)' [-Wincompatible-function-pointer-types]
> DEFINE_SHOW_ATTRIBUTE(mdsmap);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/seq_file.h:199:27: note: expanded from macro 'DEFINE_SHOW_ATTRIBUTE'
> return single_open(file, __name ## _show, inode->i_private); \
> ^~~~~~~~~~~~~~~
> <scratch space>:79:1: note: expanded from here
> mdsmap_show
> ^~~~~~~~~~~
> include/linux/seq_file.h:166:38: note: passing argument to parameter here
> int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
> ^
> fs/ceph/debugfs.c:350:1: error: incompatible function pointer types passing 'void (struct seq_file *, void *)' to parameter of type 'int (*)(struct seq_file *, void *)' [-Wincompatible-function-pointer-types]
Hi Zhou,
As you can see from the above output, the signatures of these
functions are dictated by debugfs infrastructure. Even though
we happen to return 0 in all cases, changing the return type to
void is wrong.
Thanks,
Ilya
Powered by blists - more mailing lists