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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Remove unused NUM_ELEMENTS macros

Removes unused NUM_ELEMENTS macros. Discovered while removing cases
where ARRAY_SIZE from the header <linus/array_size.h> can be used.
This also aligns with the array_size.cocci coccinelle check.

Suggested-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Linus Probert <linus.probert@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Linus Probert and committed by
Alex Deucher
a097dd70 2d236617

-12
-3
drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
··· 49 49 #define FN(reg_name, field_name) \ 50 50 dpp->tf_shift->field_name, dpp->tf_mask->field_name 51 51 52 - #define NUM_ELEMENTS(a) (sizeof(a) / sizeof((a)[0])) 53 - 54 - 55 52 enum dcn10_coef_filter_type_sel { 56 53 SCL_COEF_LUMA_VERT_FILTER = 0, 57 54 SCL_COEF_LUMA_HORZ_FILTER = 1,
-3
drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c
··· 49 49 #define FN(reg_name, field_name) \ 50 50 dpp->tf_shift->field_name, dpp->tf_mask->field_name 51 51 52 - #define NUM_ELEMENTS(a) (sizeof(a) / sizeof((a)[0])) 53 - 54 - 55 52 enum dcn401_coef_filter_type_sel { 56 53 SCL_COEF_LUMA_VERT_FILTER = 0, 57 54 SCL_COEF_LUMA_HORZ_FILTER = 1,
-2
drivers/gpu/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.c
··· 43 43 #define FN(reg_name, field_name) \ 44 44 mpc20->mpc_shift->field_name, mpc20->mpc_mask->field_name 45 45 46 - #define NUM_ELEMENTS(a) (sizeof(a) / sizeof((a)[0])) 47 - 48 46 void mpc2_update_blending( 49 47 struct mpc *mpc, 50 48 struct mpcc_blnd_cfg *blnd_cfg,
-4
drivers/gpu/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
··· 40 40 #define FN(reg_name, field_name) \ 41 41 mpc30->mpc_shift->field_name, mpc30->mpc_mask->field_name 42 42 43 - 44 - #define NUM_ELEMENTS(a) (sizeof(a) / sizeof((a)[0])) 45 - 46 - 47 43 void mpc3_mpc_init(struct mpc *mpc) 48 44 { 49 45 struct dcn30_mpc *mpc30 = TO_DCN30_MPC(mpc);