Re: [PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-30 Thread Chen Gang
On 2016年05月30日 22:33, Joe Perches wrote: > On Mon, 2016-05-30 at 22:21 +0800, Chen Gang wrote: >> No, they are not necessary. But for me, it will be more clearer, since >> in our kernel (at least in include/linux/), almost all Boolean functions >> use Boolean value or expression for return (and

Re: [PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-30 Thread Chen Gang
On 2016年05月30日 22:33, Joe Perches wrote: > On Mon, 2016-05-30 at 22:21 +0800, Chen Gang wrote: >> No, they are not necessary. But for me, it will be more clearer, since >> in our kernel (at least in include/linux/), almost all Boolean functions >> use Boolean value or expression for return (and

Re: [PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-30 Thread Chen Gang
On 5/30/16 22:33, Joe Perches wrote: > On Mon, 2016-05-30 at 22:21 +0800, Chen Gang wrote: >> On 5/29/16 23:08, Joe Perches wrote: >>> These !! uses are't necessary. >>> The compiler makes the bool return 0 or 1. >> No, they are not necessary. But for me, it will be more clearer, since >> in our

Re: [PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-30 Thread Chen Gang
On 5/30/16 22:33, Joe Perches wrote: > On Mon, 2016-05-30 at 22:21 +0800, Chen Gang wrote: >> On 5/29/16 23:08, Joe Perches wrote: >>> These !! uses are't necessary. >>> The compiler makes the bool return 0 or 1. >> No, they are not necessary. But for me, it will be more clearer, since >> in our

Re: [PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-30 Thread Joe Perches
On Mon, 2016-05-30 at 22:21 +0800, Chen Gang wrote: > On 5/29/16 23:08, Joe Perches wrote: > > On Sun, 2016-05-29 at 22:36 +0800, cheng...@emindsoft.com.cn wrote: > > > Use "!!" to let the boolean function return boolean value directly. > > [] > > > diff --git a/include/linux/memblock.h

Re: [PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-30 Thread Joe Perches
On Mon, 2016-05-30 at 22:21 +0800, Chen Gang wrote: > On 5/29/16 23:08, Joe Perches wrote: > > On Sun, 2016-05-29 at 22:36 +0800, cheng...@emindsoft.com.cn wrote: > > > Use "!!" to let the boolean function return boolean value directly. > > [] > > > diff --git a/include/linux/memblock.h

Re: [PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-30 Thread Chen Gang
On 5/29/16 23:08, Joe Perches wrote: > On Sun, 2016-05-29 at 22:36 +0800, cheng...@emindsoft.com.cn wrote: >> >> Use "!!" to let the boolean function return boolean value directly. > [] >> diff --git a/include/linux/memblock.h b/include/linux/memblock.h > [] >> @@ -191,12 +190,12 @@ static inline

Re: [PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-30 Thread Chen Gang
On 5/29/16 23:08, Joe Perches wrote: > On Sun, 2016-05-29 at 22:36 +0800, cheng...@emindsoft.com.cn wrote: >> >> Use "!!" to let the boolean function return boolean value directly. > [] >> diff --git a/include/linux/memblock.h b/include/linux/memblock.h > [] >> @@ -191,12 +190,12 @@ static inline

Re: [PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-29 Thread Joe Perches
On Sun, 2016-05-29 at 22:36 +0800, cheng...@emindsoft.com.cn wrote: > From: Chen Gang > > Correct the function parameters alignment, since original code already > use both tabs and white spaces together for the incorrect parameters > alignment functions. > > If one

Re: [PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-29 Thread Joe Perches
On Sun, 2016-05-29 at 22:36 +0800, cheng...@emindsoft.com.cn wrote: > From: Chen Gang > > Correct the function parameters alignment, since original code already > use both tabs and white spaces together for the incorrect parameters > alignment functions. > > If one line can hold one statement

[PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-29 Thread chengang
From: Chen Gang Correct the function parameters alignment, since original code already use both tabs and white spaces together for the incorrect parameters alignment functions. If one line can hold one statement within 80 columns, let it in one line (original code did

[PATCH trivial] include/linux/memblock.h: Clean up code for several trivial details

2016-05-29 Thread chengang
From: Chen Gang Correct the function parameters alignment, since original code already use both tabs and white spaces together for the incorrect parameters alignment functions. If one line can hold one statement within 80 columns, let it in one line (original code did not consider about the