* Re: [PATCH 1/2] staging: emxx_udc: Replace ERR by dev_err
2015-01-21 22:55 ` [PATCH 1/2] staging: emxx_udc: Replace " Ahmad Hassan
@ 2015-01-21 12:46 ` Jeremiah Mahler
0 siblings, 0 replies; 5+ messages in thread
From: Jeremiah Mahler @ 2015-01-21 12:46 UTC (permalink / raw)
To: Ahmad Hassan
Cc: devel, gregkh, vinc94, roberta.dobrescu, sachin.kamat,
ebru.akagunduz, damm+renesas, linux-kernel
Ahmad,
On Wed, Jan 21, 2015 at 01:55:11PM -0900, Ahmad Hassan wrote:
[...]
> if (udc == NULL) {
> - ERR("%s udc == NULL\n", __func__);
> + dev_err(udc->dev,"%s udc == NULL\n", __func__);
^^^^^
Always check your patches with checkpatch.pl before submitting them.
There are a bunch of "space required after ','" errors in this patch.
--
- Jeremiah Mahler
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] staging: emxx_udc: remove macro ERR
2015-01-21 22:56 ` [PATCH 2/2] staging: emxx_udc: remove macro ERR Ahmad Hassan
@ 2015-01-21 14:02 ` Tobias Klauser
0 siblings, 0 replies; 5+ messages in thread
From: Tobias Klauser @ 2015-01-21 14:02 UTC (permalink / raw)
To: Ahmad Hassan
Cc: devel, gregkh, damm+renesas, sachin.kamat, vinc94,
roberta.dobrescu, linux-kernel
On 2015-01-21 at 23:56:06 +0100, Ahmad Hassan <ahmad.hassan612@gmail.com> wrote:
> Removed ERR macro since it is not used anymore in the emxx_udc.c file.
>
> Signed-off-by: Ahmad Hassan <ahmad.hassan612@gmail.com>
> ---
> drivers/staging/emxx_udc/emxx_udc.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/staging/emxx_udc/emxx_udc.h b/drivers/staging/emxx_udc/emxx_udc.h
> index ee1b80d..0758cd5 100644
> --- a/drivers/staging/emxx_udc/emxx_udc.h
> +++ b/drivers/staging/emxx_udc/emxx_udc.h
> @@ -644,6 +644,5 @@ typedef volatile union {
> } USB_REG_ACCESS;
>
> /*-------------------------------------------------------------------------*/
While at it, you could also remove the line above.
> -#define ERR(stuff...) printk(KERN_ERR "udc: " stuff)
>
> #endif /* _LINUX_EMXX_H */
> --
> 2.2.1
>
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 0/2] Replacing ERR by dev_err
@ 2015-01-21 22:53 Ahmad Hassan
2015-01-21 22:55 ` [PATCH 1/2] staging: emxx_udc: Replace " Ahmad Hassan
2015-01-21 22:56 ` [PATCH 2/2] staging: emxx_udc: remove macro ERR Ahmad Hassan
0 siblings, 2 replies; 5+ messages in thread
From: Ahmad Hassan @ 2015-01-21 22:53 UTC (permalink / raw)
To: devel
Cc: gregkh, vinc94, roberta.dobrescu, sachin.kamat, ebru.akagunduz,
damm+renesas, linux-kernel
This patch set removes the macro ERR from emxx_udc.h and accordingly
emxx_udc.c occurrences of ERR changes to dev_err
Ahmad Hassan (2):
staging: emxx_udc: Replace ERR by dev_err
staging: emxx_udc: remove macro ERR
drivers/staging/emxx_udc/emxx_udc.c | 80 ++++++++++++++++++-------------------
drivers/staging/emxx_udc/emxx_udc.h | 1 -
2 files changed, 40 insertions(+), 41 deletions(-)
--
2.2.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] staging: emxx_udc: Replace ERR by dev_err
2015-01-21 22:53 [PATCH 0/2] Replacing ERR by dev_err Ahmad Hassan
@ 2015-01-21 22:55 ` Ahmad Hassan
2015-01-21 12:46 ` Jeremiah Mahler
2015-01-21 22:56 ` [PATCH 2/2] staging: emxx_udc: remove macro ERR Ahmad Hassan
1 sibling, 1 reply; 5+ messages in thread
From: Ahmad Hassan @ 2015-01-21 22:55 UTC (permalink / raw)
To: devel
Cc: gregkh, vinc94, roberta.dobrescu, sachin.kamat, ebru.akagunduz,
damm+renesas, linux-kernel
Replaced all occurences of ERR with dev_err.
The device passed to dev_err is udc->dev.
Signed-off-by: Ahmad Hassan <ahmad.hassan612@gmail.com>
---
drivers/staging/emxx_udc/emxx_udc.c | 80 ++++++++++++++++++-------------------
1 file changed, 40 insertions(+), 40 deletions(-)
diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index eb178fc..e7aaad4 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -115,7 +115,7 @@ static void _nbu2ss_dump_register(struct nbu2ss_udc *udc)
pr_info("=== %s()\n", __func__);
if (udc == NULL) {
- ERR("%s udc == NULL\n", __func__);
+ dev_err(udc->dev,"%s udc == NULL\n", __func__);
return;
}
@@ -808,7 +808,7 @@ static int _nbu2ss_ep0_out_transfer(
return 0; /* Short Packet Transfer End */
if (req->req.actual > req->req.length) {
- ERR(" *** Overrun Error\n");
+ dev_err(udc->dev," *** Overrun Error\n");
return -EOVERFLOW;
}
@@ -1026,8 +1026,8 @@ static int _nbu2ss_epn_out_transfer(
}
if (req->req.actual > req->req.length) {
- ERR(" *** Overrun Error\n");
- ERR(" *** actual = %d, length = %d\n",
+ dev_err(udc->dev," *** Overrun Error\n");
+ dev_err(udc->dev," *** actual = %d, length = %d\n",
req->req.actual, req->req.length);
result = -EOVERFLOW;
}
@@ -1638,7 +1638,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc)
_nbu2ss_ep0_in_transfer(udc, &udc->ep[0], &udc->ep0_req);
} else {
- ERR("*** Error GET_STATUS\n");
+ dev_err(udc->dev,"*** Error GET_STATUS\n");
}
return result;
@@ -2258,7 +2258,7 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)
u32 reg_dt;
if (!udc) {
- ERR("%s, bad param\n", __func__);
+ dev_err(udc->dev,"%s, bad param\n", __func__);
return -EINVAL;
}
@@ -2350,7 +2350,7 @@ static int _nbu2ss_enable_controller(struct nbu2ss_udc *udc)
waitcnt++;
udelay(1); /* 1us wait */
if (waitcnt == EPC_PLL_LOCK_COUNT) {
- ERR("*** Reset Cancel failed\n");
+ dev_err(udc->dev,"*** Reset Cancel failed\n");
return -EINVAL;
}
};
@@ -2612,13 +2612,13 @@ static int nbu2ss_ep_enable(
struct nbu2ss_udc *udc;
if ((_ep == NULL) || (desc == NULL)) {
- ERR(" *** %s, bad param\n", __func__);
+ dev_err(udc->dev," *** %s, bad param\n", __func__);
return -EINVAL;
}
ep = container_of(_ep, struct nbu2ss_ep, ep);
if ((ep == NULL) || (ep->udc == NULL)) {
- ERR(" *** %s, ep == NULL !!\n", __func__);
+ dev_err(udc->dev," *** %s, ep == NULL !!\n", __func__);
return -EINVAL;
}
@@ -2626,7 +2626,7 @@ static int nbu2ss_ep_enable(
if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
|| (ep_type == USB_ENDPOINT_XFER_ISOC)) {
- ERR(" *** %s, bat bmAttributes\n", __func__);
+ dev_err(udc->dev," *** %s, bat bmAttributes\n", __func__);
return -EINVAL;
}
@@ -2637,7 +2637,7 @@ static int nbu2ss_ep_enable(
if ((udc->driver == NULL)
|| (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
- ERR(" *** %s, udc !!\n", __func__);
+ dev_err(udc->dev," *** %s, udc !!\n", __func__);
return -ESHUTDOWN;
}
@@ -2672,13 +2672,13 @@ static int nbu2ss_ep_disable(struct usb_ep *_ep)
unsigned long flags;
if (_ep == NULL) {
- ERR(" *** %s, bad param\n", __func__);
+ dev_err(udc->dev," *** %s, bad param\n", __func__);
return -EINVAL;
}
ep = container_of(_ep, struct nbu2ss_ep, ep);
if ((ep == NULL) || (ep->udc == NULL)) {
- ERR(" *** %s, ep == NULL !!\n", __func__);
+ dev_err(udc->dev," *** %s, ep == NULL !!\n", __func__);
return -EINVAL;
}
@@ -2742,10 +2742,10 @@ static int nbu2ss_ep_queue(
/* catch various bogus parameters */
if ((_ep == NULL) || (_req == NULL)) {
if (_ep == NULL)
- ERR("*** %s --- _ep == NULL\n", __func__);
+ dev_err(udc->dev,"*** %s --- _ep == NULL\n", __func__);
if (_req == NULL)
- ERR("*** %s --- _req == NULL\n", __func__);
+ dev_err(udc->dev,"*** %s --- _req == NULL\n", __func__);
return -EINVAL;
}
@@ -2756,13 +2756,13 @@ static int nbu2ss_ep_queue(
|| !list_empty(&req->queue))) {
if (!_req->complete)
- ERR("*** %s --- !_req->complete\n", __func__);
+ dev_err(udc->dev,"*** %s --- !_req->complete\n", __func__);
if (!_req->buf)
- ERR("*** %s --- !_req->buf\n", __func__);
+ dev_err(udc->dev,"*** %s --- !_req->buf\n", __func__);
if (!list_empty(&req->queue))
- ERR("*** %s --- !list_empty(&req->queue)\n", __func__);
+ dev_err(udc->dev,"*** %s --- !list_empty(&req->queue)\n", __func__);
return -EINVAL;
}
@@ -2778,7 +2778,7 @@ static int nbu2ss_ep_queue(
}
if (unlikely(!udc->driver)) {
- ERR("%s, bogus device state %p\n", __func__, udc->driver);
+ dev_err(udc->dev,"%s, bogus device state %p\n", __func__, udc->driver);
return -ESHUTDOWN;
}
@@ -2817,7 +2817,7 @@ static int nbu2ss_ep_queue(
result = _nbu2ss_start_transfer(udc, ep, req, FALSE);
if (result < 0) {
- ERR(" *** %s, result = %d\n", __func__, result);
+ dev_err(udc->dev," *** %s, result = %d\n", __func__, result);
list_del(&req->queue);
} else if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT)) {
#ifdef USE_DMA
@@ -2849,13 +2849,13 @@ static int nbu2ss_ep_dequeue(
/* catch various bogus parameters */
if ((_ep == NULL) || (_req == NULL)) {
- /* ERR("%s, bad param(1)\n", __func__); */
+ /* dev_err(udc->dev,"%s, bad param(1)\n", __func__); */
return -EINVAL;
}
ep = container_of(_ep, struct nbu2ss_ep, ep);
if (!ep) {
- ERR("%s, ep == NULL !!\n", __func__);
+ dev_err(udc->dev,"%s, ep == NULL !!\n", __func__);
return -EINVAL;
}
@@ -2895,19 +2895,19 @@ static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value)
/* INFO("=== %s()\n", __func__); */
if (!_ep) {
- ERR("%s, bad param\n", __func__);
+ dev_err(udc->dev,"%s, bad param\n", __func__);
return -EINVAL;
}
ep = container_of(_ep, struct nbu2ss_ep, ep);
if (!ep) {
- ERR("%s, bad ep\n", __func__);
+ dev_err(udc->dev,"%s, bad ep\n", __func__);
return -EINVAL;
}
udc = ep->udc;
if (!udc) {
- ERR(" *** %s, bad udc\n", __func__);
+ dev_err(udc->dev," *** %s, bad udc\n", __func__);
return -EINVAL;
}
@@ -2949,19 +2949,19 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
/* INFO("=== %s()\n", __func__); */
if (!_ep) {
- ERR("%s, bad param\n", __func__);
+ dev_err(udc->dev,"%s, bad param\n", __func__);
return -EINVAL;
}
ep = container_of(_ep, struct nbu2ss_ep, ep);
if (!ep) {
- ERR("%s, bad ep\n", __func__);
+ dev_err(udc->dev,"%s, bad ep\n", __func__);
return -EINVAL;
}
udc = ep->udc;
if (!udc) {
- ERR("%s, bad udc\n", __func__);
+ dev_err(udc->dev,"%s, bad udc\n", __func__);
return -EINVAL;
}
@@ -2997,19 +2997,19 @@ static void nbu2ss_ep_fifo_flush(struct usb_ep *_ep)
/* INFO("=== %s()\n", __func__); */
if (!_ep) {
- ERR("%s, bad param\n", __func__);
+ dev_err(udc->dev,"%s, bad param\n", __func__);
return;
}
ep = container_of(_ep, struct nbu2ss_ep, ep);
if (!_ep) {
- ERR("%s, bad ep\n", __func__);
+ dev_err(udc->dev,"%s, bad ep\n", __func__);
return;
}
udc = ep->udc;
if (!udc) {
- ERR("%s, bad udc\n", __func__);
+ dev_err(udc->dev,"%s, bad udc\n", __func__);
return;
}
@@ -3053,13 +3053,13 @@ static int nbu2ss_gad_get_frame(struct usb_gadget *pgadget)
/* INFO("=== %s()\n", __func__); */
if (pgadget == NULL) {
- ERR("%s, bad param\n", __func__);
+ dev_err(udc->dev,"%s, bad param\n", __func__);
return -EINVAL;
}
udc = container_of(pgadget, struct nbu2ss_udc, gadget);
if (udc == NULL) {
- ERR("%s, udc == NULL\n", __func__);
+ dev_err(udc->dev,"%s, udc == NULL\n", __func__);
return -EINVAL;
}
@@ -3083,13 +3083,13 @@ static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget)
/* INFO("=== %s()\n", __func__); */
if (pgadget == NULL) {
- ERR("%s, bad param\n", __func__);
+ dev_err(udc->dev,"%s, bad param\n", __func__);
return -EINVAL;
}
udc = container_of(pgadget, struct nbu2ss_udc, gadget);
if (udc == NULL) {
- ERR("%s, udc == NULL\n", __func__);
+ dev_err(udc->dev,"%s, udc == NULL\n", __func__);
return -EINVAL;
}
@@ -3123,7 +3123,7 @@ static int nbu2ss_gad_set_selfpowered(struct usb_gadget *pgadget,
/* INFO("=== %s()\n", __func__); */
if (pgadget == NULL) {
- ERR("%s, bad param\n", __func__);
+ dev_err(udc->dev,"%s, bad param\n", __func__);
return -EINVAL;
}
@@ -3152,7 +3152,7 @@ static int nbu2ss_gad_vbus_draw(struct usb_gadget *pgadget, unsigned mA)
/* INFO("=== %s()\n", __func__); */
if (pgadget == NULL) {
- ERR("%s, bad param\n", __func__);
+ dev_err(udc->dev,"%s, bad param\n", __func__);
return -EINVAL;
}
@@ -3174,7 +3174,7 @@ static int nbu2ss_gad_pullup(struct usb_gadget *pgadget, int is_on)
/* INFO("=== %s()\n", __func__); */
if (pgadget == NULL) {
- ERR("%s, bad param\n", __func__);
+ dev_err(udc->dev,"%s, bad param\n", __func__);
return -EINVAL;
}
@@ -3369,7 +3369,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
/* USB Function Controller Interrupt */
if (status != 0) {
- ERR("request_irq(USB_UDC_IRQ_1) failed\n");
+ dev_err(udc->dev,"request_irq(USB_UDC_IRQ_1) failed\n");
goto cleanup1;
}
@@ -3389,7 +3389,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
udc);
if (status != 0) {
- ERR("request_irq(INT_VBUS) failed\n");
+ dev_err(udc->dev,"request_irq(INT_VBUS) failed\n");
goto cleanup1;
}
--
2.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] staging: emxx_udc: remove macro ERR
2015-01-21 22:53 [PATCH 0/2] Replacing ERR by dev_err Ahmad Hassan
2015-01-21 22:55 ` [PATCH 1/2] staging: emxx_udc: Replace " Ahmad Hassan
@ 2015-01-21 22:56 ` Ahmad Hassan
2015-01-21 14:02 ` Tobias Klauser
1 sibling, 1 reply; 5+ messages in thread
From: Ahmad Hassan @ 2015-01-21 22:56 UTC (permalink / raw)
To: devel
Cc: gregkh, vinc94, roberta.dobrescu, sachin.kamat, ebru.akagunduz,
damm+renesas, linux-kernel
Removed ERR macro since it is not used anymore in the emxx_udc.c file.
Signed-off-by: Ahmad Hassan <ahmad.hassan612@gmail.com>
---
drivers/staging/emxx_udc/emxx_udc.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/emxx_udc/emxx_udc.h b/drivers/staging/emxx_udc/emxx_udc.h
index ee1b80d..0758cd5 100644
--- a/drivers/staging/emxx_udc/emxx_udc.h
+++ b/drivers/staging/emxx_udc/emxx_udc.h
@@ -644,6 +644,5 @@ typedef volatile union {
} USB_REG_ACCESS;
/*-------------------------------------------------------------------------*/
-#define ERR(stuff...) printk(KERN_ERR "udc: " stuff)
#endif /* _LINUX_EMXX_H */
--
2.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-21 14:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 22:53 [PATCH 0/2] Replacing ERR by dev_err Ahmad Hassan
2015-01-21 22:55 ` [PATCH 1/2] staging: emxx_udc: Replace " Ahmad Hassan
2015-01-21 12:46 ` Jeremiah Mahler
2015-01-21 22:56 ` [PATCH 2/2] staging: emxx_udc: remove macro ERR Ahmad Hassan
2015-01-21 14:02 ` Tobias Klauser
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.