Re: [PATCH 02/16] USB: core: add helpers to retrieve endpoints in reverse order

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

 



On Wed, Mar 15, 2017 at 04:58:47PM +0100, Bjørn Mork wrote:
> Johan Hovold <johan@xxxxxxxxxx> writes:
> 
> > +	if ((!bulk_in || *bulk_in) && (!bulk_out || *bulk_out) &&
> > +			(!int_in || *int_in) && (!int_out || *int_out)) {
> > +		return true;
> > +	}
> > +
> > +	return false;
> > +}
> 
> 
> Maybe I asked this before and got a good answer?  I don't remember...
> 
> But why not
> 
>   return (!bulk_in || *bulk_in) && (!bulk_out || *bulk_out) &&
>          (!int_in || *int_in) && (!int_out || *int_out);
> 
> 
> ?

This was probably mostly a refactoring artifact this time, although I do
tend to try to avoid return statements that span multiple lines.

I'll fix this up in a v2.

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux