Skip to content

Commit 0280917

Browse files
jimcairlied
authored andcommitted
drm: replace open-coded ARRAY_SIZE with macro
[airlied: fixed one more new one added since] Signed-off-by: Jim Cromie <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent fc48f16 commit 0280917

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/gpu/drm/drm_edid_modes.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ static const struct minimode est3_modes[] = {
471471
{ 1920, 1440, 60, 0 },
472472
{ 1920, 1440, 75, 0 },
473473
};
474-
static const int num_est3_modes = sizeof(est3_modes) / sizeof(est3_modes[0]);
474+
static const int num_est3_modes = ARRAY_SIZE(est3_modes);
475475

476476
static const struct minimode extra_modes[] = {
477477
{ 1024, 576, 60, 0 },
@@ -482,7 +482,7 @@ static const struct minimode extra_modes[] = {
482482
{ 2048, 1152, 60, 0 },
483483
{ 2048, 1536, 60, 0 },
484484
};
485-
static const int num_extra_modes = sizeof(extra_modes) / sizeof(extra_modes[0]);
485+
static const int num_extra_modes = ARRAY_SIZE(extra_modes);
486486

487487
/*
488488
* Probably taken from CEA-861 spec.
@@ -771,5 +771,4 @@ static const struct drm_display_mode edid_cea_modes[] = {
771771
2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
772772
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
773773
};
774-
static const int drm_num_cea_modes =
775-
sizeof (edid_cea_modes) / sizeof (edid_cea_modes[0]);
774+
static const int drm_num_cea_modes = ARRAY_SIZE(edid_cea_modes);

0 commit comments

Comments
 (0)