提交 a7aabcc8 编写于 作者: M Muhammad Falak R Wani 提交者: 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: NChristian König <christian.koenig@amd.com>
Reviewed-by: NEric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: NMuhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册