From patchwork Fri Sep 28 21:36:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11867 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 73A5023E42 for ; Fri, 28 Sep 2012 21:36:37 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 13CDCA18585 for ; Fri, 28 Sep 2012 21:36:36 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so8011610iej.11 for ; Fri, 28 Sep 2012 14:36:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=1FiBwWyIJF/X6aaQq9YHkM8o9Ii/6voStly81KMUz9Q=; b=KriXp458mJw6qALGAfUnfTFr8zO6FEf17SqUlsBLe6/BLk44bhUnzcGQf/bpXRPqjl LDSQjZ+wqw0NuErBjzIsT2fAYot9mwkv8QOK9WHP+LY3xU+4bd3YsHQHHq1RStSFzBcx cdy+J6O+IwB9fPL9V6eDlkBNAyQwD33xoqmtGa7OBAMhRpRmrxzAxEUhKqXi1KMgX2h6 CMbLS5QmVBMU+MkuX7yI+wBa5rt/0H2WZKpb0/E4904WoA51lKLtAovlw6C2Mbi+09xK XwwQ1CHey65OObczafe43gj7l3CUz5Buezv9Od1/ZQ6BWF1MqUcD2KAQfnUBfbGTzNK1 d4Zw== Received: by 10.50.160.165 with SMTP id xl5mr71472igb.0.1348868196512; Fri, 28 Sep 2012 14:36:36 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp495015igc; Fri, 28 Sep 2012 14:36:35 -0700 (PDT) Received: by 10.216.203.17 with SMTP id e17mr4117090weo.13.1348868195245; Fri, 28 Sep 2012 14:36:35 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.171]) by mx.google.com with ESMTPS id s63si9349018weo.10.2012.09.28.14.36.34 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Sep 2012 14:36:34 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.171 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.171; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.171 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0M1QSH-1Tbz8n0r85-00tpK6; Fri, 28 Sep 2012 23:36:20 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, arm@kernel.org, Arnd Bergmann , Jingoo Han , Florian Tobias Schandinat Subject: [PATCH 04/12] video: exynos: warnings in exynos_dp_core.c Date: Fri, 28 Sep 2012 23:36:09 +0200 Message-Id: <1348868177-21205-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1348868177-21205-1-git-send-email-arnd@arndb.de> References: <1348868177-21205-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:MT4x+27R6KkRRROhu3FFpGKrgwf3rtalsumOCvB0XZs aswBExNttxnA1Hcr+oV1jNSbsAne8zhYIOO/om4ICbe+Iir8bS LrFgUVP9bbx3QcvVsth2UXgpmTorNT3LJicBgMHiOrgkhN5BnW oOBukqKPFZUT+2SsByjKVY4LbwxViewyuCQ3R8qetjrLScPz9I NFD0zmqxkImK8kwbrKjyd2S8T0sRm+hiwhGwi1Bo/isXeyryWJ 7IRL7dPVQUxKuyFEbD3JcZ9wVaETOX3WoaxhmvfQwWwMicHOkA WmlfAugDCSt+VAsSgzeLi9bzWEy7ASY+Lqa14nB8ELqNvPvvGd azM5L5S2uE70qvBkD3t4XUTeRd2uTfy5TARQuSy1KSZ5eVQ3qa 3otOPIVeNvXOg== X-Gm-Message-State: ALoCoQmCGky/3xJYPWwFCMDK/5PBFjRxO6BbMcCcRkM9Co8ox7I3oA52O1dT5F8TK/3GSHhOrvXM Something is wrong with the exynos_dp_core logic, and gcc emits a warning about this. An array is declared in exynos_dp_process_equalizer_training with length '2', and exynos_dp_channel_eq_ok tries to access the third element of it. This patch is certainly not correct, but hopefully helps highlight the actual problem. The problem apparently was introduced by d5c0eed01 "video: exynos_dp: adjust voltage swing and pre-emphasis during Link Training". This is what we get in exynos_defconfig: drivers/video/exynos/exynos_dp_core.c: In function 'exynos_dp_process_equalizer_training': drivers/video/exynos/exynos_dp_core.c:341:13: warning: array subscript is above array bounds [-Warray-bounds] Signed-off-by: Arnd Bergmann Cc: Jingoo Han Cc: Florian Tobias Schandinat --- drivers/video/exynos/exynos_dp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index cdc1398..358b595 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c @@ -542,7 +542,7 @@ reduce_link_rate: static int exynos_dp_process_equalizer_training(struct exynos_dp_device *dp) { - u8 link_status[2]; + u8 link_status[3]; u8 link_align[3]; int lane; int lane_count;