diff options
author | zhengbin <zhengbin13@huawei.com> | 2019-11-22 11:42:52 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-11-22 14:27:11 -0500 |
commit | e9c5dbc1a287735078b8dd3a0028458d9c09b158 (patch) | |
tree | d29500dd5c260f9c69d45567f055201b5945e686 /drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | |
parent | 19efcb9e0684668437c5b2a80b643c7a4dfadca8 (diff) | |
download | lwn-e9c5dbc1a287735078b8dd3a0028458d9c09b158.tar.gz lwn-e9c5dbc1a287735078b8dd3a0028458d9c09b158.zip |
drm/amdgpu: Use ARRAY_SIZE for sos_old_versions
Fixes coccicheck warning:
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c:182:40-41: WARNING: Use ARRAY_SIZE
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/psp_v3_1.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c index b4d6427aaa79..735c43c7daab 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c +++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c @@ -179,7 +179,7 @@ static bool psp_v3_1_match_version(struct amdgpu_device *adev, uint32_t ver) * Double check if the latest four legacy versions. * If yes, it is still the right version. */ - for (i = 0; i < sizeof(sos_old_versions) / sizeof(uint32_t); i++) { + for (i = 0; i < ARRAY_SIZE(sos_old_versions); i++) { if (sos_old_versions[i] == adev->psp.sos_fw_version) return true; } |