staging: vt6656: use 0 in test for successful urb status
PATCH 1/1 staging: vt6656: use 0 in test for successful urb status
Replace STATUS_SUCCESS with 0 in urb->status test.
Successful usb status is simply 0. STATUS_SUCCESS is defined for NDIS status in this driver, but was being misused in this case.
--- drivers/staging/vt6656/usbpipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6656/usbpipe.c +1 -1
@@ -116,7 +116,7 @@ static void vnt_start_interrupt_urb_complete(struct urb *urb)break ; } -if (status !=STATUS_SUCCESS ) { +if (status !=0 ) { priv->int_buf.in_use = false;dev_dbg (&priv->usb->dev,"%s status = %d\n" , __func__, status);
Signature · 1 line
2.1.4
Quoted 4 lines · Alison Schofield
Replace
STATUS_SUCCESSwith 0 inurb->statustest.Successful usb status is simply 0.
STATUS_SUCCESSis defined for NDIS status in this driver, but was being misused in this case.
Maybe if (status) would be more normal.
julia
Quoted 28 lines
Signed-off-by Alison Schofield <[email protected]>--- drivers/staging/vt6656/usbpipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/vt6656/usbpipe.c +1
-2@@ -116,7 +116,7 @@ static void vnt_start_interrupt_urb_complete(struct urb *urb)break ; } -if (status !=STATUS_SUCCESS ) { +if (status !=0 ) { priv->int_buf.in_use = false;dev_dbg (&priv->usb->dev,"%s status = %d\n" , __func__, status); --2.1.4
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160217170915.GA4387%40d830.WORKGROUP.
For more options, visit https://groups.google.com/d/optout.
Quoted 10 lines · Julia Lawall
Quoted 4 lines · Alison Schofield
Replace
STATUS_SUCCESSwith 0 inurb->statustest.Successful usb status is simply 0.
STATUS_SUCCESSis defined for NDIS status in this driver, but was being misused in this case.Maybe if (status) would be more normal.
got it..making it more normal, and propogating to one other instance in file.
Quoted 31 lines
julia
Quoted 28 lines
Signed-off-by Alison Schofield <[email protected]>--- drivers/staging/vt6656/usbpipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/vt6656/usbpipe.c +1
-2@@ -116,7 +116,7 @@ static void vnt_start_interrupt_urb_complete(struct urb *urb)break ; } -if (status !=STATUS_SUCCESS ) { +if (status !=0 ) { priv->int_buf.in_use = false;dev_dbg (&priv->usb->dev,"%s status = %d\n" , __func__, status); --2.1.4
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160217170915.GA4387%40d830.WORKGROUP.
For more options, visit https://groups.google.com/d/optout.
PATCH v2 1/1 staging: vt6656: simplify tests of successful urb status
In reply to Alison SchofieldUse if (status) in tests for successful urb status.
This replaces (status != 0) and (status == STATUS_SUCCESS). (STATUS_SUCCESS is defined for NDIS status in this driver, but was being misused)
---
Changes in v2:
- replace if (status !=0) with if (status)
- propogate change in two more instances
- update commit msg & changelog
drivers/staging/vt6656/usbpipe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6656/usbpipe.c +3 -3
@@ -116,7 +116,7 @@ static void vnt_start_interrupt_urb_complete(struct urb *urb)break ; } -if (status !=STATUS_SUCCESS ) { +if (status) { priv->int_buf.in_use = false;dev_dbg (&priv->usb->dev,"%s status = %d\n" , __func__, status);
@@ -221,7 +221,7 @@ int vnt_submit_rx_urb(struct vnt_private *priv, struct vnt_rcb *rcb) rcb); status =usb_submit_urb (urb,GFP_ATOMIC ); -if (status !=0 ) { +if (status) {dev_dbg (&priv->usb->dev,"Submit Rx URB failed %d\n" , status);return STATUS_FAILURE ; }
@@ -282,7 +282,7 @@ int vnt_tx_context(struct vnt_private *priv, context); status =usb_submit_urb (urb,GFP_ATOMIC ); -if (status !=0 ) { +if (status) {dev_dbg (&priv->usb->dev,"Submit Tx URB failed %d\n" , status); context->in_use = false;
Signature · 1 line
2.1.4