public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Telemaque Ndizihiwe <telendiz@eircom.net>
Cc: rddunlap@osdl.org, bhards@bigpond.net.au, torvalds@osdl.org,
	akpm@osdl.org, trivial@rustcorp.com.au,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Remove unnecessary addition operations from usb/core/hub.c
Date: Sat, 19 Feb 2005 14:40:36 -0800	[thread overview]
Message-ID: <20050219224036.GC12713@kroah.com> (raw)
In-Reply-To: <1108839807.7748.24.camel@localhost.localdomain>

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

      reply	other threads:[~2005-02-19 22:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-19 19:03 [PATCH] Remove unnecessary addition operations from usb/core/hub.c Telemaque Ndizihiwe
2005-02-19 22:40 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050219224036.GC12713@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@osdl.org \
    --cc=bhards@bigpond.net.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    --cc=telendiz@eircom.net \
    --cc=torvalds@osdl.org \
    --cc=trivial@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox