lkml.org 
[lkml]   [2005]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.036 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site