From: David Binder <david.binder@xxxxxxxxxx> Changes return statements in visornic_rx() to use literals instead of a variable. Also changes function description to reflect the correct return type. Signed-off-by: David Binder <david.binder@xxxxxxxxxx> Signed-off-by: David Kershner <david.kershner@xxxxxxxxxx> --- drivers/staging/unisys/visornic/visornic_main.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index 9a95c67..8dac2a2 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -1120,7 +1120,7 @@ repost_return(struct uiscmdrsp *cmdrsp, struct visornic_devdata *devdata, * * Got a receive packet back from the IO Part, handle it and send * it up the stack. - * Returns void + * Returns 1 iff an skb was receieved, otherwise 0 */ static int visornic_rx(struct uiscmdrsp *cmdrsp) @@ -1131,7 +1131,6 @@ visornic_rx(struct uiscmdrsp *cmdrsp) int cc, currsize, off; struct ethhdr *eth; unsigned long flags; - int rx_count = 0; /* post new rcv buf to the other end using the cmdrsp we have at hand * post it without holding lock - but we'll use the signal lock to @@ -1163,7 +1162,7 @@ visornic_rx(struct uiscmdrsp *cmdrsp) */ spin_unlock_irqrestore(&devdata->priv_lock, flags); repost_return(cmdrsp, devdata, skb, netdev); - return rx_count; + return 0; } spin_unlock_irqrestore(&devdata->priv_lock, flags); @@ -1182,7 +1181,7 @@ visornic_rx(struct uiscmdrsp *cmdrsp) if (repost_return(cmdrsp, devdata, skb, netdev) < 0) dev_err(&devdata->netdev->dev, "repost_return failed"); - return rx_count; + return 0; } /* length rcvd is greater than firstfrag in this skb rcv buf */ skb->tail += RCVPOST_BUF_SIZE; /* amount in skb->data */ @@ -1198,7 +1197,7 @@ visornic_rx(struct uiscmdrsp *cmdrsp) if (repost_return(cmdrsp, devdata, skb, netdev) < 0) dev_err(&devdata->netdev->dev, "repost_return failed"); - return rx_count; + return 0; } skb->tail += skb->len; skb->data_len = 0; /* nothing rcvd in frag_list */ @@ -1217,7 +1216,7 @@ visornic_rx(struct uiscmdrsp *cmdrsp) if (cmdrsp->net.rcv.rcvbuf[0] != skb) { if (repost_return(cmdrsp, devdata, skb, netdev) < 0) dev_err(&devdata->netdev->dev, "repost_return failed"); - return rx_count; + return 0; } if (cmdrsp->net.rcv.numrcvbufs > 1) { @@ -1299,10 +1298,9 @@ visornic_rx(struct uiscmdrsp *cmdrsp) /* drop packet - don't forward it up to OS */ devdata->n_rcv_packets_not_accepted++; repost_return(cmdrsp, devdata, skb, netdev); - return rx_count; + return 0; } while (0); - rx_count++; netif_receive_skb(skb); /* netif_rx returns various values, but "in practice most drivers * ignore the return value @@ -1315,7 +1313,7 @@ visornic_rx(struct uiscmdrsp *cmdrsp) * new rcv buffer. */ repost_return(cmdrsp, devdata, skb, netdev); - return rx_count; + return 1; } /** -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel