On Mon, Oct 16, 2017 at 09:48:21PM -0400, Frank A. Cancio Bello wrote:
> Remove unnecessary parentheses to comply with preferred coding style for
> the linux kernel and avoid the following checkpatch's message:
> 'CHECK: Unnecessary parentheses around'
> 
> Credits to checkpatch.
> 
> Signed-off-by: Frank A. Cancio Bello <fr...@generalsoftwareinc.com>
> ---
> Changes in v2:
>       * I rewrote the log message to improve the style taking in 
> consideration Julia's suggestions.
>       * I merged in this patch similars changes that initially were in theirs 
> own patch. I will reply that other patch email thread, saying to discard it, 
> to avoid confussion.
> 
>  drivers/staging/wlan-ng/cfg80211.c     | 10 +++++-----
>  drivers/staging/wlan-ng/hfa384x_usb.c  | 18 +++++++++---------
>  drivers/staging/wlan-ng/p80211conv.c   |  6 +++---
>  drivers/staging/wlan-ng/p80211netdev.c |  4 ++--
>  drivers/staging/wlan-ng/p80211req.c    |  2 +-
>  drivers/staging/wlan-ng/prism2fw.c     | 23 +++++++++++------------
>  drivers/staging/wlan-ng/prism2mgmt.c   | 29 ++++++++++++++---------------
>  drivers/staging/wlan-ng/prism2sta.c    |  4 ++--
>  8 files changed, 47 insertions(+), 49 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/cfg80211.c 
> b/drivers/staging/wlan-ng/cfg80211.c
> index 178f6f5..03279aa 100644
> --- a/drivers/staging/wlan-ng/cfg80211.c
> +++ b/drivers/staging/wlan-ng/cfg80211.c
> @@ -265,7 +265,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct 
> net_device *dev,
>  
>       memset(sinfo, 0, sizeof(*sinfo));
>  
> -     if (!wlandev || (wlandev->msdstate != WLAN_MSD_RUNNING))
> +     if (!wlandev || wlandev->msdstate != WLAN_MSD_RUNNING)

That's not "unnecessary" as now I need to go look up or try to remember
the order of operations for != and || :(

Please don't make things such that it is harder to read for a
programmer.

thanks,

greg k-h
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to