* [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result variable
@ 2011-05-26 6:53 Damian Hobson-Garcia
2011-05-26 9:32 ` Laurent Pinchart
2011-05-26 9:36 ` [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result Damian Hobson-Garcia
0 siblings, 2 replies; 3+ messages in thread
From: Damian Hobson-Garcia @ 2011-05-26 6:53 UTC (permalink / raw)
To: linux-fbdev
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result variable
2011-05-26 6:53 [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result variable Damian Hobson-Garcia
@ 2011-05-26 9:32 ` Laurent Pinchart
2011-05-26 9:36 ` [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result Damian Hobson-Garcia
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2011-05-26 9:32 UTC (permalink / raw)
To: linux-fbdev
Hi Damian,
On Thursday 26 May 2011 08:53:10 Damian Hobson-Garcia wrote:
> 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.
Is there a need for this patch after
http://git.kernel.org/?p=linux/kernel/git/lethal/fbdev-2.6.git;a=commitdiff;hÀ46a54e7e98577d3f04ce9d7ef1ec43a41c9061;hpw32eeb425419599de15096ce92d7eb6a51d749a
?
> ---
> 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;
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result
2011-05-26 6:53 [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result variable Damian Hobson-Garcia
2011-05-26 9:32 ` Laurent Pinchart
@ 2011-05-26 9:36 ` Damian Hobson-Garcia
1 sibling, 0 replies; 3+ messages in thread
From: Damian Hobson-Garcia @ 2011-05-26 9:36 UTC (permalink / raw)
To: linux-fbdev
Hi Laurent,
On 2011/05/26 18:32, Laurent Pinchart wrote:
> Hi Damian,
>
> On Thursday 26 May 2011 08:53:10 Damian Hobson-Garcia wrote:
>> 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.
>
> Is there a need for this patch after
> http://git.kernel.org/?p=linux/kernel/git/lethal/fbdev-2.6.git;a=commitdiff;hÀ46a54e7e98577d3f04ce9d7ef1ec43a41c9061;hpw32eeb425419599de15096ce92d7eb6a51d749a
> ?
Nope, with this patch there is no need for mine at all.
Thanks,
Damian
>
>> ---
>> 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;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-26 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 6:53 [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result variable Damian Hobson-Garcia
2011-05-26 9:32 ` Laurent Pinchart
2011-05-26 9:36 ` [PATCH] fbdev: sh_mobile_lcdcfb: Reduce scope and rename result Damian Hobson-Garcia
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.