From patchwork Thu May 26 06:53:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damian Hobson-Garcia X-Patchwork-Id: 819792 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4Q6oh1Y001219 for ; Thu, 26 May 2011 06:50:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751366Ab1EZGun (ORCPT ); Thu, 26 May 2011 02:50:43 -0400 Received: from mail-px0-f173.google.com ([209.85.212.173]:62569 "EHLO mail-px0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753Ab1EZGum (ORCPT ); Thu, 26 May 2011 02:50:42 -0400 Received: by pxi16 with SMTP id 16so248478pxi.4 for ; Wed, 25 May 2011 23:50:42 -0700 (PDT) Received: by 10.68.62.39 with SMTP id v7mr169552pbr.341.1306392642281; Wed, 25 May 2011 23:50:42 -0700 (PDT) Received: from localhost.localdomain (mailhost.igel.co.jp [219.106.231.130]) by mx.google.com with ESMTPS id y3sm792765pbg.32.2011.05.25.23.50.40 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2011 23:50:41 -0700 (PDT) From: Damian Hobson-Garcia To: linux-sh@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: lethal@linux-sh.org, magnus.damm@gmail.com, taki@igel.co.jp, matsu@igel.co.jp, Damian Hobson-Garcia Subject: [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result variable Date: Thu, 26 May 2011 15:53:10 +0900 Message-Id: <1306392790-17462-1-git-send-email-dhobsong@igel.co.jp> X-Mailer: git-send-email 1.7.1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 26 May 2011 06:50:44 +0000 (UTC) Commit 69843ba7f24950f8ef5dadacfbfbd08f53e3455b reduces the scope of the variable that was used to get the return value of ops->meram_register() in sh_mobile_lcdc_start. In order to avoid conflicts with that patch, the variable has been renamed and scoped within the local if-clause. --- drivers/video/sh_mobile_lcdcfb.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 404c03b..596b662 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -617,6 +617,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) unsigned long icb_addr_y, icb_addr_c; int icb_pitch; int pf; + int retval; cfg = ch->cfg.meram_cfg; mdev = priv->meram_dev; @@ -637,7 +638,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) pf = SH_MOBILE_MERAM_PF_RGB; } - ret = mdev->ops->meram_register(mdev, cfg, pitch, + retval = mdev->ops->meram_register(mdev, cfg, pitch, ch->info->var.yres, pf, base_addr_y, @@ -645,7 +646,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) &icb_addr_y, &icb_addr_c, &icb_pitch); - if (!ret) { + if (!retval) { /* set LDSA1R value */ base_addr_y = icb_addr_y; pitch = icb_pitch;