Messages in this thread | | | Date | Sat, 19 Feb 2005 14:40:36 -0800 | From | Greg KH <> | Subject | Re: [PATCH] Remove unnecessary addition operations from usb/core/hub.c |
| |
On Sat, Feb 19, 2005 at 07:03:27PM +0000, Telemaque Ndizihiwe wrote: > This Patch removes unnecessary addition operations from > usb/core/hub.c in kernel 2.6.10. > > usb_disable_endpoint(udev, 0 + USB_DIR_IN); //replaced by > usb_disable_endpoint(udev, USB_DIR_IN); > > usb_disable_endpoint(udev, 0 + USB_DIR_OUT); //replaced by > usb_disable_endpoint(udev, USB_DIR_OUT); > > > Signed-off-by: Telemaque Ndizihiwe <telendiz@eircom.net>
No, I'll say to leave these "0 +" in the code. It doesn't hurt anything (the compiler takes care of it in preprocessing) and it instantly tells you exactly what the code is really doing (disabling endpoint 0). Without the 0 in there, you would have to take a bit to think about which endpoint is actually being disabled.
So, sorry, I'm not going to apply this.
Oh, and next time, please CC: the linux usb maintainer, and the linux-usb-devel mailing list when you post USB patches.
thanks,
greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |