Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4412
b: refs/heads/master
c: bb6b823
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 9, 2005
1 parent 8ef82a1 commit 35666df
Show file tree
Hide file tree
Showing 54 changed files with 303 additions and 241 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6524813e032fb33bd1de807a98f8453414335e4
refs/heads/master: bb6b82381063f54613842decdf948cbfa631842e
2 changes: 1 addition & 1 deletion trunk/drivers/bluetooth/hci_vhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static unsigned int hci_vhci_chr_poll(struct file *file, poll_table * wait)

poll_wait(file, &hci_vhci->read_wait, wait);

if (skb_queue_len(&hci_vhci->readq))
if (!skb_queue_empty(&hci_vhci->readq))
return POLLIN | POLLRDNORM;

return POLLOUT | POLLWRNORM;
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/isdn/hisax/isdnl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ BChannel_proc_xmt(struct BCState *bcs)
if (test_and_clear_bit(FLG_L1_PULL_REQ, &st->l1.Flags))
st->l1.l1l2(st, PH_PULL | CONFIRM, NULL);
if (!test_bit(BC_FLG_ACTIV, &bcs->Flag)) {
if (!test_bit(BC_FLG_BUSY, &bcs->Flag) && (!skb_queue_len(&bcs->squeue))) {
if (!test_bit(BC_FLG_BUSY, &bcs->Flag) &&
skb_queue_empty(&bcs->squeue)) {
st->l2.l2l1(st, PH_DEACTIVATE | CONFIRM, NULL);
}
}
Expand Down
17 changes: 9 additions & 8 deletions trunk/drivers/isdn/hisax/isdnl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ static int l2addrsize(struct Layer2 *l2);
static void
set_peer_busy(struct Layer2 *l2) {
test_and_set_bit(FLG_PEER_BUSY, &l2->flag);
if (skb_queue_len(&l2->i_queue) || skb_queue_len(&l2->ui_queue))
if (!skb_queue_empty(&l2->i_queue) ||
!skb_queue_empty(&l2->ui_queue))
test_and_set_bit(FLG_L2BLOCK, &l2->flag);
}

Expand Down Expand Up @@ -754,7 +755,7 @@ l2_restart_multi(struct FsmInst *fi, int event, void *arg)
st->l2.l2l3(st, DL_ESTABLISH | INDICATION, NULL);

if ((ST_L2_7==state) || (ST_L2_8 == state))
if (skb_queue_len(&st->l2.i_queue) && cansend(st))
if (!skb_queue_empty(&st->l2.i_queue) && cansend(st))
st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
}

Expand Down Expand Up @@ -810,7 +811,7 @@ l2_connected(struct FsmInst *fi, int event, void *arg)
if (pr != -1)
st->l2.l2l3(st, pr, NULL);

if (skb_queue_len(&st->l2.i_queue) && cansend(st))
if (!skb_queue_empty(&st->l2.i_queue) && cansend(st))
st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
}

Expand Down Expand Up @@ -1014,7 +1015,7 @@ l2_st7_got_super(struct FsmInst *fi, int event, void *arg)
if(typ != RR) FsmDelTimer(&st->l2.t203, 9);
restart_t200(st, 12);
}
if (skb_queue_len(&st->l2.i_queue) && (typ == RR))
if (!skb_queue_empty(&st->l2.i_queue) && (typ == RR))
st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
} else
nrerrorrecovery(fi);
Expand Down Expand Up @@ -1120,7 +1121,7 @@ l2_got_iframe(struct FsmInst *fi, int event, void *arg)
return;
}

if (skb_queue_len(&st->l2.i_queue) && (fi->state == ST_L2_7))
if (!skb_queue_empty(&st->l2.i_queue) && (fi->state == ST_L2_7))
st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
if (test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag))
enquiry_cr(st, RR, RSP, 0);
Expand All @@ -1138,7 +1139,7 @@ l2_got_tei(struct FsmInst *fi, int event, void *arg)
test_and_set_bit(FLG_L3_INIT, &st->l2.flag);
} else
FsmChangeState(fi, ST_L2_4);
if (skb_queue_len(&st->l2.ui_queue))
if (!skb_queue_empty(&st->l2.ui_queue))
tx_ui(st);
}

Expand Down Expand Up @@ -1301,7 +1302,7 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
FsmDelTimer(&st->l2.t203, 13);
FsmAddTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, 11);
}
if (skb_queue_len(&l2->i_queue) && cansend(st))
if (!skb_queue_empty(&l2->i_queue) && cansend(st))
st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
}

