Message ID | 20240723131817.262596-3-zli@ogga.fr |
---|---|
State | Changes Requested |
Delegated to: | Mattijs Korpershoek |
Headers | show |
Series | usb: gadget: atmel: Code refactor and DM_USB_GADGET support | expand |
On 7/23/24 3:18 PM, Zixun LI wrote: > To have a uniform printing function, also drop linux/printk.h as no > longer used. Reviewed-by: Marek Vasut <marex@denx.de> Thanks !
Hi Zixun, Thank you for the patch. On mar., juil. 23, 2024 at 15:18, Zixun LI <admin@hifiphile.com> wrote: > To have a uniform printing function, also drop linux/printk.h as no > longer used. > > Signed-off-by: Zixun LI <zli@ogga.fr> Checkpatch complains here: checkpatch.pl: 164: WARNING: From:/Signed-off-by: email address mismatch: 'From: Zixun LI <admin@hifiphile.com>' != 'Signed-off-by: Zixun LI <zli@ogga.fr>' Please make sure that the commiter matches the Signed-off-by. This can be done with git commit --reset-author or --author="name <email>" > --- > drivers/usb/gadget/atmel_usba_udc.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c > index 5f78251fdb..83fdc36870 100644 > --- a/drivers/usb/gadget/atmel_usba_udc.c > +++ b/drivers/usb/gadget/atmel_usba_udc.c > @@ -7,13 +7,13 @@ > * Bo Shen <voice.shen@atmel.com> > */ > > +#include <log.h> > #include <malloc.h> > #include <asm/gpio.h> > #include <asm/hardware.h> > #include <linux/bitops.h> > #include <linux/errno.h> > #include <linux/list.h> > -#include <linux/printk.h> > #include <linux/usb/ch9.h> > #include <linux/usb/gadget.h> > #include <linux/usb/atmel_usba_udc.h> > @@ -1204,12 +1204,12 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) > int ret; > > if (!driver || !driver->bind || !driver->setup) { > - printf("bad paramter\n"); > + log_err("bad paramter\n"); > return -EINVAL; > } > > if (udc->driver) { > - printf("UDC already has a gadget driver\n"); > + log_err("UDC already has a gadget driver\n"); > return -EBUSY; > } > > @@ -1219,7 +1219,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) > > ret = driver->bind(&udc->gadget); > if (ret) { > - pr_err("driver->bind() returned %d\n", ret); > + log_err("driver->bind() returned %d\n", ret); > udc->driver = NULL; > } > > @@ -1231,7 +1231,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) > struct usba_udc *udc = &controller; > > if (!driver || !driver->unbind || !driver->disconnect) { > - pr_err("bad paramter\n"); > + log_err("bad parameter\n"); Here we change both: 1. pr_err() to log_err() 2. fix paramter -> parameter 2. should be done in patch 3/7 instead of here. With the above fixed: Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> > return -EINVAL; > } > > @@ -1252,7 +1252,7 @@ static struct usba_ep *usba_udc_pdata(struct usba_platform_data *pdata, > > eps = malloc(sizeof(struct usba_ep) * pdata->num_ep); > if (!eps) { > - pr_err("failed to alloc eps\n"); > + log_err("failed to alloc eps\n"); > return NULL; > } > > -- > 2.45.2
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 5f78251fdb..83fdc36870 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -7,13 +7,13 @@ * Bo Shen <voice.shen@atmel.com> */ +#include <log.h> #include <malloc.h> #include <asm/gpio.h> #include <asm/hardware.h> #include <linux/bitops.h> #include <linux/errno.h> #include <linux/list.h> -#include <linux/printk.h> #include <linux/usb/ch9.h> #include <linux/usb/gadget.h> #include <linux/usb/atmel_usba_udc.h> @@ -1204,12 +1204,12 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) int ret; if (!driver || !driver->bind || !driver->setup) { - printf("bad paramter\n"); + log_err("bad paramter\n"); return -EINVAL; } if (udc->driver) { - printf("UDC already has a gadget driver\n"); + log_err("UDC already has a gadget driver\n"); return -EBUSY; } @@ -1219,7 +1219,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) ret = driver->bind(&udc->gadget); if (ret) { - pr_err("driver->bind() returned %d\n", ret); + log_err("driver->bind() returned %d\n", ret); udc->driver = NULL; } @@ -1231,7 +1231,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) struct usba_udc *udc = &controller; if (!driver || !driver->unbind || !driver->disconnect) { - pr_err("bad paramter\n"); + log_err("bad parameter\n"); return -EINVAL; } @@ -1252,7 +1252,7 @@ static struct usba_ep *usba_udc_pdata(struct usba_platform_data *pdata, eps = malloc(sizeof(struct usba_ep) * pdata->num_ep); if (!eps) { - pr_err("failed to alloc eps\n"); + log_err("failed to alloc eps\n"); return NULL; }
To have a uniform printing function, also drop linux/printk.h as no longer used. Signed-off-by: Zixun LI <zli@ogga.fr> --- drivers/usb/gadget/atmel_usba_udc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)