• kbuild test robot's avatar
    drm/amd/powerplay: fix array_size.cocci warnings · c651fd7c
    kbuild test robot authored
    drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:75:42-43: WARNING: Use ARRAY_SIZE
    drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:466:22-23: WARNING: Use ARRAY_SIZE
    drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:468:22-23: WARNING: Use ARRAY_SIZE
    drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:470:20-21: WARNING: Use ARRAY_SIZE
    drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:473:22-23: WARNING: Use ARRAY_SIZE
    drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:475:21-22: WARNING: Use ARRAY_SIZE
    drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/rv_hwmgr.c:477:21-22: WARNING: Use ARRAY_SIZE
    
     Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
    
    Semantic patch information:
     This makes an effort to find cases where ARRAY_SIZE can be used such as
     where there is a division of sizeof the array by the sizeof its first
     element or by any indexed element or the element type. It replaces the
     division of the two sizeofs by ARRAY_SIZE.
    
    Generated by: scripts/coccinelle/misc/array_size.cocci
    
    CC: Rex Zhu <Rex.Zhu@amd.com>
    Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    c651fd7c
rv_hwmgr.c 26.7 KB