* [PATCH] staging: vt6656: use 0 in test for successful urb status
@ 2016-02-17 17:09 Alison Schofield
2016-02-17 17:13 ` [Outreachy kernel] " Julia Lawall
2016-02-17 17:45 ` [PATCH v2] staging: vt6656: simplify tests of " Alison Schofield
0 siblings, 2 replies; 4+ messages in thread
From: Alison Schofield @ 2016-02-17 17:09 UTC (permalink / raw)
To: outreachy-kernel
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.
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
---
drivers/staging/vt6656/usbpipe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index f27eb9a..5551b4f 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: use 0 in test for successful urb status
2016-02-17 17:09 [PATCH] staging: vt6656: use 0 in test for successful urb status Alison Schofield
@ 2016-02-17 17:13 ` Julia Lawall
2016-02-17 17:23 ` Alison Schofield
2016-02-17 17:45 ` [PATCH v2] staging: vt6656: simplify tests of " Alison Schofield
1 sibling, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2016-02-17 17:13 UTC (permalink / raw)
To: Alison Schofield; +Cc: outreachy-kernel
On Wed, 17 Feb 2016, Alison Schofield wrote:
> 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.
Maybe if (status) would be more normal.
julia
> Signed-off-by: Alison Schofield <amsfield22@gmail.com>
> ---
> drivers/staging/vt6656/usbpipe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
> index f27eb9a..5551b4f 100644
> --- a/drivers/staging/vt6656/usbpipe.c
> +++ b/drivers/staging/vt6656/usbpipe.c
> @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> 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.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: vt6656: use 0 in test for successful urb status
2016-02-17 17:13 ` [Outreachy kernel] " Julia Lawall
@ 2016-02-17 17:23 ` Alison Schofield
0 siblings, 0 replies; 4+ messages in thread
From: Alison Schofield @ 2016-02-17 17:23 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel
On Wed, Feb 17, 2016 at 12:13:18PM -0500, Julia Lawall wrote:
>
>
> On Wed, 17 Feb 2016, Alison Schofield wrote:
>
> > 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.
>
> Maybe if (status) would be more normal.
got it..making it more normal, and propogating to one other instance in file.
>
> julia
>
> > Signed-off-by: Alison Schofield <amsfield22@gmail.com>
> > ---
> > drivers/staging/vt6656/usbpipe.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
> > index f27eb9a..5551b4f 100644
> > --- a/drivers/staging/vt6656/usbpipe.c
> > +++ b/drivers/staging/vt6656/usbpipe.c
> > @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > 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.
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] staging: vt6656: simplify tests of successful urb status
2016-02-17 17:09 [PATCH] staging: vt6656: use 0 in test for successful urb status Alison Schofield
2016-02-17 17:13 ` [Outreachy kernel] " Julia Lawall
@ 2016-02-17 17:45 ` Alison Schofield
1 sibling, 0 replies; 4+ messages in thread
From: Alison Schofield @ 2016-02-17 17:45 UTC (permalink / raw)
To: outreachy-kernel
Use 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)
Signed-off-by: Alison Schofield <amsfield22@gmail.com>
---
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(-)
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index f27eb9a..f546553 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -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;
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-17 17:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-17 17:09 [PATCH] staging: vt6656: use 0 in test for successful urb status Alison Schofield
2016-02-17 17:13 ` [Outreachy kernel] " Julia Lawall
2016-02-17 17:23 ` Alison Schofield
2016-02-17 17:45 ` [PATCH v2] staging: vt6656: simplify tests of " Alison Schofield
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.