Skip to contentSkip to conversation

drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:311:49-70: opportunity for str_true_false(vpe -> collaborate_mode)

DISCUSSION kernel test robot 1 participant 1 message Mar 22, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw

BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Lang Yu <[email protected]>
CC: Alex Deucher <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   88d324e69ea9f3ae1c1905ea75d717c08bdb8e15
commit: f9070b0f2f9edb503b20b12782d4d601cafc6d5e drm/amdgpu/vpe: add VPE 6.1.1 support
date:   1 year ago

:::::: branch date: 15 hours ago
:::::: commit date: 1 year ago
config: loongarch-randconfig-r064-20250322 (https://download.01.org/0day-ci/archive/20250322/[email protected]/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0

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 <[email protected]>
| Reported-by: Julia Lawall <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

cocci warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:311:49-70: opportunity for str_true_false(vpe -> collaborate_mode)

vim +311 drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c

9d4346bdbc6484 Lang Yu    2022-05-23  290  
9d4346bdbc6484 Lang Yu    2022-05-23  291  static int vpe_early_init(void *handle)
9d4346bdbc6484 Lang Yu    2022-05-23  292  {
9d4346bdbc6484 Lang Yu    2022-05-23  293  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
9d4346bdbc6484 Lang Yu    2022-05-23  294  	struct amdgpu_vpe *vpe = &adev->vpe;
9d4346bdbc6484 Lang Yu    2022-05-23  295  
4e8303cf2c4dd2 Lijo Lazar 2023-09-11  296  	switch (amdgpu_ip_version(adev, VPE_HWIP, 0)) {
9d4346bdbc6484 Lang Yu    2022-05-23  297  	case IP_VERSION(6, 1, 0):
9d4346bdbc6484 Lang Yu    2022-05-23  298  		vpe_v6_1_set_funcs(vpe);
9d4346bdbc6484 Lang Yu    2022-05-23  299  		break;
f9070b0f2f9edb Lang Yu    2023-11-15  300  	case IP_VERSION(6, 1, 1):
f9070b0f2f9edb Lang Yu    2023-11-15  301  		vpe_v6_1_set_funcs(vpe);
f9070b0f2f9edb Lang Yu    2023-11-15  302  		vpe->collaborate_mode = true;
f9070b0f2f9edb Lang Yu    2023-11-15  303  		break;
9d4346bdbc6484 Lang Yu    2022-05-23  304  	default:
9d4346bdbc6484 Lang Yu    2022-05-23  305  		return -EINVAL;
9d4346bdbc6484 Lang Yu    2022-05-23  306  	}
9d4346bdbc6484 Lang Yu    2022-05-23  307  
9d4346bdbc6484 Lang Yu    2022-05-23  308  	vpe_set_ring_funcs(adev);
9d4346bdbc6484 Lang Yu    2022-05-23  309  	vpe_set_regs(vpe);
9d4346bdbc6484 Lang Yu    2022-05-23  310  
f9070b0f2f9edb Lang Yu    2023-11-15 @311  	dev_info(adev->dev, "VPE: collaborate mode %s", vpe->collaborate_mode ? "true" : "false");
f9070b0f2f9edb Lang Yu    2023-11-15  312  
9d4346bdbc6484 Lang Yu    2022-05-23  313  	return 0;
9d4346bdbc6484 Lang Yu    2022-05-23  314  }
9d4346bdbc6484 Lang Yu    2022-05-23  315  
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki