All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: luo penghao <cgel.zte@gmail.com>,
	Jani Nikula <jani.nikula@linux.intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	luo penghao <luo.penghao@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [Intel-gfx] [PATCH linux-next] drm/i915/display: Remove unused variable in the for loop.
Date: Mon, 18 Oct 2021 20:14:31 +0800	[thread overview]
Message-ID: <202110182057.Xse3pZCT-lkp@intel.com> (raw)
In-Reply-To: <20211018084449.852251-1-luo.penghao@zte.com.cn>

[-- Attachment #1: Type: text/plain, Size: 4795 bytes --]

Hi luo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20211015]

url:    https://github.com/0day-ci/linux/commits/luo-penghao/drm-i915-display-Remove-unused-variable-in-the-for-loop/20211018-164557
base:    7c832d2f9b959e3181370c8b0dacaf9efe13fc05
config: x86_64-randconfig-r014-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
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/1a3c67fc7e245a1130e2b59fe5a04ce82de697c0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review luo-penghao/drm-i915-display-Remove-unused-variable-in-the-for-loop/20211018-164557
        git checkout 1a3c67fc7e245a1130e2b59fe5a04ce82de697c0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_fb.c:1018:25: error: expression result unused [-Werror,-Wunused-value]
                   fb->base.format->cpp[i];
                   ~~~~~~~~~~~~~~~~~~~~ ~^
   1 error generated.


vim +1018 drivers/gpu/drm/i915/display/intel_fb.c

   977	
   978	int intel_fill_fb_info(struct drm_i915_private *i915, struct intel_framebuffer *fb)
   979	{
   980		struct drm_i915_gem_object *obj = intel_fb_obj(&fb->base);
   981		u32 gtt_offset_rotated = 0;
   982		u32 gtt_offset_remapped = 0;
   983		unsigned int max_size = 0;
   984		int i, num_planes = fb->base.format->num_planes;
   985		unsigned int tile_size = intel_tile_size(i915);
   986	
   987		intel_fb_view_init(i915, &fb->normal_view, I915_GGTT_VIEW_NORMAL);
   988	
   989		drm_WARN_ON(&i915->drm,
   990			    intel_fb_supports_90_270_rotation(fb) &&
   991			    intel_fb_needs_pot_stride_remap(fb));
   992	
   993		if (intel_fb_supports_90_270_rotation(fb))
   994			intel_fb_view_init(i915, &fb->rotated_view, I915_GGTT_VIEW_ROTATED);
   995		if (intel_fb_needs_pot_stride_remap(fb))
   996			intel_fb_view_init(i915, &fb->remapped_view, I915_GGTT_VIEW_REMAPPED);
   997	
   998		for (i = 0; i < num_planes; i++) {
   999			struct fb_plane_view_dims view_dims;
  1000			unsigned int width, height;
  1001			unsigned int size;
  1002			u32 offset;
  1003			int x, y;
  1004			int ret;
  1005	
  1006			/*
  1007			 * Plane 2 of Render Compression with Clear Color fb modifier
  1008			 * is consumed by the driver and not passed to DE. Skip the
  1009			 * arithmetic related to alignment and offset calculation.
  1010			 */
  1011			if (is_gen12_ccs_cc_plane(&fb->base, i)) {
  1012				if (IS_ALIGNED(fb->base.offsets[i], PAGE_SIZE))
  1013					continue;
  1014				else
  1015					return -EINVAL;
  1016			}
  1017	
> 1018			fb->base.format->cpp[i];
  1019			intel_fb_plane_dims(fb, i, &width, &height);
  1020	
  1021			ret = convert_plane_offset_to_xy(fb, i, width, &x, &y);
  1022			if (ret)
  1023				return ret;
  1024	
  1025			init_plane_view_dims(fb, i, width, height, &view_dims);
  1026	
  1027			/*
  1028			 * First pixel of the framebuffer from
  1029			 * the start of the normal gtt mapping.
  1030			 */
  1031			fb->normal_view.color_plane[i].x = x;
  1032			fb->normal_view.color_plane[i].y = y;
  1033			fb->normal_view.color_plane[i].stride = fb->base.pitches[i];
  1034	
  1035			offset = calc_plane_aligned_offset(fb, i, &x, &y);
  1036	
  1037			if (intel_fb_supports_90_270_rotation(fb))
  1038				gtt_offset_rotated += calc_plane_remap_info(fb, i, &view_dims,
  1039									    offset, gtt_offset_rotated, x, y,
  1040									    &fb->rotated_view);
  1041	
  1042			if (intel_fb_needs_pot_stride_remap(fb))
  1043				gtt_offset_remapped += calc_plane_remap_info(fb, i, &view_dims,
  1044									     offset, gtt_offset_remapped, x, y,
  1045									     &fb->remapped_view);
  1046	
  1047			size = calc_plane_normal_size(fb, i, &view_dims, x, y);
  1048			/* how many tiles in total needed in the bo */
  1049			max_size = max(max_size, offset + size);
  1050		}
  1051	
  1052		if (mul_u32_u32(max_size, tile_size) > obj->base.size) {
  1053			drm_dbg_kms(&i915->drm,
  1054				    "fb too big for bo (need %llu bytes, have %zu bytes)\n",
  1055				    mul_u32_u32(max_size, tile_size), obj->base.size);
  1056			return -EINVAL;
  1057		}
  1058	
  1059		return 0;
  1060	}
  1061	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32668 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: luo penghao <cgel.zte@gmail.com>,
	Jani Nikula <jani.nikula@linux.intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	luo penghao <luo.penghao@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH linux-next] drm/i915/display: Remove unused variable in the for loop.
