Content-Type: multipart/mixed; boundary="===============8415074192691880327==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH] drm/vmwgfx: remove redundant ret variable Date: Thu, 13 Jan 2022 02:01:15 +0800 Message-ID: <202201130145.eexFh3na-lkp@intel.com> In-Reply-To: <20220112082422.667488-1-chi.minghao@zte.com.cn> List-Id: --===============8415074192691880327== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm/drm-next] [also build test WARNING on next-20220112] [cannot apply to v5.16] [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/drm-vmw= gfx-remove-redundant-ret-variable/20220112-162527 base: git://anongit.freedesktop.org/drm/drm drm-next config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220113= /202201130145.eexFh3na-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=3D1 build): # https://github.com/0day-ci/linux/commit/3542ac844ea28aaa8528f5deb= 3ee52d1690f1f8a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review cgel-zte-gmail-com/drm-vmwgfx-remo= ve-redundant-ret-variable/20220112-162527 git checkout 3542ac844ea28aaa8528f5deb3ee52d1690f1f8a # save the config file to linux build tree mkdir build_dir make W=3D1 O=3Dbuild_dir ARCH=3Di386 SHELL=3D/bin/bash drivers/gpu/= drm/vmwgfx/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/gpu/drm/vmwgfx/vmwgfx_bo.c: In function 'vmw_dumb_create': >> drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:794:1: warning: ISO C90 forbids mixed= declarations and code [-Wdeclaration-after-statement] 794 | void vmw_bo_swap_notify(struct ttm_buffer_object *bo) | ^~~~ drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:860:1: error: expected declaration or= statement at end of input 860 | } | ^ At top level: drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:853:6: warning: 'vmw_bo_is_vmw_bo' de= fined but not used [-Wunused-function] 853 | bool vmw_bo_is_vmw_bo(struct ttm_buffer_object *bo) | ^~~~~~~~~~~~~~~~ drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:815:6: warning: 'vmw_bo_move_notify' = defined but not used [-Wunused-function] 815 | void vmw_bo_move_notify(struct ttm_buffer_object *bo, | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:794:6: warning: 'vmw_bo_swap_notify' = defined but not used [-Wunused-function] 794 | void vmw_bo_swap_notify(struct ttm_buffer_object *bo) | ^~~~~~~~~~~~~~~~~~ vim +794 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c e9431ea5076a91 Thomas Hellstrom 2018-06-19 761 = e9431ea5076a91 Thomas Hellstrom 2018-06-19 762 = e9431ea5076a91 Thomas Hellstrom 2018-06-19 763 /** e9431ea5076a91 Thomas Hellstrom 2018-06-19 764 * vmw_dumb_create - Creat= e a dumb kms buffer e9431ea5076a91 Thomas Hellstrom 2018-06-19 765 * e9431ea5076a91 Thomas Hellstrom 2018-06-19 766 * @file_priv: Pointer to = a struct drm_file identifying the caller. e9431ea5076a91 Thomas Hellstrom 2018-06-19 767 * @dev: Pointer to the dr= m device. e9431ea5076a91 Thomas Hellstrom 2018-06-19 768 * @args: Pointer to a str= uct drm_mode_create_dumb structure e9431ea5076a91 Thomas Hellstrom 2018-06-19 769 * Return: Zero on success= , negative error code on failure. e9431ea5076a91 Thomas Hellstrom 2018-06-19 770 * e9431ea5076a91 Thomas Hellstrom 2018-06-19 771 * This is a driver callba= ck for the core drm create_dumb functionality. e9431ea5076a91 Thomas Hellstrom 2018-06-19 772 * Note that this is very = similar to the vmw_bo_alloc ioctl, except e9431ea5076a91 Thomas Hellstrom 2018-06-19 773 * that the arguments have= a different format. e9431ea5076a91 Thomas Hellstrom 2018-06-19 774 */ e9431ea5076a91 Thomas Hellstrom 2018-06-19 775 int vmw_dumb_create(struct= drm_file *file_priv, e9431ea5076a91 Thomas Hellstrom 2018-06-19 776 struct drm_device *d= ev, e9431ea5076a91 Thomas Hellstrom 2018-06-19 777 struct drm_mode_crea= te_dumb *args) e9431ea5076a91 Thomas Hellstrom 2018-06-19 778 { e9431ea5076a91 Thomas Hellstrom 2018-06-19 779 struct vmw_private *dev_p= riv =3D vmw_priv(dev); e9431ea5076a91 Thomas Hellstrom 2018-06-19 780 struct vmw_buffer_object = *vbo; e9431ea5076a91 Thomas Hellstrom 2018-06-19 781 = e9431ea5076a91 Thomas Hellstrom 2018-06-19 782 args->pitch =3D args->wid= th * ((args->bpp + 7) / 8); 8afa13a0583f94 Zack Rusin 2021-12-06 783 args->size =3D ALIGN(args= ->pitch * args->height, PAGE_SIZE); e9431ea5076a91 Thomas Hellstrom 2018-06-19 784 = 3542ac844ea28a Minghao Chi 2022-01-12 785 return vmw_gem_object_cre= ate_with_handle(dev_priv, file_priv, 8afa13a0583f94 Zack Rusin 2021-12-06 786 args->size, &args->h= andle, 8afa13a0583f94 Zack Rusin 2021-12-06 787 &vbo); e9431ea5076a91 Thomas Hellstrom 2018-06-19 788 = e9431ea5076a91 Thomas Hellstrom 2018-06-19 789 /** e9431ea5076a91 Thomas Hellstrom 2018-06-19 790 * vmw_bo_swap_notify - sw= apout notify callback. e9431ea5076a91 Thomas Hellstrom 2018-06-19 791 * e9431ea5076a91 Thomas Hellstrom 2018-06-19 792 * @bo: The buffer object = to be swapped out. e9431ea5076a91 Thomas Hellstrom 2018-06-19 793 */ e9431ea5076a91 Thomas Hellstrom 2018-06-19 @794 void vmw_bo_swap_notify(st= ruct ttm_buffer_object *bo) e9431ea5076a91 Thomas Hellstrom 2018-06-19 795 { e9431ea5076a91 Thomas Hellstrom 2018-06-19 796 /* Is @bo embedded in a s= truct vmw_buffer_object? */ 8afa13a0583f94 Zack Rusin 2021-12-06 797 if (vmw_bo_is_vmw_bo(bo)) e9431ea5076a91 Thomas Hellstrom 2018-06-19 798 return; e9431ea5076a91 Thomas Hellstrom 2018-06-19 799 = e9431ea5076a91 Thomas Hellstrom 2018-06-19 800 /* Kill any cached kernel= maps before swapout */ e9431ea5076a91 Thomas Hellstrom 2018-06-19 801 vmw_bo_unmap(vmw_buffer_o= bject(bo)); e9431ea5076a91 Thomas Hellstrom 2018-06-19 802 } e9431ea5076a91 Thomas Hellstrom 2018-06-19 803 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============8415074192691880327==--