RE: linux-4.1/drivers/usb/serial/io_edgeport.c: 7 * redundant conditions ?

2015-06-22 Thread David Binderman
Hello there Johan,


 Yes, that is a redundant test.

Thanks for the confirmation.

 Care to fix these instances and submit a proper patch that we can apply?

My success rate with kernel patches is 0.0%, despite many attempts over the 
years.

I am happy for someone else to claim the victory of submitting a proper patch.


Regards

David Binderman
  --
To unsubscribe from this list: send the line unsubscribe linux-usb in


Re: linux-4.1/drivers/usb/serial/io_edgeport.c: 7 * redundant conditions ?

2015-06-22 Thread Johan Hovold
On Mon, Jun 22, 2015 at 08:40:51AM +, David Binderman wrote:
 Hello there,
 
 1.
 
 [linux-4.1/drivers/usb/serial/io_edgeport.c:1049]: (style) Redundant 
 condition: edge_serial.is_epic. 'A  (!A || B)' is equivalent to 'A || B'
 
    if ((!edge_serial-is_epic) ||
     ((edge_serial-is_epic) 
  (edge_serial-epic_descriptor.Supports.IOSPChase))) {
 
 Maybe
 
    if ((!edge_serial-is_epic) ||
     edge_serial-epic_descriptor.Supports.IOSPChase) {

Yes, that is a redundant test.

Care to fix these instances and submit a proper patch that we can apply?
You can drop the parentheses around the negation as well.

Thanks,
Johan
--
To unsubscribe from this list: send the line unsubscribe linux-usb in