Re: [PATCH v3] staging: wlan-ng: Remove unnecessary parentheses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 19, 2017 at 08:40:08AM +1100, Tobin C. Harding wrote:
> On Wed, Oct 18, 2017 at 11:48:21AM -0400, Frank A. Cancio Bello wrote:
> > --- a/drivers/staging/wlan-ng/p80211req.c
> > +++ b/drivers/staging/wlan-ng/p80211req.c
> > @@ -124,7 +124,7 @@ int p80211req_dorequest(struct wlandevice *wlandev, u8 *msgbuf)
> >  
> >  	/* Check Permissions */
> >  	if (!capable(CAP_NET_ADMIN) &&
> > -	    (msg->msgcode != DIDmsg_dot11req_mibget)) {
> > +	    msg->msgcode != DIDmsg_dot11req_mibget) {
> 
> While this is not making the code _harder_ to read, it is not making it any easier either. So all
> the change is really doing is quieting checkpatch. Usually it is not a good idea to make code
> changes _just_ to quieten a static analysis tool. It's just a tool remember, there to help us write
> better code.
> 

For me is easy to read without parentheses given the fact that I tend to jump to the closing parentheses and then read from the opening parentheses up to the mental mark that I did at the closing parentheses. But that is me, and given the fact that I'm a newbie that is still learning I will stop sending this kind of patches if you consider it wise.

> On top of that CHECKS are just that, things that should be CHECK'ed, not necessarily fixed.
> 

Agreed.

> Hope this helps,

A lot! I really appreciate any input at this stage.

thanks,
frank
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux