]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: Replace inline NUM_ELEMENTS macro with ARRAY_SIZE
authorLinus Probert <linus.probert@gmail.com>
Fri, 3 Apr 2026 08:22:06 +0000 (10:22 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 3 Apr 2026 18:04:43 +0000 (14:04 -0400)
commit2d23661764450fc37208c2888c91fa320e830d63
treec40654bfe8df268d06d92c58c2f87389213cf76d
parenteea85914d15bfe3bdf9f8f80a479f0dee0aa7d73
drm/amd/display: Replace inline NUM_ELEMENTS macro with ARRAY_SIZE

Replaces the use of local NUM_ELEMENTS macro with the ARRAY_SIZE macro
defined in <linux/array_size.h>.

This aligns with existing coccinelle script array_size.cocci which has
been applied to other sources in order to remove inline
sizeof(a)/sizeof(a[0]) patterns from other source files.

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>
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c