diff options
author | David S. Miller <davem@davemloft.net> | 2005-07-08 17:57:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-07-08 17:57:23 -0400 |
commit | b03efcfb2180289718991bb984044ce6c5b7d1b0 (patch) | |
tree | f3b0c6c4eaf0991c28b7116a20994b48398eea57 /drivers/isdn/hisax | |
parent | a92b7b80579fe68fe229892815c750f6652eb6a9 (diff) |
[NET]: Transform skb_queue_len() binary tests into skb_queue_empty()
This is part of the grand scheme to eliminate the qlen
member of skb_queue_head, and subsequently remove the
'list' member of sk_buff.
Most users of skb_queue_len() want to know if the queue is
empty or not, and that's trivially done with skb_queue_empty()
which doesn't use the skb_queue_head->qlen member and instead
uses the queue list emptyness as the test.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hisax')
-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 |
3 files changed, 12 insertions, 10 deletions
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) |