From patchwork Mon Aug 10 09:55:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 6981341 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A64679F373 for ; Mon, 10 Aug 2015 09:55:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 775B52068E for ; Mon, 10 Aug 2015 09:55:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7C4AA205B1 for ; Mon, 10 Aug 2015 09:55:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D24936E36C; Mon, 10 Aug 2015 02:55:49 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2934F6E372 for ; Mon, 10 Aug 2015 02:55:48 -0700 (PDT) Received: by wicja10 with SMTP id ja10so30362571wic.1 for ; Mon, 10 Aug 2015 02:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id; bh=JIFFeCY6ALZqjulGgROIGdxPnYLYG0EkOji3txK0qTw=; b=ZpsWwXlRpfzbe0XgAAZrPCka1azn+pjrIUcH0ftphJNaPsfW6qKK5K0XkjJ9o4cuqz QGC+AY8Cp9kUnQMVNzBua+VjykAG/plMsAsIq3plikyDBhVL8TuBuv7t7OmbrKuM8An1 72DYd6RJNgvZuN87/pnbWO/7Pf9m0jTqlsDnY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JIFFeCY6ALZqjulGgROIGdxPnYLYG0EkOji3txK0qTw=; b=EIj7L5kkffv6EdPfYXn/2LUtbHmG8aDu6xNdcmu/6Mq0HkwitCpl5jQoZk4UaV5lWt xN7hhHW/bhuMUPhOpkjjtzUr7ljO1yWxWicC4157/FKtM0FjZNYh07xosv/xDnn7evpc BqEFfhRRz/rFcj9qu5ySuznknnZrfGi1rfqTxm06/vvAdEB/UJbnSlp8a3cvxrCU3ASa iSgX86okXeEE8JuFYRvoCfJ3CnobIjyhyP+R9HxISuU1B+J7OwxwrAb6KIwJRr5CB6km Pf3J2cL+61CYFLf7JGho+olgbtDWR8BZaWg98TEzB3QUBzshYcgB8voYFUbw3ulLZLDM YYWg== X-Gm-Message-State: ALoCoQmTIGfZJRdw0piroWa5OGxCH6vzrv0ElS4p+wIJRlGOi4hGCA7hwP0D6uKhzseM3ERq5yI+ X-Received: by 10.180.37.33 with SMTP id v1mr23490032wij.88.1439200546587; Mon, 10 Aug 2015 02:55:46 -0700 (PDT) Received: from phenom.ffwll.local (212-51-149-109.fiber7.init7.net. [212.51.149.109]) by smtp.gmail.com with ESMTPSA id v9sm28564514wjq.41.2015.08.10.02.55.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Aug 2015 02:55:46 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Mon, 10 Aug 2015 11:55:37 +0200 Message-Id: <1439200538-25233-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.5.0 Cc: Daniel Vetter , Intel Graphics Development , Daniel Vetter Subject: [Intel-gfx] [PATCH 1/2] drm/edid: Use ARRAY_SIZE in drm_add_modes_noedid X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Spotted while reading code for random reasons. Signed-off-by: Daniel Vetter Reviewed-by: Thierry Reding --- 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)