Date: Mon, 18 Oct 2021 20:14:31 +0800	[thread overview]
Message-ID: <202110182057.Xse3pZCT-lkp@intel.com> (raw)
In-Reply-To: <20211018084449.852251-1-luo.penghao@zte.com.cn>

[-- Attachment #1: Type: text/plain, Size: 4795 bytes --]

Hi luo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20211015]

url:    https://github.com/0day-ci/linux/commits/luo-penghao/drm-i915-display-Remove-unused-variable-in-the-for-loop/20211018-164557
base:    7c832d2f9b959e3181370c8b0dacaf9efe13fc05
config: x86_64-randconfig-r014-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
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/1a3c67fc7e245a1130e2b59fe5a04ce82de697c0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review luo-penghao/drm-i915-display-Remove-unused-variable-in-the-for-loop/20211018-164557
        git checkout 1a3c67fc7e245a1130e2b59fe5a04ce82de697c0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_fb.c:1018:25: error: expression result unused [-Werror,-Wunused-value]
                   fb->base.format->cpp[i];
                   ~~~~~~~~~~~~~~~~~~~~ ~^
   1 error generated.


vim +1018 drivers/gpu/drm/i915/display/intel_fb.c

   977	
   978	int intel_fill_fb_info(struct drm_i915_private *i915, struct intel_framebuffer *fb)
   979	{
   980		struct drm_i915_gem_object *obj = intel_fb_obj(&fb->base);
   981		u32 gtt_offset_rotated = 0;
   982		u32 gtt_offset_remapped = 0;
   983		unsigned int max_size = 0;
   984		int i, num_planes = fb->base.format->num_planes;
   985		unsigned int tile_size = intel_tile_size(i915);
   986	
   987		intel_fb_view_init(i915, &fb->normal_view, I915_GGTT_VIEW_NORMAL);
   988	
   989		drm_WARN_ON(&i915->drm,
   990			    intel_fb_supports_90_270_rotation(fb) &&
   991			    intel_fb_needs_pot_stride_remap(fb));
   992	
   993		if (intel_fb_supports_90_270_rotation(fb))
   994			intel_fb_view_init(i915, &fb->rotated_view, I915_GGTT_VIEW_ROTATED);
   995		if (intel_fb_needs_pot_stride_remap(fb))
   996			intel_fb_view_init(i915, &fb->remapped_view, I915_GGTT_VIEW_REMAPPED);
   997	
   998		for (i = 0; i < num_planes; i++) {
   999			struct fb_plane_view_dims view_dims;
  1000			unsigned int width, height;
  1001			unsigned int size;
  1002			u32 offset;
  1003			int x, y;
  1004			int ret;
  1005	
  1006			/*
  1007			 * Plane 2 of Render Compression with Clear Color fb modifier
  1008			 * is consumed by the driver and not passed to DE. Skip the
  1009			 * arithmetic related to alignment and offset calculation.
  1010			 */
  1011			if (is_gen12_ccs_cc_plane(&fb->base, i)) {
  1012				if (IS_ALIGNED(fb->base.offsets[i], PAGE_SIZE))
  1013					continue;
  1014				else
  1015					return -EINVAL;
  1016			}
  1017	
> 1018			fb->base.format->cpp[i];
  1019			intel_fb_plane_dims(fb, i, &width, &height);
  1020	
  1021			ret = convert_plane_offset_to_xy(fb, i, width, &x, &y);
  1022			if (ret)
  1023				return ret;
  1024	
  1025			init_plane_view_dims(fb, i, width, height, &view_dims);
  1026	
  1027			/*
  1028			 * First pixel of the framebuffer from
  1029			 * the start of the normal gtt mapping.
  1030			 */
  1031			fb->normal_view.color_plane[i].x = x;
  1032			fb->normal_view.color_plane[i].y = y;
  1033			fb->normal_view.color_plane[i].stride = fb->base.pitches[i];
  1034	
  1035			offset = calc_plane_aligned_offset(fb, i, &x, &y);
  1036	
  1037			if (intel_fb_supports_90_270_rotation(fb))
  1038				gtt_offset_rotated += calc_plane_remap_info(fb, i, &view_dims,
  1039									    offset, gtt_offset_rotated, x, y,
  1040									    &fb->rotated_view);
  1041	
  1042			if (intel_fb_needs_pot_stride_remap(fb))
  1043				gtt_offset_remapped += calc_plane_remap_info(fb, i, &view_dims,
  1044									     offset, gtt_offset_remapped, x, y,
  1045									     &fb->remapped_view);
  1046	
  1047			size = calc_plane_normal_size(fb, i, &view_dims, x, y);
  1048			/* how many tiles in total needed in the bo */
  1049			max_size = max(max_size, offset + size);
  1050		}
  1051	
  1052		if (mul_u32_u32(max_size, tile_size) > obj->base.size) {
  1053			drm_dbg_kms(&i915->drm,
  1054				    "fb too big for bo (need %llu bytes, have %zu bytes)\n",
  1055				    mul_u32_u32(max_size, tile_size), obj->base.size);
  1056			return -EINVAL;
  1057		}
  1058	
  1059		return 0;
  1060	}
  1061	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32668 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH linux-next] drm/i915/display: Remove unused variable in the for loop.
