Re: [PATCH 3/7] USB: add direction bit to urb->transfer_flags

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Mon, 30 Jul 2007, David Brownell wrote:

> On Monday 30 July 2007, Alan Stern wrote:
> > +static inline int usb_urb_dir_in(struct urb *urb)
> > +{
> > +       return (urb->transfer_flags & URB_DIR_MASK) != URB_DIR_OUT;
> > +}
> 
> Clearer would be:  == URB_DIR_IN ... or does that generate bad code?

I didn't actually check the generated code before submitting the patch.  
A quick test with gcc 4.1.2 on x86 shows that the two sources give rise
to identical objects.  I guess the same will probably be true on other
architectures too.

Okay, I'll change it.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.