Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-07 Thread Masahiro Yamada
Hi Stefano, 2016-09-06 18:25 GMT+09:00 Stefano Babic : > > Nothing against, but it looks to me just a different and allowed coding > style - where is the advantages of this ? > This had already been superseded. Please check v3, where I mostly transformed simple wrapper functions

Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-07 Thread Masahiro Yamada
Hi Stephen, 2016-09-07 1:09 GMT+09:00 Stephen Warren : >>> All child function calls are structured the same, so someone reading the >>> code will always see the same structure irrespective of where in a >>> function >>> a child function is called. This gives uniformity.

Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-06 Thread Stephen Warren
On 09/03/2016 05:38 PM, Masahiro Yamada wrote: 2016-09-03 2:15 GMT+09:00 Stephen Warren : On 09/02/2016 04:36 AM, Masahiro Yamada wrote: -ret = expression; -if (ret) -return ret; -return 0; +return expression; I disagree with this change if applied

Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-06 Thread Stefano Babic
Hi Masahiro, On 02/09/2016 12:36, Masahiro Yamada wrote: > -ret = expression; > -if (ret) > -return ret; > -return 0; > +return expression; > > Signed-off-by: Masahiro Yamada > --- > > arch/arm/cpu/armv7/bcm235xx/clk-bsc.c | 6 +-

Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-05 Thread Heiko Schocher
Hello Masahiro, Am 02.09.2016 um 12:36 schrieb Masahiro Yamada: -ret = expression; -if (ret) -return ret; -return 0; +return expression; Signed-off-by: Masahiro Yamada --- [...] fs/ubifs/budget.c | 7

Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-04 Thread Marek Vasut
On 09/04/2016 01:38 AM, Masahiro Yamada wrote: > 2016-09-02 23:12 GMT+09:00 Marek Vasut : >> On 09/02/2016 03:09 PM, Masahiro Yamada wrote: >>> 2016-09-02 20:58 GMT+09:00 Marek Vasut : On 09/02/2016 12:36 PM, Masahiro Yamada wrote: > -ret = expression;

Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-03 Thread Masahiro Yamada
2016-09-03 2:15 GMT+09:00 Stephen Warren : > On 09/02/2016 04:36 AM, Masahiro Yamada wrote: >> >> -ret = expression; >> -if (ret) >> -return ret; >> -return 0; >> +return expression; > > > I disagree with this change if applied blindly; I think both coding

Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-03 Thread Masahiro Yamada
2016-09-02 23:12 GMT+09:00 Marek Vasut : > On 09/02/2016 03:09 PM, Masahiro Yamada wrote: >> 2016-09-02 20:58 GMT+09:00 Marek Vasut : >>> On 09/02/2016 12:36 PM, Masahiro Yamada wrote: -ret = expression; -if (ret) -return ret;

Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-03 Thread Stephen Warren
On 09/02/2016 04:36 AM, Masahiro Yamada wrote: -ret = expression; -if (ret) -return ret; -return 0; +return expression; I disagree with this change if applied blindly; I think both coding styles have their merit depending on the semantic context. In the case of a simple

Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-03 Thread Masahiro Yamada
2016-09-02 20:58 GMT+09:00 Marek Vasut : > On 09/02/2016 12:36 PM, Masahiro Yamada wrote: >> -ret = expression; >> -if (ret) >> -return ret; >> -return 0; >> +return expression; >> >> Signed-off-by: Masahiro Yamada >> --- > > The

Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-03 Thread Marek Vasut
On 09/02/2016 03:09 PM, Masahiro Yamada wrote: > 2016-09-02 20:58 GMT+09:00 Marek Vasut : >> On 09/02/2016 12:36 PM, Masahiro Yamada wrote: >>> -ret = expression; >>> -if (ret) >>> -return ret; >>> -return 0; >>> +return expression; >>> >>> Signed-off-by: Masahiro

[U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-02 Thread Masahiro Yamada
-ret = expression; -if (ret) -return ret; -return 0; +return expression; Signed-off-by: Masahiro Yamada --- arch/arm/cpu/armv7/bcm235xx/clk-bsc.c | 6 +- arch/arm/cpu/armv7/bcm281xx/clk-bsc.c | 6 +-

Re: [U-Boot] [PATCH] treewide: compress lines for immediate return

2016-09-02 Thread Marek Vasut
On 09/02/2016 12:36 PM, Masahiro Yamada wrote: > -ret = expression; > -if (ret) > -return ret; > -return 0; > +return expression; > > Signed-off-by: Masahiro Yamada > --- The thing I miss in the commit message is -- why is this change