From patchwork Mon Apr 22 05:02:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 2470201 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 6EA3D3FD40 for ; Mon, 22 Apr 2013 06:39:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3A6BBE6131 for ; Sun, 21 Apr 2013 23:39:12 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 6945FE5D01 for ; Sun, 21 Apr 2013 22:03:04 -0700 (PDT) Received: by mail-wi0-f177.google.com with SMTP id hj19so3593663wib.10 for ; Sun, 21 Apr 2013 22:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=iqj7u89OA8Y6CF5NWINHmRUtEOT6hvjCeQ7zCHBZFgI=; b=q8Vwbeo46NZVjL6qzDGzsorzBE5Owyd6Nw5UDNhNiizbL9a2H5tiiG1Wuv/7721qHw N7EUBPXtFis1oXuO5r9f0IODL9v1BOOgv9wrfyBP3Oau6fqLQdfSVYesmHXkNf2EtzmL hjnxaFqQlpor0tacy+ChnUX+P/eIk2XyUqmH0CUb2RBtmIy7xpmVghnwRoEw+a8I5E/H 75G3pATCVM9NeY0aymk0BOBVhgFYyZBPW06zYLbv5W4R5gPEsTd12eFcbMCEJ4UPW4Em 1e+14E0jxBT6zf8ufxjLESA7hWYmPI85qezBdJ+d/FIBat6sx37kSi7dlo46OgCV7HcV zgxg== X-Received: by 10.194.103.72 with SMTP id fu8mr48267739wjb.42.1366606983234; Sun, 21 Apr 2013 22:03:03 -0700 (PDT) Received: from linux-samsung700g7a.poz.roche.com (gw.bas.roche.com. [196.3.50.254]) by mx.google.com with ESMTPS id j43sm3558497eep.4.2013.04.21.22.03.01 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Apr 2013 22:03:02 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: dri-devel@lists.freedesktop.org, Alex Deucher Subject: [PATCH] drm: drm_edid_to_sad: fix declaration warning Date: Mon, 22 Apr 2013 07:02:57 +0200 Message-Id: <1366606977-22812-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org CC [M] drivers/gpu/drm/drm_edid.o drivers/gpu/drm/drm_edid.c: In function ‘drm_edid_to_sad’: drivers/gpu/drm/drm_edid.c:2549:4: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Reported-by: Dieter Nützel Signed-off-by: Rafa? Mi?ecki --- drivers/gpu/drm/drm_edid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 89ae211..5d3c902 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -2545,9 +2545,10 @@ int drm_edid_to_sad(struct edid *edid, struct cea_sad **sads) u8 *db = &cea[i]; if (cea_db_tag(db) == AUDIO_BLOCK) { - dbl = cea_db_payload_len(db); int j; + dbl = cea_db_payload_len(db); + count = dbl / 3; /* SAD is 3B */ *sads = kcalloc(count, sizeof(**sads), GFP_KERNEL); if (!*sads)