Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 10:55 -0700, Joe Perches wrote: > On Wed, 2017-10-04 at 19:39 +0300, Luciano Coelho wrote: > > On Wed, 2017-10-04 at 09:26 -0700, Joe Perches wrote: > > [] > > > This might be more intelligble as separate tests > > > > > > static bool is_valid_channel(u16 ch_id) > > > { > >

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 10:55 -0700, Joe Perches wrote: > On Wed, 2017-10-04 at 19:39 +0300, Luciano Coelho wrote: > > On Wed, 2017-10-04 at 09:26 -0700, Joe Perches wrote: > > [] > > > This might be more intelligble as separate tests > > > > > > static bool is_valid_channel(u16 ch_id) > > > { > >

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Joe Perches
On Wed, 2017-10-04 at 19:39 +0300, Luciano Coelho wrote: > On Wed, 2017-10-04 at 09:26 -0700, Joe Perches wrote: [] > > This might be more intelligble as separate tests > > > > static bool is_valid_channel(u16 ch_id) > > { > > if (ch_id <= 14) > > return true; > > > > if

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Joe Perches
On Wed, 2017-10-04 at 19:39 +0300, Luciano Coelho wrote: > On Wed, 2017-10-04 at 09:26 -0700, Joe Perches wrote: [] > > This might be more intelligble as separate tests > > > > static bool is_valid_channel(u16 ch_id) > > { > > if (ch_id <= 14) > > return true; > > > > if

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 09:26 -0700, Joe Perches wrote: > On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > > Change a usage of int in a boolean context to use the bool type > > instead, as it > > makes the intent of the function clearer and helps clarify its > > semantics. > > > >

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 09:26 -0700, Joe Perches wrote: > On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > > Change a usage of int in a boolean context to use the bool type > > instead, as it > > makes the intent of the function clearer and helps clarify its > > semantics. > > > >

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Joe Perches
On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > Change a usage of int in a boolean context to use the bool type instead, as it > makes the intent of the function clearer and helps clarify its semantics. > > Also eliminate the if/else and just return the boolean result directly, >

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Joe Perches
On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > Change a usage of int in a boolean context to use the bool type instead, as it > makes the intent of the function clearer and helps clarify its semantics. > > Also eliminate the if/else and just return the boolean result directly, >

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > Change a usage of int in a boolean context to use the bool type > instead, as it > makes the intent of the function clearer and helps clarify its > semantics. > > Also eliminate the if/else and just return the boolean result >

Re: [PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Luciano Coelho
On Wed, 2017-10-04 at 17:56 +0200, Christoph Böhmwalder wrote: > Change a usage of int in a boolean context to use the bool type > instead, as it > makes the intent of the function clearer and helps clarify its > semantics. > > Also eliminate the if/else and just return the boolean result >

[PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Christoph Böhmwalder
Change a usage of int in a boolean context to use the bool type instead, as it makes the intent of the function clearer and helps clarify its semantics. Also eliminate the if/else and just return the boolean result directly, making the code more readable. Signed-off-by: Christoph Böhmwalder

[PATCH 1/3] wireless: iwlwifi: use bool instead of int

2017-10-04 Thread Christoph Böhmwalder
Change a usage of int in a boolean context to use the bool type instead, as it makes the intent of the function clearer and helps clarify its semantics. Also eliminate the if/else and just return the boolean result directly, making the code more readable. Signed-off-by: Christoph Böhmwalder ---