[PATCH 06/11] net/can/mscan: drop assignment in while-construct
Wolfram Sang
w.sang at pengutronix.de
Tue Nov 17 09:57:49 EST 2009
As suggested by Wolfgang Grandegger.
Signed-off-by: Wolfram Sang <w.sang at pengutronix.de>
---
drivers/net/can/mscan/mscan.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c
index 76e413e..20d1991 100644
--- a/drivers/net/can/mscan/mscan.c
+++ b/drivers/net/can/mscan/mscan.c
@@ -379,8 +379,10 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota)
struct can_frame *frame;
u8 canrflg;
- while (npackets < quota && ((canrflg = in_8(®s->canrflg)) &
- (MSCAN_RXF | MSCAN_ERR_IF))) {
+ while (npackets < quota) {
+ canrflg = in_8(®s->canrflg);
+ if (!(canrflg & (MSCAN_RXF | MSCAN_ERR_IF)))
+ break;
skb = alloc_can_skb(dev, &frame);
if (!skb) {
--
1.6.3.3
More information about the Linuxppc-dev
mailing list