drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:1394:32-44: opportunity for str_enabled_disabled(ptl -> enabled)
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: f5bbbfec59b4e2fb7520a91de3df8a6174325d6a commit: d51a0439358d4eacd8beb39df619998d8340d232 drm/amdgpu: add sysfs for Peak Tops Limiter (PTL) date: 3 months ago config: s390-randconfig-r062-20260812 (https://download.01.org/0day-ci/archive/20260813/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 12df34b8469b8095359de8c249cb1b2753fadeea) 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 | Fixes: d51a0439358d ("drm/amdgpu: add sysfs for Peak Tops Limiter (PTL)") | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ cocci warnings: (new ones prefixed by >>) >> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:1394:32-44: opportunity for str_enabled_disabled(ptl -> enabled) vim +1394 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c 1387 1388 static ssize_t ptl_enable_show(struct device *dev, struct device_attribute *attr, char *buf) 1389 { 1390 struct drm_device *ddev = dev_get_drvdata(dev); 1391 struct amdgpu_device *adev = drm_to_adev(ddev); 1392 struct amdgpu_ptl *ptl = &adev->psp.ptl; 1393 > 1394 return sysfs_emit(buf, "%s\n", ptl->enabled ? "enabled" : "disabled"); 1395 } 1396 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki