Content-Type: multipart/mixed; boundary="===============1608504732331748828==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v3 1/1] ceph: add getvxattr op Date: Mon, 17 Jan 2022 15:58:30 +0800 Message-ID: <202201171516.ilKzMFxt-lkp@intel.com> In-Reply-To: <20220117035946.22442-2-mchangir@redhat.com> List-Id: --===============1608504732331748828== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Milind, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on fd84bfdddd169c219c3a637889a8b87f70a072c2] url: https://github.com/0day-ci/linux/commits/Milind-Changire/ceph-add-s= upport-for-getvxattr-op/20220117-120129 base: fd84bfdddd169c219c3a637889a8b87f70a072c2 config: x86_64-randconfig-r002-20220117 (https://download.01.org/0day-ci/ar= chive/20220117/202201171516.ilKzMFxt-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5f782d= 25a742302d25ef3c8b84b54f7483c2deb9) reproduce (this is a W=3D1 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/2c3b424994ab41a8d52471eb5= a6721f466d515dc git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Milind-Changire/ceph-add-support-f= or-getvxattr-op/20220117-120129 git checkout 2c3b424994ab41a8d52471eb5a6721f466d515dc # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 O=3Dbuild_dir ARCH=3Dx86_64 SHELL=3D/bin/bash fs/ceph/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> fs/ceph/inode.c:2326:53: warning: format specifies type 'unsigned int' b= ut the argument has type 'size_t' (aka 'unsigned long') [-Wformat] dout("do_getvxattr xattr_value_len:%u, size:%u\n", xattr_value_l= en, size); ~~ ^~~~~~~~~~~~~= ~~ %lu include/linux/ceph/ceph_debug.h:26:29: note: expanded from macro 'dout' printk(KERN_DEBUG fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/printk.h:450:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:422:19: note: expanded from macro 'printk_index_w= rap' _p_func(_fmt, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ fs/ceph/inode.c:2326:70: warning: format specifies type 'unsigned int' b= ut the argument has type 'size_t' (aka 'unsigned long') [-Wformat] dout("do_getvxattr xattr_value_len:%u, size:%u\n", xattr_value_l= en, size); ~~ = ^~~~ %lu include/linux/ceph/ceph_debug.h:26:29: note: expanded from macro 'dout' printk(KERN_DEBUG fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/printk.h:450:60: note: expanded from macro 'printk' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:422:19: note: expanded from macro 'printk_index_w= rap' _p_func(_fmt, ##__VA_ARGS__); \ ~~~~ ^~~~~~~~~~~ 2 warnings generated. vim +2326 fs/ceph/inode.c 2293 = 2294 int ceph_do_getvxattr(struct inode *inode, const char *name, void *v= alue, 2295 size_t size) 2296 { 2297 struct ceph_fs_client *fsc =3D ceph_sb_to_client(inode->i_sb); 2298 struct ceph_mds_client *mdsc =3D fsc->mdsc; 2299 struct ceph_mds_request *req; 2300 int mode =3D USE_AUTH_MDS; 2301 int err; 2302 char *xattr_value; 2303 size_t xattr_value_len; 2304 = 2305 req =3D ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETVXATTR, mode); 2306 if (IS_ERR(req)) { 2307 err =3D -ENOMEM; 2308 goto out; 2309 } 2310 = 2311 req->r_path2 =3D kstrdup(name, GFP_NOFS); 2312 if (!req->r_path2) { 2313 err =3D -ENOMEM; 2314 goto put; 2315 } 2316 = 2317 ihold(inode); 2318 req->r_inode =3D inode; 2319 err =3D ceph_mdsc_do_request(mdsc, NULL, req); 2320 if (err < 0) 2321 goto put; 2322 = 2323 xattr_value =3D req->r_reply_info.xattr_info.xattr_value; 2324 xattr_value_len =3D req->r_reply_info.xattr_info.xattr_value_len; 2325 = > 2326 dout("do_getvxattr xattr_value_len:%u, size:%u\n", xattr_value_len,= size); 2327 = 2328 err =3D xattr_value_len; 2329 if (size =3D=3D 0) 2330 goto put; 2331 = 2332 if (xattr_value_len > size) { 2333 err =3D -ERANGE; 2334 goto put; 2335 } 2336 = 2337 memcpy(value, xattr_value, xattr_value_len); 2338 put: 2339 ceph_mdsc_put_request(req); 2340 out: 2341 dout("do_getvxattr result=3D%d\n", err); 2342 return err; 2343 } 2344 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1608504732331748828==--