Message ID | 20240116-ml-topic-u9p-v4-1-722ed28b0ade@pengutronix.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | usb: gadget: 9pfs transport | expand |
On Tue, Apr 30, 2024 at 01:33:26AM +0200, Michael Grzeschik wrote: > We move the u_f.h header to include/linux/usb to be > able to compile function drivers outside of the > drivers/usb/gadget/function directory. > > Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Given that you're moving a private header file to a public location, don't you think it should now have a name that's more meaningful to general kernel developers than "u_f.h"? Alan Stern
On Mon, Apr 29, 2024 at 09:51:20PM -0400, Alan Stern wrote: >On Tue, Apr 30, 2024 at 01:33:26AM +0200, Michael Grzeschik wrote: >> We move the u_f.h header to include/linux/usb to be >> able to compile function drivers outside of the >> drivers/usb/gadget/function directory. >> >> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> > >Given that you're moving a private header file to a public location, >don't you think it should now have a name that's more meaningful to >general kernel developers than "u_f.h"? Fair point. How about func_utils.h instead? Michael Grzeschik
On Wed, May 01, 2024 at 10:38:11AM +0200, Michael Grzeschik wrote: > On Mon, Apr 29, 2024 at 09:51:20PM -0400, Alan Stern wrote: > > On Tue, Apr 30, 2024 at 01:33:26AM +0200, Michael Grzeschik wrote: > > > We move the u_f.h header to include/linux/usb to be > > > able to compile function drivers outside of the > > > drivers/usb/gadget/function directory. > > > > > > Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> > > > > Given that you're moving a private header file to a public location, > > don't you think it should now have a name that's more meaningful to > > general kernel developers than "u_f.h"? > > Fair point. > > How about func_utils.h instead? Yes, that would be a lot better. Especially if you put it in include/linux/usb/gadget rather than include/linux/usb. Thanks. Alan Stern
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index ce3cfa1f36f51..4fa3eeafba814 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -8,8 +8,8 @@ #include <linux/usb/composite.h> #include <linux/usb/gadget_configfs.h> #include <linux/usb/webusb.h> +#include <linux/usb/u_f.h> #include "configfs.h" -#include "u_f.h" #include "u_os_desc.h" int check_user_usb_string(const char *name, diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index f855f1fc8e5e1..3fcb957e75386 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -33,6 +33,7 @@ #include <linux/usb/ccid.h> #include <linux/usb/composite.h> #include <linux/usb/functionfs.h> +#include <linux/usb/u_f.h> #include <linux/aio.h> #include <linux/kthread.h> @@ -40,7 +41,6 @@ #include <linux/eventfd.h> #include "u_fs.h" -#include "u_f.h" #include "u_os_desc.h" #include "configfs.h" diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 3c8a9dd585c09..a5b667a03ca83 100644 --- a/drivers/usb/gadget/function/f_hid.c +++ b/drivers/usb/gadget/function/f_hid.c @@ -16,8 +16,8 @@ #include <linux/wait.h> #include <linux/sched.h> #include <linux/usb/g_hid.h> +#include <linux/usb/u_f.h> -#include "u_f.h" #include "u_hid.h" #define HIDG_MINORS 4 diff --git a/drivers/usb/gadget/function/f_loopback.c b/drivers/usb/gadget/function/f_loopback.c index 17ac6ace0cffa..d500025f45128 100644 --- a/drivers/usb/gadget/function/f_loopback.c +++ b/drivers/usb/gadget/function/f_loopback.c @@ -14,9 +14,9 @@ #include <linux/module.h> #include <linux/err.h> #include <linux/usb/composite.h> +#include <linux/usb/u_f.h> #include "g_zero.h" -#include "u_f.h" /* * LOOPBACK FUNCTION ... a testing vehicle for USB peripherals, diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c index 20c6fbd94f32d..2d551ba385c71 100644 --- a/drivers/usb/gadget/function/f_midi.c +++ b/drivers/usb/gadget/function/f_midi.c @@ -33,8 +33,8 @@ #include <linux/usb/gadget.h> #include <linux/usb/audio.h> #include <linux/usb/midi.h> +#include <linux/usb/u_f.h> -#include "u_f.h" #include "u_midi.h" MODULE_AUTHOR("Ben Williamson"); diff --git a/drivers/usb/gadget/function/f_midi2.c b/drivers/usb/gadget/function/f_midi2.c index ec8cd7c7bbfc1..ad59be1f9c54d 100644 --- a/drivers/usb/gadget/function/f_midi2.c +++ b/drivers/usb/gadget/function/f_midi2.c @@ -18,8 +18,8 @@ #include <linux/usb/gadget.h> #include <linux/usb/audio.h> #include <linux/usb/midi-v2.h> +#include <linux/usb/u_f.h> -#include "u_f.h" #include "u_midi2.h" struct f_midi2; diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c index 2edbd9b510d60..4283fb2e365bd 100644 --- a/drivers/usb/gadget/function/f_sourcesink.c +++ b/drivers/usb/gadget/function/f_sourcesink.c @@ -13,10 +13,10 @@ #include <linux/device.h> #include <linux/module.h> #include <linux/usb/composite.h> +#include <linux/usb/u_f.h> #include <linux/err.h> #include "g_zero.h" -#include "u_f.h" /* * SOURCE/SINK FUNCTION ... a primary testing vehicle for USB peripheral diff --git a/drivers/usb/gadget/u_f.c b/drivers/usb/gadget/u_f.c index 6aea1ecb39999..90a7f742549a4 100644 --- a/drivers/usb/gadget/u_f.c +++ b/drivers/usb/gadget/u_f.c @@ -8,7 +8,7 @@ * Author: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> */ -#include "u_f.h" +#include <linux/usb/u_f.h> #include <linux/usb/ch9.h> struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len) diff --git a/drivers/usb/gadget/u_f.h b/include/linux/usb/u_f.h similarity index 100% rename from drivers/usb/gadget/u_f.h rename to include/linux/usb/u_f.h
We move the u_f.h header to include/linux/usb to be able to compile function drivers outside of the drivers/usb/gadget/function directory. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> --- v3 -> v4: - v2 -> v3: - v1 -> v2: - new introduced patch --- drivers/usb/gadget/configfs.c | 2 +- drivers/usb/gadget/function/f_fs.c | 2 +- drivers/usb/gadget/function/f_hid.c | 2 +- drivers/usb/gadget/function/f_loopback.c | 2 +- drivers/usb/gadget/function/f_midi.c | 2 +- drivers/usb/gadget/function/f_midi2.c | 2 +- drivers/usb/gadget/function/f_sourcesink.c | 2 +- drivers/usb/gadget/u_f.c | 2 +- {drivers/usb/gadget => include/linux/usb}/u_f.h | 0 9 files changed, 8 insertions(+), 8 deletions(-)