diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/bluetooth/hci_vhci.c | 2 | ||||
-rw-r--r-- | drivers/isdn/hisax/isdnl1.c | 3 | ||||
-rw-r--r-- | drivers/isdn/hisax/isdnl2.c | 17 | ||||
-rw-r--r-- | drivers/isdn/hisax/isdnl3.c | 2 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_tty.c | 4 | ||||
-rw-r--r-- | drivers/isdn/icn/icn.c | 4 | ||||
-rw-r--r-- | drivers/net/hamradio/scc.c | 5 | ||||
-rw-r--r-- | drivers/net/ppp_async.c | 2 | ||||
-rw-r--r-- | drivers/net/ppp_generic.c | 12 | ||||
-rw-r--r-- | drivers/net/ppp_synctty.c | 2 | ||||
-rw-r--r-- | drivers/net/tun.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/airo.c | 4 | ||||
-rw-r--r-- | drivers/s390/net/claw.c | 4 | ||||
-rw-r--r-- | drivers/s390/net/ctctty.c | 6 | ||||
-rw-r--r-- | drivers/usb/net/usbnet.c | 6 |
15 files changed, 38 insertions, 37 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 3256192dcde8..f9b956fb2b8b 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
@@ -120,7 +120,7 @@ static unsigned int hci_vhci_chr_poll(struct file *file, poll_table * wait) | |||
120 | 120 | ||
121 | poll_wait(file, &hci_vhci->read_wait, wait); | 121 | poll_wait(file, &hci_vhci->read_wait, wait); |
122 | 122 | ||
123 | if (skb_queue_len(&hci_vhci->readq)) | 123 | if (!skb_queue_empty(&hci_vhci->readq)) |
124 | return POLLIN | POLLRDNORM; | 124 | return POLLIN | POLLRDNORM; |
125 | 125 | ||
126 | return POLLOUT | POLLWRNORM; | 126 | return POLLOUT | POLLWRNORM; |
diff --git a/drivers/isdn/hisax/isdnl1.c b/drivers/isdn/hisax/isdnl1.c index ac899503a74f..bab356886483 100644 --- a/drivers/isdn/hisax/isdnl1.c +++ b/drivers/isdn/hisax/isdnl1.c | |||
@@ -279,7 +279,8 @@ BChannel_proc_xmt(struct BCState *bcs) | |||
279 | if (test_and_clear_bit(FLG_L1_PULL_REQ, &st->l1.Flags)) | 279 | if (test_and_clear_bit(FLG_L1_PULL_REQ, &st->l1.Flags)) |
280 | st->l1.l1l2(st, PH_PULL | CONFIRM, NULL); | 280 | st->l1.l1l2(st, PH_PULL | CONFIRM, NULL); |
281 | if (!test_bit(BC_FLG_ACTIV, &bcs->Flag)) { | 281 | if (!test_bit(BC_FLG_ACTIV, &bcs->Flag)) { |
282 | if (!test_bit(BC_FLG_BUSY, &bcs->Flag) && (!skb_queue_len(&bcs->squeue))) { | 282 | if (!test_bit(BC_FLG_BUSY, &bcs->Flag) && |
283 | skb_queue_empty(&bcs->squeue)) { | ||
283 | st->l2.l2l1(st, PH_DEACTIVATE | CONFIRM, NULL); | 284 | st->l2.l2l1(st, PH_DEACTIVATE | CONFIRM, NULL); |
284 | } | 285 | } |
285 | } | 286 | } |
diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c index 9022583fd6a0..1615c1a76ab8 100644 --- a/drivers/isdn/hisax/isdnl2.c +++ b/drivers/isdn/hisax/isdnl2.c | |||
@@ -108,7 +108,8 @@ static int l2addrsize(struct Layer2 *l2); | |||
108 | static void | 108 | static void |
109 | set_peer_busy(struct Layer2 *l2) { | 109 | set_peer_busy(struct Layer2 *l2) { |
110 | test_and_set_bit(FLG_PEER_BUSY, &l2->flag); | 110 | test_and_set_bit(FLG_PEER_BUSY, &l2->flag); |
111 | if (skb_queue_len(&l2->i_queue) || skb_queue_len(&l2->ui_queue)) | 111 | if (!skb_queue_empty(&l2->i_queue) || |
112 | !skb_queue_empty(&l2->ui_queue)) | ||
112 | test_and_set_bit(FLG_L2BLOCK, &l2->flag); | 113 | test_and_set_bit(FLG_L2BLOCK, &l2->flag); |
113 | } | 114 | } |
114 | 115 | ||
@@ -754,7 +755,7 @@ l2_restart_multi(struct FsmInst *fi, int event, void *arg) | |||
754 | st->l2.l2l3(st, DL_ESTABLISH | INDICATION, NULL); | 755 | st->l2.l2l3(st, DL_ESTABLISH | INDICATION, NULL); |
755 | 756 | ||
756 | if ((ST_L2_7==state) || (ST_L2_8 == state)) | 757 | if ((ST_L2_7==state) || (ST_L2_8 == state)) |
757 | if (skb_queue_len(&st->l2.i_queue) && cansend(st)) | 758 | if (!skb_queue_empty(&st->l2.i_queue) && cansend(st)) |
758 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 759 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
759 | } | 760 | } |
760 | 761 | ||
@@ -810,7 +811,7 @@ l2_connected(struct FsmInst *fi, int event, void *arg) | |||
810 | if (pr != -1) | 811 | if (pr != -1) |
811 | st->l2.l2l3(st, pr, NULL); | 812 | st->l2.l2l3(st, pr, NULL); |
812 | 813 | ||
813 | if (skb_queue_len(&st->l2.i_queue) && cansend(st)) | 814 | if (!skb_queue_empty(&st->l2.i_queue) && cansend(st)) |
814 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 815 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
815 | } | 816 | } |
816 | 817 | ||
@@ -1014,7 +1015,7 @@ l2_st7_got_super(struct FsmInst *fi, int event, void *arg) | |||
1014 | if(typ != RR) FsmDelTimer(&st->l2.t203, 9); | 1015 | if(typ != RR) FsmDelTimer(&st->l2.t203, 9); |
1015 | restart_t200(st, 12); | 1016 | restart_t200(st, 12); |
1016 | } | 1017 | } |
1017 | if (skb_queue_len(&st->l2.i_queue) && (typ == RR)) | 1018 | if (!skb_queue_empty(&st->l2.i_queue) && (typ == RR)) |
1018 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 1019 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
1019 | } else | 1020 | } else |
1020 | nrerrorrecovery(fi); | 1021 | nrerrorrecovery(fi); |
@@ -1120,7 +1121,7 @@ l2_got_iframe(struct FsmInst *fi, int event, void *arg) | |||
1120 | return; | 1121 | return; |
1121 | } | 1122 | } |
1122 | 1123 | ||
1123 | if (skb_queue_len(&st->l2.i_queue) && (fi->state == ST_L2_7)) | 1124 | if (!skb_queue_empty(&st->l2.i_queue) && (fi->state == ST_L2_7)) |
1124 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 1125 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
1125 | if (test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag)) | 1126 | if (test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag)) |
1126 | enquiry_cr(st, RR, RSP, 0); | 1127 | enquiry_cr(st, RR, RSP, 0); |
@@ -1138,7 +1139,7 @@ l2_got_tei(struct FsmInst *fi, int event, void *arg) | |||
1138 | test_and_set_bit(FLG_L3_INIT, &st->l2.flag); | 1139 | test_and_set_bit(FLG_L3_INIT, &st->l2.flag); |
1139 | } else | 1140 | } else |
1140 | FsmChangeState(fi, ST_L2_4); | 1141 | FsmChangeState(fi, ST_L2_4); |
1141 | if (skb_queue_len(&st->l2.ui_queue)) | 1142 | if (!skb_queue_empty(&st->l2.ui_queue)) |
1142 | tx_ui(st); | 1143 | tx_ui(st); |
1143 | } | 1144 | } |
1144 | 1145 | ||
@@ -1301,7 +1302,7 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg) | |||
1301 | FsmDelTimer(&st->l2.t203, 13); | 1302 | FsmDelTimer(&st->l2.t203, 13); |
1302 | FsmAddTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, 11); | 1303 | FsmAddTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, 11); |
1303 | } | 1304 | } |
1304 | if (skb_queue_len(&l2->i_queue) && cansend(st)) | 1305 | if (!skb_queue_empty(&l2->i_queue) && cansend(st)) |
1305 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 1306 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
1306 | } | 1307 | } |
1307 | 1308 | ||
@@ -1347,7 +1348,7 @@ l2_st8_got_super(struct FsmInst *fi, int event, void *arg) | |||
1347 | } | 1348 | } |
1348 | invoke_retransmission(st, nr); | 1349 | invoke_retransmission(st, nr); |
1349 | FsmChangeState(fi, ST_L2_7); | 1350 | FsmChangeState(fi, ST_L2_7); |
1350 | if (skb_queue_len(&l2->i_queue) && cansend(st)) | 1351 | if (!skb_queue_empty(&l2->i_queue) && cansend(st)) |
1351 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 1352 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
1352 | } else | 1353 | } else |
1353 | nrerrorrecovery(fi); | 1354 | nrerrorrecovery(fi); |
diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c index abcc9530eb34..c9917cd2132b 100644 --- a/drivers/isdn/hisax/isdnl3.c +++ b/drivers/isdn/hisax/isdnl3.c | |||
@@ -302,7 +302,7 @@ release_l3_process(struct l3_process *p) | |||
302 | !test_bit(FLG_PTP, &p->st->l2.flag)) { | 302 | !test_bit(FLG_PTP, &p->st->l2.flag)) { |
303 | if (p->debug) | 303 | if (p->debug) |
304 | l3_debug(p->st, "release_l3_process: last process"); | 304 | l3_debug(p->st, "release_l3_process: last process"); |
305 | if (!skb_queue_len(&p->st->l3.squeue)) { | 305 | if (skb_queue_empty(&p->st->l3.squeue)) { |
306 | if (p->debug) | 306 | if (p->debug) |
307 | l3_debug(p->st, "release_l3_process: release link"); | 307 | l3_debug(p->st, "release_l3_process: release link"); |
308 | if (p->st->protocol != ISDN_PTYPE_NI1) | 308 | if (p->st->protocol != ISDN_PTYPE_NI1) |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index ad5aa38fb5a6..b37ef1f06b3d 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -1223,7 +1223,7 @@ isdn_tty_write(struct tty_struct *tty, const u_char * buf, int count) | |||
1223 | total += c; | 1223 | total += c; |
1224 | } | 1224 | } |
1225 | atomic_dec(&info->xmit_lock); | 1225 | atomic_dec(&info->xmit_lock); |
1226 | if ((info->xmit_count) || (skb_queue_len(&info->xmit_queue))) { | 1226 | if ((info->xmit_count) || !skb_queue_empty(&info->xmit_queue)) { |
1227 | if (m->mdmreg[REG_DXMT] & BIT_DXMT) { | 1227 | if (m->mdmreg[REG_DXMT] & BIT_DXMT) { |
1228 | isdn_tty_senddown(info); | 1228 | isdn_tty_senddown(info); |
1229 | isdn_tty_tint(info); | 1229 | isdn_tty_tint(info); |
@@ -1284,7 +1284,7 @@ isdn_tty_flush_chars(struct tty_struct *tty) | |||
1284 | 1284 | ||
1285 | if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_flush_chars")) | 1285 | if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_flush_chars")) |
1286 | return; | 1286 | return; |
1287 | if ((info->xmit_count) || (skb_queue_len(&info->xmit_queue))) | 1287 | if ((info->xmit_count) || !skb_queue_empty(&info->xmit_queue)) |
1288 | isdn_timer_ctrl(ISDN_TIMER_MODEMXMIT, 1); | 1288 | isdn_timer_ctrl(ISDN_TIMER_MODEMXMIT, 1); |
1289 | } | 1289 | } |
1290 | 1290 | ||
diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c index 9fc0c1e03732..e0d1b01cc74c 100644 --- a/drivers/isdn/icn/icn.c +++ b/drivers/isdn/icn/icn.c | |||
@@ -304,12 +304,12 @@ icn_pollbchan_send(int channel, icn_card * card) | |||
304 | isdn_ctrl cmd; | 304 | isdn_ctrl cmd; |
305 | 305 | ||
306 | if (!(card->sndcount[channel] || card->xskb[channel] || | 306 | if (!(card->sndcount[channel] || card->xskb[channel] || |
307 | skb_queue_len(&card->spqueue[channel]))) | 307 | !skb_queue_empty(&card->spqueue[channel]))) |
308 | return; | 308 | return; |
309 | if (icn_trymaplock_channel(card, mch)) { | 309 | if (icn_trymaplock_channel(card, mch)) { |
310 | while (sbfree && | 310 | while (sbfree && |
311 | (card->sndcount[channel] || | 311 | (card->sndcount[channel] || |
312 | skb_queue_len(&card->spqueue[channel]) || | 312 | !skb_queue_empty(&card->spqueue[channel]) || |
313 | card->xskb[channel])) { | 313 | card->xskb[channel])) { |
314 | spin_lock_irqsave(&card->lock, flags); | 314 | spin_lock_irqsave(&card->lock, flags); |
315 | if (card->xmit_lock[channel]) { | 315 | if (card->xmit_lock[channel]) { |
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index ece1b1a13186..c27e417f32bf 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c | |||
@@ -304,7 +304,7 @@ static inline void scc_discard_buffers(struct scc_channel *scc) | |||
304 | scc->tx_buff = NULL; | 304 | scc->tx_buff = NULL; |
305 | } | 305 | } |
306 | 306 | ||
307 | while (skb_queue_len(&scc->tx_queue)) | 307 | while (!skb_queue_empty(&scc->tx_queue)) |
308 | dev_kfree_skb(skb_dequeue(&scc->tx_queue)); | 308 | dev_kfree_skb(skb_dequeue(&scc->tx_queue)); |
309 | 309 | ||
310 | spin_unlock_irqrestore(&scc->lock, flags); | 310 | spin_unlock_irqrestore(&scc->lock, flags); |
@@ -1126,8 +1126,7 @@ static void t_dwait(unsigned long channel) | |||
1126 | 1126 | ||
1127 | if (scc->stat.tx_state == TXS_WAIT) /* maxkeyup or idle timeout */ | 1127 | if (scc->stat.tx_state == TXS_WAIT) /* maxkeyup or idle timeout */ |
1128 | { | 1128 | { |
1129 | if (skb_queue_len(&scc->tx_queue) == 0) /* nothing to send */ | 1129 | if (skb_queue_empty(&scc->tx_queue)) { /* nothing to send */ |
1130 | { | ||
1131 | scc->stat.tx_state = TXS_IDLE; | 1130 | scc->stat.tx_state = TXS_IDLE; |
1132 | netif_wake_queue(scc->dev); /* t_maxkeyup locked it. */ | 1131 | netif_wake_queue(scc->dev); /* t_maxkeyup locked it. */ |
1133 | return; | 1132 | return; |
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index 5e48b9ab3045..59e8183c639e 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c | |||
@@ -364,7 +364,7 @@ ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf, | |||
364 | spin_lock_irqsave(&ap->recv_lock, flags); | 364 | spin_lock_irqsave(&ap->recv_lock, flags); |
365 | ppp_async_input(ap, buf, cflags, count); | 365 | ppp_async_input(ap, buf, cflags, count); |
366 | spin_unlock_irqrestore(&ap->recv_lock, flags); | 366 | spin_unlock_irqrestore(&ap->recv_lock, flags); |
367 | if (skb_queue_len(&ap->rqueue)) | 367 | if (!skb_queue_empty(&ap->rqueue)) |
368 | tasklet_schedule(&ap->tsk); | 368 | tasklet_schedule(&ap->tsk); |
369 | ap_put(ap); | 369 | ap_put(ap); |
370 | if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) | 370 | if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) |
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index ab726ab43798..a32668e88e09 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -1237,8 +1237,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) | |||
1237 | pch = list_entry(list, struct channel, clist); | 1237 | pch = list_entry(list, struct channel, clist); |
1238 | navail += pch->avail = (pch->chan != NULL); | 1238 | navail += pch->avail = (pch->chan != NULL); |
1239 | if (pch->avail) { | 1239 | if (pch->avail) { |
1240 | if (skb_queue_len(&pch->file.xq) == 0 | 1240 | if (skb_queue_empty(&pch->file.xq) || |
1241 | || !pch->had_frag) { | 1241 | !pch->had_frag) { |
1242 | pch->avail = 2; | 1242 | pch->avail = 2; |
1243 | ++nfree; | 1243 | ++nfree; |
1244 | } | 1244 | } |
@@ -1374,8 +1374,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) | |||
1374 | 1374 | ||
1375 | /* try to send it down the channel */ | 1375 | /* try to send it down the channel */ |
1376 | chan = pch->chan; | 1376 | chan = pch->chan; |
1377 | if (skb_queue_len(&pch->file.xq) | 1377 | if (!skb_queue_empty(&pch->file.xq) || |
1378 | || !chan->ops->start_xmit(chan, frag)) | 1378 | !chan->ops->start_xmit(chan, frag)) |
1379 | skb_queue_tail(&pch->file.xq, frag); | 1379 | skb_queue_tail(&pch->file.xq, frag); |
1380 | pch->had_frag = 1; | 1380 | pch->had_frag = 1; |
1381 | p += flen; | 1381 | p += flen; |
@@ -1412,7 +1412,7 @@ ppp_channel_push(struct channel *pch) | |||
1412 | 1412 | ||
1413 | spin_lock_bh(&pch->downl); | 1413 | spin_lock_bh(&pch->downl); |
1414 | if (pch->chan != 0) { | 1414 | if (pch->chan != 0) { |
1415 | while (skb_queue_len(&pch->file.xq) > 0) { | 1415 | while (!skb_queue_empty(&pch->file.xq)) { |
1416 | skb = skb_dequeue(&pch->file.xq); | 1416 | skb = skb_dequeue(&pch->file.xq); |
1417 | if (!pch->chan->ops->start_xmit(pch->chan, skb)) { | 1417 | if (!pch->chan->ops->start_xmit(pch->chan, skb)) { |
1418 | /* put the packet back and try again later */ | 1418 | /* put the packet back and try again later */ |
@@ -1426,7 +1426,7 @@ ppp_channel_push(struct channel *pch) | |||
1426 | } | 1426 | } |
1427 | spin_unlock_bh(&pch->downl); | 1427 | spin_unlock_bh(&pch->downl); |
1428 | /* see if there is anything from the attached unit to be sent */ | 1428 | /* see if there is anything from the attached unit to be sent */ |
1429 | if (skb_queue_len(&pch->file.xq) == 0) { | 1429 | if (skb_queue_empty(&pch->file.xq)) { |
1430 | read_lock_bh(&pch->upl); | 1430 | read_lock_bh(&pch->upl); |
1431 | ppp = pch->ppp; | 1431 | ppp = pch->ppp; |
1432 | if (ppp != 0) | 1432 | if (ppp != 0) |
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c index fd9f50180355..4d51c0c8023d 100644 --- a/drivers/net/ppp_synctty.c +++ b/drivers/net/ppp_synctty.c | |||
@@ -406,7 +406,7 @@ ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf, | |||
406 | spin_lock_irqsave(&ap->recv_lock, flags); | 406 | spin_lock_irqsave(&ap->recv_lock, flags); |
407 | ppp_sync_input(ap, buf, cflags, count); | 407 | ppp_sync_input(ap, buf, cflags, count); |
408 | spin_unlock_irqrestore(&ap->recv_lock, flags); | 408 | spin_unlock_irqrestore(&ap->recv_lock, flags); |
409 | if (skb_queue_len(&ap->rqueue)) | 409 | if (!skb_queue_empty(&ap->rqueue)) |
410 | tasklet_schedule(&ap->tsk); | 410 | tasklet_schedule(&ap->tsk); |
411 | sp_put(ap); | 411 | sp_put(ap); |
412 | if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) | 412 | if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 7bfee366297b..effab0b9adca 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -215,7 +215,7 @@ static unsigned int tun_chr_poll(struct file *file, poll_table * wait) | |||
215 | 215 | ||
216 | poll_wait(file, &tun->read_wait, wait); | 216 | poll_wait(file, &tun->read_wait, wait); |
217 | 217 | ||
218 | if (skb_queue_len(&tun->readq)) | 218 | if (!skb_queue_empty(&tun->readq)) |
219 | mask |= POLLIN | POLLRDNORM; | 219 | mask |= POLLIN | POLLRDNORM; |
220 | 220 | ||
221 | return mask; | 221 | return mask; |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index c12648d8192b..47f3c5d0203d 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -2374,7 +2374,7 @@ void stop_airo_card( struct net_device *dev, int freeres ) | |||
2374 | /* | 2374 | /* |
2375 | * Clean out tx queue | 2375 | * Clean out tx queue |
2376 | */ | 2376 | */ |
2377 | if (test_bit(FLAG_MPI, &ai->flags) && skb_queue_len (&ai->txq) > 0) { | 2377 | if (test_bit(FLAG_MPI, &ai->flags) && !skb_queue_empty(&ai->txq)) { |
2378 | struct sk_buff *skb = NULL; | 2378 | struct sk_buff *skb = NULL; |
2379 | for (;(skb = skb_dequeue(&ai->txq));) | 2379 | for (;(skb = skb_dequeue(&ai->txq));) |
2380 | dev_kfree_skb(skb); | 2380 | dev_kfree_skb(skb); |
@@ -3287,7 +3287,7 @@ exitrx: | |||
3287 | if (status & EV_TXEXC) | 3287 | if (status & EV_TXEXC) |
3288 | get_tx_error(apriv, -1); | 3288 | get_tx_error(apriv, -1); |
3289 | spin_lock_irqsave(&apriv->aux_lock, flags); | 3289 | spin_lock_irqsave(&apriv->aux_lock, flags); |
3290 | if (skb_queue_len (&apriv->txq)) { | 3290 | if (!skb_queue_empty(&apriv->txq)) { |
3291 | spin_unlock_irqrestore(&apriv->aux_lock,flags); | 3291 | spin_unlock_irqrestore(&apriv->aux_lock,flags); |
3292 | mpi_send_packet (dev); | 3292 | mpi_send_packet (dev); |
3293 | } else { | 3293 | } else { |
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 60440dbe3a27..24c0af49c25c 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -428,7 +428,7 @@ claw_pack_skb(struct claw_privbk *privptr) | |||
428 | new_skb = NULL; /* assume no dice */ | 428 | new_skb = NULL; /* assume no dice */ |
429 | pkt_cnt = 0; | 429 | pkt_cnt = 0; |
430 | CLAW_DBF_TEXT(4,trace,"PackSKBe"); | 430 | CLAW_DBF_TEXT(4,trace,"PackSKBe"); |
431 | if (skb_queue_len(&p_ch->collect_queue) > 0) { | 431 | if (!skb_queue_empty(&p_ch->collect_queue)) { |
432 | /* some data */ | 432 | /* some data */ |
433 | held_skb = skb_dequeue(&p_ch->collect_queue); | 433 | held_skb = skb_dequeue(&p_ch->collect_queue); |
434 | if (p_env->packing != DO_PACKED) | 434 | if (p_env->packing != DO_PACKED) |
@@ -1254,7 +1254,7 @@ claw_write_next ( struct chbk * p_ch ) | |||
1254 | privptr = (struct claw_privbk *) dev->priv; | 1254 | privptr = (struct claw_privbk *) dev->priv; |
1255 | claw_free_wrt_buf( dev ); | 1255 | claw_free_wrt_buf( dev ); |
1256 | if ((privptr->write_free_count > 0) && | 1256 | if ((privptr->write_free_count > 0) && |
1257 | (skb_queue_len(&p_ch->collect_queue) > 0)) { | 1257 | !skb_queue_empty(&p_ch->collect_queue)) { |
1258 | pk_skb = claw_pack_skb(privptr); | 1258 | pk_skb = claw_pack_skb(privptr); |
1259 | while (pk_skb != NULL) { | 1259 | while (pk_skb != NULL) { |
1260 | rc = claw_hw_tx( pk_skb, dev,1); | 1260 | rc = claw_hw_tx( pk_skb, dev,1); |
diff --git a/drivers/s390/net/ctctty.c b/drivers/s390/net/ctctty.c index 3080393e823d..968f2c113efe 100644 --- a/drivers/s390/net/ctctty.c +++ b/drivers/s390/net/ctctty.c | |||
@@ -156,7 +156,7 @@ ctc_tty_readmodem(ctc_tty_info *info) | |||
156 | skb_queue_head(&info->rx_queue, skb); | 156 | skb_queue_head(&info->rx_queue, skb); |
157 | else { | 157 | else { |
158 | kfree_skb(skb); | 158 | kfree_skb(skb); |
159 | ret = skb_queue_len(&info->rx_queue); | 159 | ret = !skb_queue_empty(&info->rx_queue); |
160 | } | 160 | } |
161 | } | 161 | } |
162 | } | 162 | } |
@@ -530,7 +530,7 @@ ctc_tty_write(struct tty_struct *tty, const u_char * buf, int count) | |||
530 | total += c; | 530 | total += c; |
531 | count -= c; | 531 | count -= c; |
532 | } | 532 | } |
533 | if (skb_queue_len(&info->tx_queue)) { | 533 | if (!skb_queue_empty(&info->tx_queue)) { |
534 | info->lsr &= ~UART_LSR_TEMT; | 534 | info->lsr &= ~UART_LSR_TEMT; |
535 | tasklet_schedule(&info->tasklet); | 535 | tasklet_schedule(&info->tasklet); |
536 | } | 536 | } |
@@ -594,7 +594,7 @@ ctc_tty_flush_chars(struct tty_struct *tty) | |||
594 | return; | 594 | return; |
595 | if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_flush_chars")) | 595 | if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_flush_chars")) |
596 | return; | 596 | return; |
597 | if (tty->stopped || tty->hw_stopped || (!skb_queue_len(&info->tx_queue))) | 597 | if (tty->stopped || tty->hw_stopped || skb_queue_empty(&info->tx_queue)) |
598 | return; | 598 | return; |
599 | tasklet_schedule(&info->tasklet); | 599 | tasklet_schedule(&info->tasklet); |
600 | } | 600 | } |
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index 8a945f4f3693..576f3b852fce 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c | |||
@@ -3227,9 +3227,9 @@ static int usbnet_stop (struct net_device *net) | |||
3227 | temp = unlink_urbs (dev, &dev->txq) + unlink_urbs (dev, &dev->rxq); | 3227 | temp = unlink_urbs (dev, &dev->txq) + unlink_urbs (dev, &dev->rxq); |
3228 | 3228 | ||
3229 | // maybe wait for deletions to finish. | 3229 | // maybe wait for deletions to finish. |
3230 | while (skb_queue_len (&dev->rxq) | 3230 | while (!skb_queue_empty(&dev->rxq) && |
3231 | && skb_queue_len (&dev->txq) | 3231 | !skb_queue_empty(&dev->txq) && |
3232 | && skb_queue_len (&dev->done)) { | 3232 | !skb_queue_empty(&dev->done)) { |
3233 | msleep(UNLINK_TIMEOUT_MS); | 3233 | msleep(UNLINK_TIMEOUT_MS); |
3234 | if (netif_msg_ifdown (dev)) | 3234 | if (netif_msg_ifdown (dev)) |
3235 | devdbg (dev, "waited for %d urb completions", temp); | 3235 | devdbg (dev, "waited for %d urb completions", temp); |