Commit a7aabcc8 authored by Muhammad Falak R Wani's avatar Muhammad Falak R Wani Committed by Alex Deucher

drm/amd/powerplay: use ARRAY_SIZE() to calculate array size.

It is preferred to use ARRAY_SIZE() for size calculation, instead
using sizeof(array)/sizeof(*array). It makes the code more readable.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarEric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: default avatarMuhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 484f689f
......@@ -639,7 +639,7 @@ static int cz_smu_populate_firmware_entries(struct pp_smumgr *smumgr)
cz_smu->driver_buffer_length = 0;
for (i = 0; i < sizeof(firmware_list)/sizeof(*firmware_list); i++) {
for (i = 0; i < ARRAY_SIZE(firmware_list); i++) {
firmware_type = cz_translate_firmware_enum_to_arg(smumgr,
firmware_list[i]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment