Re: [PATCH] fbdev: sh_mobile_lcdc: reduce scope of a variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Magnus

Thank you !!

> Hi Morimoto-san,
> 
> This is already fixed in linux-2.6 git by:
> 
> commit 554cc1028603587e28ae49e9594b1508df5f29aa
> Author: Paul Mundt <lethal@xxxxxxxxxxxx>
> Date:   Thu May 26 15:01:22 2011 +0900
> 
>     fbdev: sh_mobile_lcdcfb: Fix up fallout from MERAM changes.
> 
> / magnus
> 
> On Thu, Jun 9, 2011 at 1:28 PM, Kuninori Morimoto
> <kuninori.morimoto.gx@xxxxxxxxxxx> wrote:
> >
> > Dear Paul, Guennadi
> >
> > I cannot compile on current paul/master.
> > below patch seems breaks compile.
> > "ret" is still needed.
> >
> > Can you revert it or apply attached patch ?
> >
> > At Thu, 05 May 2011 18:32:36 +0200 (CEST),
> > Guennadi wrote:
> >>
> >> The "ret" variable in sh_mobile_lcdc_start() is only used at one
> >> location, move its definition to the inner-most scope.
> >>
> >> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
> >> ---
> >> Âdrivers/video/sh_mobile_lcdcfb.c | Â 12 ++++++------
> >> Â1 files changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
> >> index 9bcc61b..466834c 100644
> >> --- a/drivers/video/sh_mobile_lcdcfb.c
> >> +++ b/drivers/video/sh_mobile_lcdcfb.c
> >> @@ -469,7 +469,6 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
> >> Â Â Â int bpp = 0;
> >> Â Â Â unsigned long ldddsr;
> >> Â Â Â int k, m;
> >> - Â Â int ret = 0;
> >>
> >> Â Â Â /* enable clocks before accessing the hardware */
> >> Â Â Â for (k = 0; k < ARRAY_SIZE(priv->ch); k++) {
> >> @@ -538,11 +537,12 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
> >> Â Â Â Â Â Â Â lcdc_write_chan(ch, LDPMR, 0);
> >>
> >> Â Â Â Â Â Â Â board_cfg = &ch->cfg.board_cfg;
> >> - Â Â Â Â Â Â if (board_cfg->setup_sys)
> >> - Â Â Â Â Â Â Â Â Â Â ret = board_cfg->setup_sys(board_cfg->board_data, ch,
> >> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â&sh_mobile_lcdc_sys_bus_ops);
> >> - Â Â Â Â Â Â if (ret)
> >> - Â Â Â Â Â Â Â Â Â Â return ret;
> >> + Â Â Â Â Â Â if (board_cfg->setup_sys) {
> >> + Â Â Â Â Â Â Â Â Â Â int ret = board_cfg->setup_sys(board_cfg->board_data,
> >> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ch, &sh_mobile_lcdc_sys_bus_ops);
> >> + Â Â Â Â Â Â Â Â Â Â if (ret)
> >> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â return ret;
> >> + Â Â Â Â Â Â }
> >> Â Â Â }
> >>
> >> Â Â Â /* word and long word swap */
> >> --
> >> 1.7.2.5
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> >> the body of a message to majordomo@xxxxxxxxxxxxxxx
> >> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
> >
> > ---
> > Âdrivers/video/sh_mobile_lcdcfb.c | Â Â1 +
> > Â1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
> > index 404c03b..d0a03ef 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 ret;
> >
> > Â Â Â Â Â Â Â Â Â Â Â Âcfg = ch->cfg.meram_cfg;
> > Â Â Â Â Â Â Â Â Â Â Â Âmdev = priv->meram_dev;
> > --
> >
> >
> >
> > Best regards
> > --
> > Kuninori Morimoto
> >
> >

Best regards
--
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux