All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Greg KH <greg@kroah.com>
Cc: Michal Nazarewicz <mnazarewicz@google.com>,
	Felipe Balbi <balbi@ti.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Yang Rui Rui <ruirui.r.yang@tieto.com>,
	Dave Young <hidave.darkstar@gmail.com>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv5 1/4] usb: Provide usb_speed_string() function
Date: Fri, 26 Aug 2011 14:49:05 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1108261437200.2275-100000@netrider.rowland.org> (raw)
In-Reply-To: <20110826183450.GA32142@kroah.com>

On Fri, 26 Aug 2011, Greg KH wrote:

> > > No, this should be in include/linux/usb.h, not ch9.h.
> > 
> > There's a reason for both of these things.  The usb_speed_string 
> > routine, like the other stuff in ch9.h, is meant to be used with both 
> > the host-side and device-side USB stacks.
> 
> Ok, the __KERNEL__ stuff threw me off, those should not be in the patch
> as they are not needed, so it's ok to keep it here, sorry.

The __KERNEL__ guard is needed there because ch9.h is one of the files 
exported to /usr/include/linux.

> > This makes deciding where to put it kind of difficult.  The two stacks 
> > are pretty much independent; one might be built into the kernel while 
> > the other is built as modules.  The easiest solution that will always 
> > work is to put common.c into the main kernel.
> 
> A module, if the USB Host core is a module, and a module if the USB
> gadge core is a module, would be best if at all possible.  I'm a bit
> leery of adding stuff to be built into the kernel no matter how the user
> decided to configure USB.
> 
> Is this possible with the Kbuild system somehow?

I don't know.  Michal, can you look into this?  What we want is:

	common.o gets included in the main kernel if either CONFIG_USB 
	or CONFIG_USB_GADGET is set to Y.

	Otherwise, if either symbol is set to M then common.o gets 
	built into its own little module.  Perhaps some other stuff
	could get put in there too, though at the moment I can't
	think of anything.

Alan Stern


  reply	other threads:[~2011-08-26 18:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 13:18 [PATCHv5 0/4] Removing USB_GADGET_*SPEED macros Michal Nazarewicz
2011-08-26 13:18 ` [PATCHv5 1/4] usb: Provide usb_speed_string() function Michal Nazarewicz
2011-08-26 18:07   ` Greg KH
2011-08-26 18:26     ` Alan Stern
2011-08-26 18:34       ` Greg KH
2011-08-26 18:49         ` Alan Stern [this message]
2011-08-26 18:57           ` Michal Nazarewicz
2011-08-26 20:46             ` Alan Stern
2011-08-30 15:11         ` [PATCHv5.1 " Michal Nazarewicz
2011-08-26 13:18 ` [PATCHv5 2/4] usb: gadget: replace "is_dualspeed" with "max_speed" Michal Nazarewicz
2011-09-09 14:14   ` Michal Nazarewicz
2011-10-06  9:27     ` Felipe Balbi
2011-10-10  6:02   ` Felipe Balbi
2011-10-10  6:22     ` Dave Young
2011-10-10  7:40     ` Michal Nazarewicz
2011-10-10  7:42       ` Felipe Balbi
2011-08-26 13:18 ` [PATCHv5 3/4] usb: gadget: rename usb_gadget_driver::speed to max_speed Michal Nazarewicz
2011-10-10  6:02   ` Felipe Balbi
2011-08-26 13:18 ` [PATCHv5 4/4] usb: gadget: get rid of USB_GADGET_{DUAL,SUPER}SPEED Michal Nazarewicz
2011-10-10  6:02   ` Felipe Balbi

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=Pine.LNX.4.44L0.1108261437200.2275-100000@netrider.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=balbi@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=greg@kroah.com \
    --cc=hidave.darkstar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mnazarewicz@google.com \
    --cc=ruirui.r.yang@tieto.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.