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 16:35:38 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0812291628100.9555@pc-004.diku.dk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0812291025220.2250-100000@iolanthe.rowland.org>

> ...
> 
> > 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.

julia

  reply	other threads:[~2008-12-29 15:35 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 [this message]
2008-12-29 16:13     ` Alan Stern
2008-12-29 16:18       ` Julia Lawall
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.0812291628100.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®