Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/powerplay: rv: Use designated initializers

As done for vega10 in commit 3ddd396f6b57 ("drm/amd/powerplay: Use
designated initializers") mark other tableFunction entries with designated
initializers. The randstruct plugin requires designated initializers for
structures that are entirely function pointers.

Cc: Rex Zhu <Rex.Zhu@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Alex Deucher <alexander.deucher@amd.com>

+4 -4
+4 -4
drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
··· 308 308 } 309 309 310 310 static const struct phm_master_table_item rv_set_power_state_list[] = { 311 - { NULL, rv_tf_set_clock_limit }, 312 - { NULL, rv_tf_set_num_active_display }, 311 + { .tableFunction = rv_tf_set_clock_limit }, 312 + { .tableFunction = rv_tf_set_num_active_display }, 313 313 { } 314 314 }; 315 315 ··· 382 382 } 383 383 384 384 static const struct phm_master_table_item rv_disable_dpm_list[] = { 385 - {NULL, rv_tf_disable_gfx_off}, 385 + { .tableFunction = rv_tf_disable_gfx_off }, 386 386 { }, 387 387 }; 388 388 ··· 407 407 } 408 408 409 409 static const struct phm_master_table_item rv_enable_dpm_list[] = { 410 - {NULL, rv_tf_enable_gfx_off}, 410 + { .tableFunction = rv_tf_enable_gfx_off }, 411 411 { }, 412 412 }; 413 413