Expand Down Expand Up @@ -1347,7 +1348,7 @@ l2_st8_got_super(struct FsmInst *fi, int event, void *arg)
}
invoke_retransmission(st, nr);
FsmChangeState(fi, ST_L2_7);
if (skb_queue_len(&l2->i_queue) && cansend(st))
if (!skb_queue_empty(&l2->i_queue) && cansend(st))
st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
} else
nrerrorrecovery(fi);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/isdn/hisax/isdnl3.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ release_l3_process(struct l3_process *p)
!test_bit(FLG_PTP, &p->st->l2.flag)) {
if (p->debug)
l3_debug(p->st, "release_l3_process: last process");
if (!skb_queue_len(&p->st->l3.squeue)) {
if (skb_queue_empty(&p->st->l3.squeue)) {
if (p->debug)
l3_debug(p->st, "release_l3_process: release link");
if (p->st->protocol != ISDN_PTYPE_NI1)
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/isdn/i4l/isdn_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ isdn_tty_write(struct tty_struct *tty, const u_char * buf, int count)
total += c;
}
atomic_dec(&info->xmit_lock);
if ((info->xmit_count) || (skb_queue_len(&info->xmit_queue))) {
if ((info->xmit_count) || !skb_queue_empty(&info->xmit_queue)) {
if (m->mdmreg[REG_DXMT] & BIT_DXMT) {
isdn_tty_senddown(info);
isdn_tty_tint(info);
Expand Down Expand Up @@ -1284,7 +1284,7 @@ isdn_tty_flush_chars(struct tty_struct *tty)

if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_flush_chars"))
return;
if ((info->xmit_count) || (skb_queue_len(&info->xmit_queue)))
if ((info->xmit_count) || !skb_queue_empty(&info->xmit_queue))
isdn_timer_ctrl(ISDN_TIMER_MODEMXMIT, 1);
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/isdn/icn/icn.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,12 @@ icn_pollbchan_send(int channel, icn_card * card)
isdn_ctrl cmd;

if (!(card->sndcount[channel] || card->xskb[channel] ||
skb_queue_len(&card->spqueue[channel])))
!skb_queue_empty(&card->spqueue[channel])))
return;
if (icn_trymaplock_channel(card, mch)) {
while (sbfree &&
(card->sndcount[channel] ||
skb_queue_len(&card->spqueue[channel]) ||
!skb_queue_empty(&card->spqueue[channel]) ||
card->xskb[channel])) {
spin_lock_irqsave(&card->lock, flags);
if (card->xmit_lock[channel]) {
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/hamradio/scc.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static inline void scc_discard_buffers(struct scc_channel *scc)
scc->tx_buff = NULL;
}

while (skb_queue_len(&scc->tx_queue))
while (!skb_queue_empty(&scc->tx_queue))
dev_kfree_skb(skb_dequeue(&scc->tx_queue));

spin_unlock_irqrestore(&scc->lock, flags);
Expand Down Expand Up @@ -1126,8 +1126,7 @@ static void t_dwait(unsigned long channel)

if (scc->stat.tx_state == TXS_WAIT) /* maxkeyup or idle timeout */
{
if (skb_queue_len(&scc->tx_queue) == 0) /* nothing to send */
{
if (skb_queue_empty(&scc->tx_queue)) { /* nothing to send */
scc->stat.tx_state = TXS_IDLE;
netif_wake_queue(scc->dev); /* t_maxkeyup locked it. */
return;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ppp_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf,
spin_lock_irqsave(&ap->recv_lock, flags);
ppp_async_input(ap, buf, cflags, count);
spin_unlock_irqrestore(&ap->recv_lock, flags);
if (skb_queue_len(&ap->rqueue))
if (!skb_queue_empty(&ap->rqueue))
tasklet_schedule(&ap->tsk);
ap_put(ap);
if (test_and_clear_bit(TTY_THROTTLED, &tty->flags)
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/net/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1237,8 +1237,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
pch = list_entry(list, struct channel, clist);
navail += pch->avail = (pch->chan != NULL);
if (pch->avail) {
if (skb_queue_len(&pch->file.xq) == 0
|| !pch->had_frag) {
if (skb_queue_empty(&pch->file.xq) ||
!pch->had_frag) {
pch->avail = 2;
++nfree;
}
Expand Down Expand Up @@ -1374,8 +1374,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)

/* try to send it down the channel */
chan = pch->chan;
if (skb_queue_len(&pch->file.xq)
|| !chan->ops->start_xmit(chan, frag))
if (!skb_queue_empty(&pch->file.xq) ||
!chan->ops->start_xmit(chan, frag))
skb_queue_tail(&pch->file.xq, frag);
pch->had_frag = 1;
p += flen;
Expand Down Expand Up @@ -1412,7 +1412,7 @@ ppp_channel_push(struct channel *pch)

spin_lock_bh(&pch->downl);
if (pch->chan != 0) {
while (skb_queue_len(&pch->file.xq) > 0) {
while (!skb_queue_empty(&pch->file.xq)) {
skb = skb_dequeue(&pch->file.xq);
if (!pch->chan->ops->start_xmit(pch->chan, skb)) {
/* put the packet back and try again later */
Expand All @@ -1426,7 +1426,7 @@ ppp_channel_push(struct channel *pch)
}
spin_unlock_bh(&pch->downl);
/* see if there is anything from the attached unit to be sent */
if (skb_queue_len(&pch->file.xq) == 0) {
if (skb_queue_empty(&pch->file.xq)) {
read_lock_bh(&pch->upl);
ppp = pch->ppp;
if (ppp != 0)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ppp_synctty.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf,
spin_lock_irqsave(&ap->recv_lock, flags);
ppp_sync_input(ap, buf, cflags, count);
spin_unlock_irqrestore(&ap->recv_lock, flags);
if (skb_queue_len(&ap->rqueue))
if (!skb_queue_empty(&ap->rqueue))
tasklet_schedule(&ap->tsk);
sp_put(ap);
if (test_and_clear_bit(TTY_THROTTLED, &tty->flags)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ static unsigned int tun_chr_poll(struct file *file, poll_table * wait)

poll_wait(file, &tun->read_wait, wait);

if (skb_queue_len(&tun->readq))
if (!skb_queue_empty(&tun->readq))
mask |= POLLIN | POLLRDNORM;

return mask;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -2374,7 +2374,7 @@ void stop_airo_card( struct net_device *dev, int freeres )
/*
* Clean out tx queue
*/
if (test_bit(FLAG_MPI, &ai->flags) && skb_queue_len (&ai->txq) > 0) {
if (test_bit(FLAG_MPI, &ai->flags) && !skb_queue_empty(&ai->txq)) {
struct sk_buff *skb = NULL;
for (;(skb = skb_dequeue(&ai->txq));)
dev_kfree_skb(skb);
Expand Down Expand Up @@ -3287,7 +3287,7 @@ static irqreturn_t airo_interrupt ( int irq, void* dev_id, struct pt_regs *regs)
if (status & EV_TXEXC)
get_tx_error(apriv, -1);
spin_lock_irqsave(&apriv->aux_lock, flags);
if (skb_queue_len (&apriv->txq)) {
if (!skb_queue_empty(&apriv->txq)) {
spin_unlock_irqrestore(&apriv->aux_lock,flags);
mpi_send_packet (dev);
} else {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/s390/net/claw.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ claw_pack_skb(struct claw_privbk *privptr)
new_skb = NULL; /* assume no dice */
pkt_cnt = 0;
CLAW_DBF_TEXT(4,trace,"PackSKBe");
if (skb_queue_len(&p_ch->collect_queue) > 0) {
if (!skb_queue_empty(&p_ch->collect_queue)) {
/* some data */
held_skb = skb_dequeue(&p_ch->collect_queue);
if (p_env->packing != DO_PACKED)
Expand Down Expand Up @@ -1254,7 +1254,7 @@ claw_write_next ( struct chbk * p_ch )
privptr = (struct claw_privbk *) dev->priv;
claw_free_wrt_buf( dev );
if ((privptr->write_free_count > 0) &&
(skb_queue_len(&p_ch->collect_queue) > 0)) {
!skb_queue_empty(&p_ch->collect_queue)) {
pk_skb = claw_pack_skb(privptr);
while (pk_skb != NULL) {
rc = claw_hw_tx( pk_skb, dev,1);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/s390/net/ctctty.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ ctc_tty_readmodem(ctc_tty_info *info)
skb_queue_head(&info->rx_queue, skb);
else {
kfree_skb(skb);
ret = skb_queue_len(&info->rx_queue);
ret = !skb_queue_empty(&info->rx_queue);
}
}
}
Expand Down Expand Up @@ -530,7 +530,7 @@ ctc_tty_write(struct tty_struct *tty, const u_char * buf, int count)
total += c;
count -= c;
}
if (skb_queue_len(&info->tx_queue)) {
if (!skb_queue_empty(&info->tx_queue)) {
info->lsr &= ~UART_LSR_TEMT;
tasklet_schedule(&info->tasklet);
}
Expand Down Expand Up @@ -594,7 +594,7 @@ ctc_tty_flush_chars(struct tty_struct *tty)
return;
if (ctc_tty_paranoia_check(info, tty->name, "ctc_tty_flush_chars"))
return;
if (tty->stopped || tty->hw_stopped || (!skb_queue_len(&info->tx_queue)))
if (tty->stopped || tty->hw_stopped || skb_queue_empty(&info->tx_queue))
return;
tasklet_schedule(&info->tasklet);
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/usb/net/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -3227,9 +3227,9 @@ static int usbnet_stop (struct net_device *net)
temp = unlink_urbs (dev, &dev->txq) + unlink_urbs (dev, &dev->rxq);

// maybe wait for deletions to finish.
while (skb_queue_len (&dev->rxq)
&& skb_queue_len (&dev->txq)
&& skb_queue_len (&dev->done)) {
while (!skb_queue_empty(&dev->rxq) &&
!skb_queue_empty(&dev->txq) &&
!skb_queue_empty(&dev->done)) {
msleep(UNLINK_TIMEOUT_MS);
if (netif_msg_ifdown (dev))
devdbg (dev, "waited for %d urb completions", temp);
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/igmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ struct ip_sf_socklist
struct ip_mc_socklist
{
struct ip_mc_socklist *next;
int count;
struct ip_mreqn multi;
unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */
struct ip_sf_socklist *sflist;
Expand Down
29 changes: 18 additions & 11 deletions trunk/include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,20 +300,26 @@ struct sk_buff {
#include <asm/system.h>

extern void __kfree_skb(struct sk_buff *skb);
extern struct sk_buff *alloc_skb(unsigned int size, int priority);
extern struct sk_buff *alloc_skb(unsigned int size,
unsigned int __nocast priority);
extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
unsigned int size, int priority);
unsigned int size,
unsigned int __nocast priority);
extern void kfree_skbmem(struct sk_buff *skb);
extern struct sk_buff *skb_clone(struct sk_buff *skb, int priority);
extern struct sk_buff *skb_copy(const struct sk_buff *skb, int priority);
extern struct sk_buff *pskb_copy(struct sk_buff *skb, int gfp_mask);
extern struct sk_buff *skb_clone(struct sk_buff *skb,
unsigned int __nocast priority);
extern struct sk_buff *skb_copy(const struct sk_buff *skb,
unsigned int __nocast priority);
extern struct sk_buff *pskb_copy(struct sk_buff *skb,
unsigned int __nocast gfp_mask);
extern int pskb_expand_head(struct sk_buff *skb,
int nhead, int ntail, int gfp_mask);
int nhead, int ntail,
unsigned int __nocast gfp_mask);
extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb,
unsigned int headroom);
extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
int newheadroom, int newtailroom,
int priority);
unsigned int __nocast priority);
extern struct sk_buff * skb_pad(struct sk_buff *skb, int pad);
#define dev_kfree_skb(a) kfree_skb(a)
extern void skb_over_panic(struct sk_buff *skb, int len,
Expand Down Expand Up @@ -464,7 +470,8 @@ static inline int skb_shared(const struct sk_buff *skb)
*
* NULL is returned on a memory allocation failure.
*/
static inline struct sk_buff *skb_share_check(struct sk_buff *skb, int pri)
static inline struct sk_buff *skb_share_check(struct sk_buff *skb,
unsigned int __nocast pri)
{
might_sleep_if(pri & __GFP_WAIT);
if (skb_shared(skb)) {
Expand Down Expand Up @@ -1001,7 +1008,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
* %NULL is returned in there is no free memory.
*/
static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
int gfp_mask)
unsigned int __nocast gfp_mask)
{
struct sk_buff *skb = alloc_skb(length + 16, gfp_mask);
if (likely(skb))
Expand Down Expand Up @@ -1114,8 +1121,8 @@ static inline int skb_can_coalesce(struct sk_buff *skb, int i,
* If there is no free memory -ENOMEM is returned, otherwise zero
* is returned and the old skb data released.
*/
extern int __skb_linearize(struct sk_buff *skb, int gfp);
static inline int skb_linearize(struct sk_buff *skb, int gfp)
extern int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp);
static inline int skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp)
{
return __skb_linearize(skb, gfp);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/net/irda/irda_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ int irda_device_is_receiving(struct net_device *dev);
/* Interface for internal use */
static inline int irda_device_txqueue_empty(const struct net_device *dev)
{
return (skb_queue_len(&dev->qdisc->q) == 0);
return skb_queue_empty(&dev->qdisc->q);
}
int irda_device_set_raw_mode(struct net_device* self, int status);
struct net_device *alloc_irdadev(int sizeof_priv);
Expand Down
Loading

0 comments on commit 35666df

Please sign in to comment.