Date: Mon, 18 Oct 2021 20:14:31 +0800	[thread overview]
Message-ID: <202110182057.Xse3pZCT-lkp@intel.com> (raw)
In-Reply-To: <20211018084449.852251-1-luo.penghao@zte.com.cn>

[-- Attachment #1: Type: text/plain, Size: 4919 bytes --]

Hi luo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20211015]

url:    https://github.com/0day-ci/linux/commits/luo-penghao/drm-i915-display-Remove-unused-variable-in-the-for-loop/20211018-164557
base:    7c832d2f9b959e3181370c8b0dacaf9efe13fc05
config: x86_64-randconfig-r014-20211018 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d245f2e8597bfb52c34810a328d42b990e4af1a4)
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/1a3c67fc7e245a1130e2b59fe5a04ce82de697c0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review luo-penghao/drm-i915-display-Remove-unused-variable-in-the-for-loop/20211018-164557
        git checkout 1a3c67fc7e245a1130e2b59fe5a04ce82de697c0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_fb.c:1018:25: error: expression result unused [-Werror,-Wunused-value]
                   fb->base.format->cpp[i];
                   ~~~~~~~~~~~~~~~~~~~~ ~^
   1 error generated.


vim +1018 drivers/gpu/drm/i915/display/intel_fb.c

   977	
   978	int intel_fill_fb_info(struct drm_i915_private *i915, struct intel_framebuffer *fb)
   979	{
   980		struct drm_i915_gem_object *obj = intel_fb_obj(&fb->base);
   981		u32 gtt_offset_rotated = 0;
   982		u32 gtt_offset_remapped = 0;
   983		unsigned int max_size = 0;
   984		int i, num_planes = fb->base.format->num_planes;
   985		unsigned int tile_size = intel_tile_size(i915);
   986	
   987		intel_fb_view_init(i915, &fb->normal_view, I915_GGTT_VIEW_NORMAL);
   988	
   989		drm_WARN_ON(&i915->drm,
   990			    intel_fb_supports_90_270_rotation(fb) &&
   991			    intel_fb_needs_pot_stride_remap(fb));
   992	
   993		if (intel_fb_supports_90_270_rotation(fb))
   994			intel_fb_view_init(i915, &fb->rotated_view, I915_GGTT_VIEW_ROTATED);
   995		if (intel_fb_needs_pot_stride_remap(fb))
   996			intel_fb_view_init(i915, &fb->remapped_view, I915_GGTT_VIEW_REMAPPED);
   997	
   998		for (i = 0; i < num_planes; i++) {
   999			struct fb_plane_view_dims view_dims;
  1000			unsigned int width, height;
  1001			unsigned int size;
  1002			u32 offset;
  1003			int x, y;
  1004			int ret;
  1005	
  1006			/*
  1007			 * Plane 2 of Render Compression with Clear Color fb modifier
  1008			 * is consumed by the driver and not passed to DE. Skip the
  1009			 * arithmetic related to alignment and offset calculation.
  1010			 */
  1011			if (is_gen12_ccs_cc_plane(&fb->base, i)) {
  1012				if (IS_ALIGNED(fb->base.offsets[i], PAGE_SIZE))
  1013					continue;
  1014				else
  1015					return -EINVAL;
  1016			}
  1017	
> 1018			fb->base.format->cpp[i];
  1019			intel_fb_plane_dims(fb, i, &width, &height);
  1020	
  1021			ret = convert_plane_offset_to_xy(fb, i, width, &x, &y);
  1022			if (ret)
  1023				return ret;
  1024	
  1025			init_plane_view_dims(fb, i, width, height, &view_dims);
  1026	
  1027			/*
  1028			 * First pixel of the framebuffer from
  1029			 * the start of the normal gtt mapping.
  1030			 */
  1031			fb->normal_view.color_plane[i].x = x;
  1032			fb->normal_view.color_plane[i].y = y;
  1033			fb->normal_view.color_plane[i].stride = fb->base.pitches[i];
  1034	
  1035			offset = calc_plane_aligned_offset(fb, i, &x, &y);
  1036	
  1037			if (intel_fb_supports_90_270_rotation(fb))
  1038				gtt_offset_rotated += calc_plane_remap_info(fb, i, &view_dims,
  1039									    offset, gtt_offset_rotated, x, y,
  1040									    &fb->rotated_view);
  1041	
  1042			if (intel_fb_needs_pot_stride_remap(fb))
  1043				gtt_offset_remapped += calc_plane_remap_info(fb, i, &view_dims,
  1044									     offset, gtt_offset_remapped, x, y,
  1045									     &fb->remapped_view);
  1046	
  1047			size = calc_plane_normal_size(fb, i, &view_dims, x, y);
  1048			/* how many tiles in total needed in the bo */
  1049			max_size = max(max_size, offset + size);
  1050		}
  1051	
  1052		if (mul_u32_u32(max_size, tile_size) > obj->base.size) {
  1053			drm_dbg_kms(&i915->drm,
  1054				    "fb too big for bo (need %llu bytes, have %zu bytes)\n",
  1055				    mul_u32_u32(max_size, tile_size), obj->base.size);
  1056			return -EINVAL;
  1057		}
  1058	
  1059		return 0;
  1060	}
  1061	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32668 bytes --]

  parent reply	other threads:[~2021-10-18 12:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18  8:44 [Intel-gfx] [PATCH linux-next] drm/i915/display: Remove unused variable in the for loop luo penghao
2021-10-18  8:44 ` luo penghao
2021-10-18  9:11 ` [Intel-gfx] " Jani Nikula
2021-10-18  9:11   ` Jani Nikula
2021-10-18 12:14 ` kernel test robot [this message]
2021-10-18 12:14   ` kernel test robot
2021-10-18 12:14   ` kernel test robot
2021-10-18 15:45 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202110182057.Xse3pZCT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@linux.ie \
    --cc=cgel.zte@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=luo.penghao@zte.com.cn \
    --cc=rodrigo.vivi@intel.com \
    --cc=zealci@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.