mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia@diku.dk>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: gregkh@suse.de, dbrownell@users.sourceforge.net,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 10/13] drivers/usb/gadget: use USB API functions rather than constants
Date: Mon, 29 Dec 2008 17:18:10 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0812291715170.9555@pc-004.diku.dk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0812291111581.2250-100000@iolanthe.rowland.org>

On Mon, 29 Dec 2008, Alan Stern wrote:

> On Mon, 29 Dec 2008, Julia Lawall wrote:
> 
> > > ...
> > > 
> > > > diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
> > > > index 88fedd0..c44092b 100644
> > > > --- a/drivers/usb/gadget/file_storage.c
> > > > +++ b/drivers/usb/gadget/file_storage.c
> > > > @@ -248,6 +248,7 @@
> > > >  #include <linux/freezer.h>
> > > >  #include <linux/utsname.h>
> > > >  
> > > > +#include <linux/usb.h>
> > > >  #include <linux/usb/ch9.h>
> > > >  #include <linux/usb/gadget.h>
> > > 
> > > While there's nothing wrong with this part of the patch, it hardly 
> > > seems necessary.  Was there any reason for including it?
> > 
> > The new functions are defined in usb.h. I have added the include in 
> > this file and in the file epautoconf.c that this file includes.  If it is 
> > removed from both, then the code does not compile (after make 
> > allyesconfig):
> > 
> > In file included from drivers/usb/gadget/file_storage.c:268:
> > drivers/usb/gadget/epautoconf.c: In function 'ep_matches':
> > drivers/usb/gadget/epautoconf.c:79: error: implicit declaration of 
> > function 'usb_endpoint_type'
> > drivers/usb/gadget/epautoconf.c:122: error: implicit declaration of 
> > function 'usb_endpoint_dir_in'
> > make[1]: *** [drivers/usb/gadget/file_storage.o] Error 1
> > make: *** [drivers/usb/gadget/file_storage.o] Error 2
> > 
> > While putting it in epautoconf.c would be sufficient, the includes
> > 
> > #include <linux/usb/ch9.h>
> > #include <linux/usb/gadget.h>
> > 
> > are already repeated in both, so it would seem reasonable to repeat usb.h 
> > in both as well.
> 
> Ah, but the declarations in ch9.h and gadget.h are used by both files, 
> whereas the declarations in usb.h are used only by epautoconf.c.  Hence 
> it seems most reasonable to #include usb.h only in epautoconf.c.

Oops, I didn't notice that.  Just ignore that part of the patch then.  Or 
I can send another one if that would be more convenient.

A bit further down, the same is true of drivers/usb/gadget/gmidi.c and 
drivers/usb/gadget/printer.c

julia

  reply	other threads:[~2008-12-29 16:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-29 10:22 Julia Lawall
2008-12-29 15:27 ` Alan Stern
2008-12-29 15:35   ` Julia Lawall
2008-12-29 16:13     ` Alan Stern
2008-12-29 16:18       ` Julia Lawall [this message]
2008-12-29 18:14     ` David Brownell
2008-12-29 19:54       ` Alan Stern
2008-12-29 20:22         ` David Brownell
2008-12-29 20:37           ` Julia Lawall
2008-12-29 20:49           ` John Daiker
2008-12-29 21:01             ` David Brownell
2008-12-29 21:01             ` Alan Stern

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.64.0812291715170.9555@pc-004.diku.dk \
    --to=julia@diku.dk \
    --cc=dbrownell@users.sourceforge.net \
    --cc=gregkh@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®