lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <ZVWOHqAqo5RVjbqn@rli9-mobl>
Date:   Thu, 16 Nov 2023 11:35:58 +0800
From:   kernel test robot <philip.li@...el.com>
To:     Sui Jingfeng <suijingfeng@...ngson.cn>
CC:     <oe-kbuild-all@...ts.linux.dev>, <linux-kernel@...r.kernel.org>
Subject: drivers/gpu/drm/loongson/lsdc_plane.c:268:42: sparse: sparse:
 self-comparison always evaluates to false

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c42d9eeef8e5ba9292eda36fd8e3c11f35ee065c
commit: f39db26c54281da6a785259498ca74b5e470476f drm: Add kms driver for loongson display controller
date:   4 months ago
:::::: branch date: 11 hours ago
:::::: commit date: 4 months ago
config: loongarch-randconfig-r111-20231115 (https://download.01.org/0day-ci/archive/20231115/202311152357.4KFS0M8f-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231115/202311152357.4KFS0M8f-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/r/202311152357.4KFS0M8f-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/loongson/lsdc_plane.c:268:42: sparse: sparse: self-comparison always evaluates to false

vim +268 drivers/gpu/drm/loongson/lsdc_plane.c

f39db26c54281d Sui Jingfeng 2023-06-15  225  
f39db26c54281d Sui Jingfeng 2023-06-15  226  static void lsdc_cursor_plane_atomic_async_update(struct drm_plane *plane,
f39db26c54281d Sui Jingfeng 2023-06-15  227  						  struct drm_atomic_state *state)
f39db26c54281d Sui Jingfeng 2023-06-15  228  {
f39db26c54281d Sui Jingfeng 2023-06-15  229  	struct lsdc_cursor *cursor = to_lsdc_cursor(plane);
f39db26c54281d Sui Jingfeng 2023-06-15  230  	const struct lsdc_cursor_plane_ops *ops = cursor->ops;
f39db26c54281d Sui Jingfeng 2023-06-15  231  	struct drm_framebuffer *old_fb = plane->state->fb;
f39db26c54281d Sui Jingfeng 2023-06-15  232  	struct drm_framebuffer *new_fb;
f39db26c54281d Sui Jingfeng 2023-06-15  233  	struct drm_plane_state *new_state;
f39db26c54281d Sui Jingfeng 2023-06-15  234  
f39db26c54281d Sui Jingfeng 2023-06-15  235  	new_state = drm_atomic_get_new_plane_state(state, plane);
f39db26c54281d Sui Jingfeng 2023-06-15  236  
f39db26c54281d Sui Jingfeng 2023-06-15  237  	new_fb = plane->state->fb;
f39db26c54281d Sui Jingfeng 2023-06-15  238  
f39db26c54281d Sui Jingfeng 2023-06-15  239  	plane->state->crtc_x = new_state->crtc_x;
f39db26c54281d Sui Jingfeng 2023-06-15  240  	plane->state->crtc_y = new_state->crtc_y;
f39db26c54281d Sui Jingfeng 2023-06-15  241  	plane->state->crtc_h = new_state->crtc_h;
f39db26c54281d Sui Jingfeng 2023-06-15  242  	plane->state->crtc_w = new_state->crtc_w;
f39db26c54281d Sui Jingfeng 2023-06-15  243  	plane->state->src_x = new_state->src_x;
f39db26c54281d Sui Jingfeng 2023-06-15  244  	plane->state->src_y = new_state->src_y;
f39db26c54281d Sui Jingfeng 2023-06-15  245  	plane->state->src_h = new_state->src_h;
f39db26c54281d Sui Jingfeng 2023-06-15  246  	plane->state->src_w = new_state->src_w;
f39db26c54281d Sui Jingfeng 2023-06-15  247  	swap(plane->state->fb, new_state->fb);
f39db26c54281d Sui Jingfeng 2023-06-15  248  
f39db26c54281d Sui Jingfeng 2023-06-15  249  	if (new_state->visible) {
f39db26c54281d Sui Jingfeng 2023-06-15  250  		enum lsdc_cursor_size cursor_size;
f39db26c54281d Sui Jingfeng 2023-06-15  251  
f39db26c54281d Sui Jingfeng 2023-06-15  252  		switch (new_state->crtc_w) {
f39db26c54281d Sui Jingfeng 2023-06-15  253  		case 64:
f39db26c54281d Sui Jingfeng 2023-06-15  254  			cursor_size = CURSOR_SIZE_64X64;
f39db26c54281d Sui Jingfeng 2023-06-15  255  			break;
f39db26c54281d Sui Jingfeng 2023-06-15  256  		case 32:
f39db26c54281d Sui Jingfeng 2023-06-15  257  			cursor_size = CURSOR_SIZE_32X32;
f39db26c54281d Sui Jingfeng 2023-06-15  258  			break;
f39db26c54281d Sui Jingfeng 2023-06-15  259  		default:
f39db26c54281d Sui Jingfeng 2023-06-15  260  			cursor_size = CURSOR_SIZE_32X32;
f39db26c54281d Sui Jingfeng 2023-06-15  261  			break;
f39db26c54281d Sui Jingfeng 2023-06-15  262  		}
f39db26c54281d Sui Jingfeng 2023-06-15  263  
f39db26c54281d Sui Jingfeng 2023-06-15  264  		ops->update_position(cursor, new_state->crtc_x, new_state->crtc_y);
f39db26c54281d Sui Jingfeng 2023-06-15  265  
f39db26c54281d Sui Jingfeng 2023-06-15  266  		ops->update_cfg(cursor, cursor_size, CURSOR_FORMAT_ARGB8888);
f39db26c54281d Sui Jingfeng 2023-06-15  267  
f39db26c54281d Sui Jingfeng 2023-06-15 @268  		if (!old_fb || old_fb != new_fb)
f39db26c54281d Sui Jingfeng 2023-06-15  269  			ops->update_bo_addr(cursor, lsdc_fb_base_addr(new_fb));
f39db26c54281d Sui Jingfeng 2023-06-15  270  	}
f39db26c54281d Sui Jingfeng 2023-06-15  271  }
f39db26c54281d Sui Jingfeng 2023-06-15  272  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