diff for duplicates of <op.vgtecwcq7p4s8u@pikus> diff --git a/a/1.txt b/N1/1.txt index 185cf50..d7a9d2a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -7,7 +7,7 @@ Some random thoughts, one bug and mostly just minor comments: > +int usb_gadget_probe_driver(struct usb_gadget_driver *driver, > + int (*bind)(struct usb_gadget *)) > { -> struct udc *dev =3D udc; +> struct udc *dev = udc; > int retval; > u32 tmp; >- if (!driver || !driver->bind || !driver->setup @@ -17,10 +17,8 @@ Some random thoughts, one bug and mostly just minor comments: ** BUG: Should read "!bind". -> diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_u= -dc.c -> @@ -1612,7 +1613,7 @@ int usb_gadget_register_driver (struct usb_gadge= -t_driver *driver) +> diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c +> @@ -1612,7 +1613,7 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver) > DBG("bound to %s\n", driver->driver.name); > return 0; > } @@ -29,8 +27,7 @@ t_driver *driver) How about also correcting space before "("? -> diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/= -atmel_usba_udc.c +> diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c > @@ -1789,7 +1789,8 @@ out: > return IRQ_HANDLED; > } @@ -38,15 +35,13 @@ atmel_usba_udc.c > +int usb_gadget_probe_driver(struct usb_gadget_driver *driver, > + int (*bind)(struct usb_gadget *)) > { -> struct usba_udc *udc =3D &the_udc; +> struct usba_udc *udc = &the_udc; > unsigned long flags; There was no checking here? How about adding? -> diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci1= -3xxx_udc.c -> @@ -2340,12 +2340,13 @@ static const struct usb_ep_ops usb_ep_ops =3D = -{ +> diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c +> @@ -2340,12 +2340,13 @@ static const struct usb_ep_ops usb_ep_ops = { > static const struct usb_gadget_ops usb_gadget_ops; > /** > - * usb_gadget_register_driver: register a gadget driver @@ -60,48 +55,42 @@ There was no checking here? How about adding? usb_gadget.h is the old name. How about correcting it as well? -> diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/fi= -le_storage.c +> diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c > @@ -3583,7 +3582,7 @@ static int __init fsg_init(void) -> if ((rc =3D fsg_alloc()) !=3D 0) +> if ((rc = fsg_alloc()) != 0) > return rc; -> fsg =3D the_fsg; -> - if ((rc =3D usb_gadget_register_driver(&fsg_driver)) !=3D 0) -> + if ((rc =3D usb_gadget_probe_driver(&fsg_driver, fsg_bind)) !=3D 0) +> fsg = the_fsg; +> - if ((rc = usb_gadget_register_driver(&fsg_driver)) != 0) +> + if ((rc = usb_gadget_probe_driver(&fsg_driver, fsg_bind)) != 0) I'm tempted to propose: -+ rc =3D usb_gadget_probe_driver(&fsg_driver, fsg_bind); -+ if (rc !=3D 0) ++ rc = usb_gadget_probe_driver(&fsg_driver, fsg_bind); ++ if (rc != 0) -which is more compatible with coding style but it probably would be inco= -nsistent +which is more compatible with coding style but it probably would be inconsistent with the rest of the code. -> diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/la= -ngwell_udc.c -> @@ -1807,7 +1807,8 @@ static DEVICE_ATTR(langwell_udc, S_IRUGO, show_l= -angwell_udc, NULL); +> diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c +> @@ -1807,7 +1807,8 @@ static DEVICE_ATTR(langwell_udc, S_IRUGO, show_langwell_udc, NULL); > * the driver might get unbound. > */ >-int usb_gadget_register_driver(struct usb_gadget_driver *driver) > +int usb_gadget_probe_driver(struct usb_gadget_driver *driver, > + int (*bind)(struct usb_gadget *)) > { -> struct langwell_udc *dev =3D the_controller; +> struct langwell_udc *dev = the_controller; > unsigned long flags; Again, function has no checking, how about adding? -> diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_ga= -dget.c +> diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c > @@ -1698,7 +1698,8 @@ void musb_gadget_cleanup(struct musb *musb) > * @param driver the gadget driver > * @return <0 if error, 0 if everything is fine > */ -I've just noticed that it misses @param bind in the comment. Would be g= -reat to update it +I've just noticed that it misses @param bind in the comment. Would be great to update it and all other occurrences. > diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h @@ -122,23 +111,18 @@ and all other occurrences. > - * The driver's bind() function will be called to bind it to a > - * gadget before this registration call returns. It's expected that > - * the bind() functions will be in init sections. -> + * The bind() function will be called to bind it to a gadget before t= -his -> + * registration call returns. It's expected that the bind() function= - will +> + * The bind() function will be called to bind it to a gadget before this +> + * registration call returns. It's expected that the bind() function will Maybe "the @bind function" in those two places? So for what it's worth, I haven't noticed any other obvious problems. -I think it still does not fix all the section mismatch warnings -- would= - have to look -closer at composite gadgets -- so I think still parts of my patch is leg= -it. - --- = +I think it still does not fix all the section mismatch warnings -- would have to look +closer at composite gadgets -- so I think still parts of my patch is legit. +-- Best regards, _ _ -| Humble Liege of Serenely Enlightened Majesty of o' \,=3D./ `o -| Computer Science, Micha=C5=82 "mina86" Nazarewicz (o o) +| Humble Liege of Serenely Enlightened Majesty of o' \,=./ `o +| Computer Science, Micha? "mina86" Nazarewicz (o o) +----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo-- diff --git a/a/content_digest b/N1/content_digest index cbe9ead..381aa9c 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,64 +1,9 @@ "ref\0op.vgs04dub7p4s8u@pikus\0" "ref\01280752803-11441-1-git-send-email-u.kleine-koenig@pengutronix.de\0" - "From\0Micha\305\202 Nazarewicz <m.nazarewicz@samsung.com>\0" - "Subject\0Re: [PATCH] usb gadget: don't save bind callback in struct usb_gadget_driver\0" + "From\0m.nazarewicz@samsung.com (Micha\305\202 Nazarewicz)\0" + "Subject\0[PATCH] usb gadget: don't save bind callback in struct usb_gadget_driver\0" "Date\0Mon, 02 Aug 2010 16:25:34 +0200\0" - "To\0linux-usb@vger.kernel.org" - " Uwe Kleine-K\303\266nig <u.kleine-koenig@pengutronix.de>\0" - "Cc\0Cliff Cai <cliff.cai@analog.com>" - Mark Brown <broonie@opensource.wolfsonmicro.com> - Dinh Nguyen <Dinh.Nguyen@freescale.com> - Takashi Iwai <tiwai@suse.de> - Nicolas Ferre <nicolas.ferre@atmel.com> - linux-kernel@vger.kernel.org - linuxppc-dev@ozlabs.org - Julia Lawall <julia@diku.dk> - Laurent Pinchart <laurent.pinchart@ideasonboard.com> - Philipp Zabel <philipp.zabel@gmail.com> - Felipe Balbi <felipe.balbi@nokia.com> - Andrea Gelmini <andrea.gelmini@gelma.net> - Robert Jarzmik <robert.jarzmik@free.fr> - Christoph Hellwig <hch@lst.de> - Dan Carpenter <error27@gmail.com> - FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> - David Brownell <dbrownell@users.sourceforge.net> - Vladimir Zapolskiy <vzapolskiy@gmail.com> - Sergei Shtylyov <sshtylyov@ru.mvista.com> - Vincent Sanders <support@simtec.co.uk> - Marc Singer <elf@buici.com> - David Brownell <david-b@pacbell.net> - Tony Lindgren <tony@atomide.com> - " Andr\303\251 Goddard Rosa <andre.goddard@gmail.com>" - Alan Stern <stern@rowland.harvard.edu> - Sean MacLennan <smaclennan@pikatech.com> - Russell King <rmk+kernel@arm.linux.org.uk> - Tobias Klauser <tklauser@distanz.ch> - Anatolij Gustschin <agust@denx.de> - Alexey Dobriyan <adobriyan@gmail.com> - Eirik Aanonsen <eaa@wprmedical.com> - Mike Frysinger <vapier@gentoo.org> - Thomas Dahlmann <dahlmann.thomas@arcor.de> - linux-geode@lists.infradead.org - Fabien Chouteau <fabien.chouteau@barco.com> - Ben Dooks <ben-linux@fluff.org> - Magnus Damm <damm@igel.co.jp> - Thomas Gleixner <tglx@linutronix.de> - Anton Vorontsov <avorontsov@ru.mvista.com> - Andrew Victor <linux@maxim.org.za> - linux-arm-kernel@lists.infradead.org - Robert Lukassen <robert.lukassen@tomtom.com> - Eric Miao <eric.y.miao@gmail.com> - " N\303\251meth M\303\241rton <nm127@freemail.hu>" - Jiri Kosina <jkosina@suse.cz> - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> - Greg Kroah-Hartman <gregkh@suse.de> - Harro Haan <hrhaan@gmail.com> - Kyle McMartin <kyle@mcmartin.ca> - H Hartley Sweeten <hsweeten@visionengravers.com> - Paul Mundt <lethal@linux-sh.org> - Tejun Heo <tj@kernel.org> - Andrew Morton <akpm@linux-foundation.org> - " Cory Maccarrone <darkstar6262@gmail.com>\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "Some random thoughts, one bug and mostly just minor comments:\n" @@ -70,7 +15,7 @@ "> +int usb_gadget_probe_driver(struct usb_gadget_driver *driver,\n" "> +\t\tint (*bind)(struct usb_gadget *))\n" "> {\n" - "> \tstruct udc\t\t*dev =3D udc;\n" + "> \tstruct udc\t\t*dev = udc;\n" "> \tint\t\t\tretval;\n" "> \tu32 tmp;\n" ">-\tif (!driver || !driver->bind || !driver->setup\n" @@ -80,10 +25,8 @@ "** BUG: Should read \"!bind\".\n" "\n" "\n" - "> diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_u=\n" - "dc.c\n" - "> @@ -1612,7 +1613,7 @@ int usb_gadget_register_driver (struct usb_gadge=\n" - "t_driver *driver)\n" + "> diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c\n" + "> @@ -1612,7 +1613,7 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver)\n" "> \tDBG(\"bound to %s\\n\", driver->driver.name);\n" "> \treturn 0;\n" "> }\n" @@ -92,8 +35,7 @@ "\n" "How about also correcting space before \"(\"?\n" "\n" - "> diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/=\n" - "atmel_usba_udc.c\n" + "> diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c\n" "> @@ -1789,7 +1789,8 @@ out:\n" "> \treturn IRQ_HANDLED;\n" "> }\n" @@ -101,15 +43,13 @@ "> +int usb_gadget_probe_driver(struct usb_gadget_driver *driver,\n" "> +\t\tint (*bind)(struct usb_gadget *))\n" "> {\n" - "> \tstruct usba_udc *udc =3D &the_udc;\n" + "> \tstruct usba_udc *udc = &the_udc;\n" "> \tunsigned long flags;\n" "\n" "There was no checking here? How about adding?\n" "\n" - "> diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci1=\n" - "3xxx_udc.c\n" - "> @@ -2340,12 +2340,13 @@ static const struct usb_ep_ops usb_ep_ops =3D =\n" - "{\n" + "> diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c\n" + "> @@ -2340,12 +2340,13 @@ static const struct usb_ep_ops usb_ep_ops = {\n" "> static const struct usb_gadget_ops usb_gadget_ops;\n" "> /**\n" "> - * usb_gadget_register_driver: register a gadget driver\n" @@ -123,48 +63,42 @@ "\n" "usb_gadget.h is the old name. How about correcting it as well?\n" "\n" - "> diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/fi=\n" - "le_storage.c\n" + "> diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c\n" "> @@ -3583,7 +3582,7 @@ static int __init fsg_init(void)\n" - "> \tif ((rc =3D fsg_alloc()) !=3D 0)\n" + "> \tif ((rc = fsg_alloc()) != 0)\n" "> \t\treturn rc;\n" - "> \tfsg =3D the_fsg;\n" - "> -\tif ((rc =3D usb_gadget_register_driver(&fsg_driver)) !=3D 0)\n" - "> +\tif ((rc =3D usb_gadget_probe_driver(&fsg_driver, fsg_bind)) !=3D 0)\n" + "> \tfsg = the_fsg;\n" + "> -\tif ((rc = usb_gadget_register_driver(&fsg_driver)) != 0)\n" + "> +\tif ((rc = usb_gadget_probe_driver(&fsg_driver, fsg_bind)) != 0)\n" "\n" "I'm tempted to propose:\n" "\n" - "+ rc =3D usb_gadget_probe_driver(&fsg_driver, fsg_bind);\n" - "+ if (rc !=3D 0)\n" + "+ rc = usb_gadget_probe_driver(&fsg_driver, fsg_bind);\n" + "+ if (rc != 0)\n" "\n" - "which is more compatible with coding style but it probably would be inco=\n" - "nsistent\n" + "which is more compatible with coding style but it probably would be inconsistent\n" "with the rest of the code.\n" "\n" - "> diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/la=\n" - "ngwell_udc.c\n" - "> @@ -1807,7 +1807,8 @@ static DEVICE_ATTR(langwell_udc, S_IRUGO, show_l=\n" - "angwell_udc, NULL);\n" + "> diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c\n" + "> @@ -1807,7 +1807,8 @@ static DEVICE_ATTR(langwell_udc, S_IRUGO, show_langwell_udc, NULL);\n" "> * the driver might get unbound.\n" "> */\n" ">-int usb_gadget_register_driver(struct usb_gadget_driver *driver)\n" "> +int usb_gadget_probe_driver(struct usb_gadget_driver *driver,\n" "> +\t\tint (*bind)(struct usb_gadget *))\n" "> {\n" - "> \tstruct langwell_udc\t*dev =3D the_controller;\n" + "> \tstruct langwell_udc\t*dev = the_controller;\n" "> \tunsigned long\t\tflags;\n" "\n" "Again, function has no checking, how about adding?\n" "\n" - "> diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_ga=\n" - "dget.c\n" + "> diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c\n" "> @@ -1698,7 +1698,8 @@ void musb_gadget_cleanup(struct musb *musb)\n" "> * @param driver the gadget driver\n" "> * @return <0 if error, 0 if everything is fine\n" "> */\n" "\n" - "I've just noticed that it misses @param bind in the comment. Would be g=\n" - "reat to update it\n" + "I've just noticed that it misses @param bind in the comment. Would be great to update it\n" "and all other occurrences.\n" "\n" "> diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h\n" @@ -185,25 +119,20 @@ "> - * The driver's bind() function will be called to bind it to a\n" "> - * gadget before this registration call returns. It's expected that\n" "> - * the bind() functions will be in init sections.\n" - "> + * The bind() function will be called to bind it to a gadget before t=\n" - "his\n" - "> + * registration call returns. It's expected that the bind() function=\n" - " will\n" + "> + * The bind() function will be called to bind it to a gadget before this\n" + "> + * registration call returns. It's expected that the bind() function will\n" "\n" "Maybe \"the @bind function\" in those two places?\n" "\n" "So for what it's worth, I haven't noticed any other obvious problems.\n" "\n" - "I think it still does not fix all the section mismatch warnings -- would=\n" - " have to look\n" - "closer at composite gadgets -- so I think still parts of my patch is leg=\n" - "it.\n" - "\n" - "-- =\n" + "I think it still does not fix all the section mismatch warnings -- would have to look\n" + "closer at composite gadgets -- so I think still parts of my patch is legit.\n" "\n" + "-- \n" "Best regards, _ _\n" - "| Humble Liege of Serenely Enlightened Majesty of o' \\,=3D./ `o\n" - "| Computer Science, Micha=C5=82 \"mina86\" Nazarewicz (o o)\n" + "| Humble Liege of Serenely Enlightened Majesty of o' \\,=./ `o\n" + "| Computer Science, Micha? \"mina86\" Nazarewicz (o o)\n" +----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo-- -2af17bf43e7c4be87821eb61d252cabb2573e3aadb5eeabbbfd2907072667d1c +9d5fcd008ec3be9752549a3916257f30778feade8c762d75c1e9e9905c6e1dd3
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.