Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Damian Hobson-Garcia <dhobsong@igel.co.jp>
To: linux-fbdev@vger.kernel.org
Subject: [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result variable
Date: Thu, 26 May 2011 06:53:10 +0000	[thread overview]
Message-ID: <1306392790-17462-1-git-send-email-dhobsong@igel.co.jp> (raw)

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;
-- 
1.7.1


             reply	other threads:[~2011-05-26  6:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26  6:53 Damian Hobson-Garcia [this message]
2011-05-26  9:32 ` [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result variable Laurent Pinchart
2011-05-26  9:36 ` [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result Damian Hobson-Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306392790-17462-1-git-send-email-dhobsong@igel.co.jp \
    --to=dhobsong@igel.co.jp \
    --cc=linux-fbdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox