On Thu, 5 Feb 2009, Anatolij Gustschin wrote:

> Guennadi Liakhovetski wrote:
> 
> > diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
> > index b7bd84b..1341543 100644
> > --- a/drivers/spi/mxc_spi.c
> > +++ b/drivers/spi/mxc_spi.c
> <snip>
> > @@ -105,6 +112,10 @@ static u32 spi_xchg_single(struct spi_slave *slave, 
> > u32 data, int bitlen)
> >     while (reg_read(mxcs->base + MXC_CSPICTRL) & MXC_CSPICTRL_XCH)
> >             ;
> >  
> > +   if (mxcs->gpio > 0 && (flags & SPI_XFER_END))
> > +           mx31_gpio_set(mxcs->gpio,
> > +                         !(mxcs->ctrl_reg & MXC_CSPICTRL_SSPOL));
> 
> this is a multi-line if statement, I think the preferred coding style
> is as follows:
>       if (...) {
>               /*
>                * multi-line if statement
>                */
>               ...
>       }
> please fix, Thanks!

Sorry, cannot find this in CodingStyle. Can you point me out? What I do 
find there is this example in Chapter 2:

        if (condition)
                printk(KERN_WARNING "Warning this is a long printk with "
                                                "3 parameters a: %u b: %u "
                                                "c: %u \n", a, b, c);
        else
                next_statement;

which implicitly (it is given as an example of breaking lines, not 
parenthesising) states the contrary to your proposition.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to