public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/edid: Use ARRAY_SIZE in drm_add_modes_noedid
@ 2015-08-10  9:55 Daniel Vetter
  2015-08-10  9:55 ` [PATCH 2/2] drm/doc: Update docs about device instance setup Daniel Vetter
  2015-08-10 11:57 ` [PATCH 1/2] drm/edid: Use ARRAY_SIZE in drm_add_modes_noedid Thierry Reding
  0 siblings, 2 replies; 14+ messages in thread
From: Daniel Vetter @ 2015-08-10  9:55 UTC (permalink / raw)
  To: DRI Development; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

Spotted while reading code for random reasons.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_edid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 4a403eb90ded..4780b1924bef 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3810,7 +3810,7 @@ int drm_add_modes_noedid(struct drm_connector *connector,
 	struct drm_display_mode *mode;
 	struct drm_device *dev = connector->dev;
 
-	count = sizeof(drm_dmt_modes) / sizeof(struct drm_display_mode);
+	count = ARRAY_SIZE(drm_dmt_modes);
 	if (hdisplay < 0)
 		hdisplay = 0;
 	if (vdisplay < 0)
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-09-29 14:09 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-10  9:55 [PATCH 1/2] drm/edid: Use ARRAY_SIZE in drm_add_modes_noedid Daniel Vetter
2015-08-10  9:55 ` [PATCH 2/2] drm/doc: Update docs about device instance setup Daniel Vetter
2015-08-10 11:59   ` Thierry Reding
2015-08-10 12:07     ` Daniel Vetter
2015-08-10 12:34       ` Thierry Reding
2015-08-10 14:30         ` Daniel Vetter
2015-09-28 19:23           ` David Herrmann
2015-08-13 16:50   ` shuang.he
2015-09-28 15:31   ` Laurent Pinchart
2015-09-28 19:46   ` [PATCH] " Daniel Vetter
2015-09-29 13:28     ` Laurent Pinchart
2015-09-29 14:12       ` Daniel Vetter
2015-08-10 11:57 ` [PATCH 1/2] drm/edid: Use ARRAY_SIZE in drm_add_modes_noedid Thierry Reding
2015-08-10 12:08   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox