Content-Type: multipart/mixed; boundary="===============4230920271041753996==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [Intel-gfx] [PATCH 4/4] drm/i915/guc: Verify hwconfig blob matches supported format Date: Tue, 08 Feb 2022 06:45:14 +0800 Message-ID: <202202080601.vp3JG4Dh-lkp@intel.com> In-Reply-To: <20220207192854.862959-5-jordan.l.justen@intel.com> List-Id: --===============4230920271041753996== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Jordan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-tip/drm-tip drm-exynos/exynos-drm-next drm/= drm-next tegra-drm/drm/tegra/for-next v5.17-rc3 next-20220207] [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/Jordan-Justen/GuC-HWCONFIG= -with-documentation/20220208-032950 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: i386-randconfig-m021-20220207 (https://download.01.org/0day-ci/arch= ive/20220208/202202080601.vp3JG4Dh-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/c122b0dea958e76766ce9b4b9= f34d2eed16fb566 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jordan-Justen/GuC-HWCONFIG-with-do= cumentation/20220208-032950 git checkout c122b0dea958e76766ce9b4b9f34d2eed16fb566 # 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/i915/ 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/i915/gt/uc/intel_guc_hwconfig.c: In function 'verify_hwc= onfig_blob': >> drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c:79:2: warning: ISO C90 f= orbids mixed declarations and code [-Wdeclaration-after-statement] 79 | struct drm_i915_query_hwconfig_blob_item *pos =3D hwconfig->ptr; | ^~~~~~ vim +79 drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c 73 = 74 static int verify_hwconfig_blob(const struct intel_guc_hwconfig *hwc= onfig) 75 { 76 if (hwconfig->size % 4 !=3D 0 || hwconfig->ptr =3D=3D NULL) 77 return -EINVAL; 78 = > 79 struct drm_i915_query_hwconfig_blob_item *pos =3D hwconfig->ptr; 80 u32 remaining =3D (hwconfig->size / 4); 81 while (remaining > 0) { 82 if (remaining < 2) 83 return -EINVAL; 84 if (pos->length > remaining - 2) 85 return -EINVAL; 86 remaining -=3D 2 + pos->length; 87 pos =3D (void *)&pos->data[pos->length]; 88 } 89 = 90 DRM_INFO("hwconfig blob format appears valid\n"); 91 return 0; 92 } 93 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============4230920271041753996==--