drm: replace open-coded ARRAY_SIZE with macro
Subsystems (2)
PATCH 1/11 drm: replace open-coded ARRAY_SIZE with macro
Signed-off-by Jim Cromie <[email protected]>
--- drivers/gpu/drm/drm_edid_modes.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_edid_modes.h +2 -2
@@ -377,7 +377,7 @@ static const struct { { 1920, 1440, 60, 0 }, { 1920, 1440, 75, 0 }, }; -static const int num_est3_modes =sizeof (est3_modes) /sizeof (est3_modes[0 ]); +static const int num_est3_modes =ARRAY_SIZE (est3_modes);/* * Probably taken from CEA-861 spec.
@@ -661,4 +661,4 @@ static const struct drm_display_mode edid_cea_modes[] = { DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, };static const int drm_num_cea_modes = -sizeof (edid_cea_modes) /sizeof (edid_cea_modes[0 ]); +ARRAY_SIZE (edid_cea_modes);
Signature · 1 line
1.7.8.1