[KJ PATCH] Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/core/sock.c
Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/core/sock.c Signed-off-by: Shani Moideen <[EMAIL PROTECTED]> diff --git a/net/core/sock.c b/net/core/sock.c index 22183c2..25bb52b 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1193,7 +1193,7 @@ static struct sk_buff *sock_alloc_send_pskb(struct sock *sk, struct page *page; skb_frag_t *frag; - page = alloc_pages(sk->sk_allocation, 0); + page = alloc_page(sk->sk_allocation); if (!page) { err = -ENOBUFS; skb_shinfo(skb)->nr_frags = i; -- Shani - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[KJ PATCH] Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/core/pktgen.c
Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/core/pktgen.c Signed-off-by: Shani Moideen <[EMAIL PROTECTED]> diff --git a/net/core/pktgen.c b/net/core/pktgen.c index b92a322..2600c7f 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2414,7 +2414,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, i = 0; while (datalen > 0) { - struct page *page = alloc_pages(GFP_KERNEL, 0); + struct page *page = alloc_page(GFP_KERNEL); skb_shinfo(skb)->frags[i].page = page; skb_shinfo(skb)->frags[i].page_offset = 0; skb_shinfo(skb)->frags[i].size = @@ -2762,7 +2762,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev, i = 0; while (datalen > 0) { - struct page *page = alloc_pages(GFP_KERNEL, 0); + struct page *page = alloc_page(GFP_KERNEL); skb_shinfo(skb)->frags[i].page = page; skb_shinfo(skb)->frags[i].page_offset = 0; skb_shinfo(skb)->frags[i].size = -- Shani - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[KJ PATCH] Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/core/skbuff.c
Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/core/skbuff.c Signed-off-by: Shani Moideen <[EMAIL PROTECTED]> diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 1422573..b923181 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -1805,7 +1805,7 @@ int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, return -EFAULT; /* allocate a new page for next frag */ - page = alloc_pages(sk->sk_allocation, 0); + page = alloc_page(sk->sk_allocation); /* If alloc_page fails just return failure and caller will * free previous allocated pages by doing kfree_skb() -- Shani - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[KJ PATCH] Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/ipv6/ip6_output.c
Hi, Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/ipv6/ip6_output.c Signed-off-by: Shani Moideen <[EMAIL PROTECTED]> diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index f508171..1d27779 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -1291,7 +1291,7 @@ alloc_new_skb: } else if(i < MAX_SKB_FRAGS) { if (copy > PAGE_SIZE) copy = PAGE_SIZE; - page = alloc_pages(sk->sk_allocation, 0); + page = alloc_page(sk->sk_allocation); if (page == NULL) { err = -ENOMEM; goto error; Regards, Shani - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[KJ PATCH] Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/ipv4/ip_output.c.
Hi, Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/ipv4/ip_output.c. Signed-off-by: Shani Moideen <[EMAIL PROTECTED]> diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index d6427d9..f9a87f6 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1003,7 +1003,7 @@ alloc_new_skb: } else if (i < MAX_SKB_FRAGS) { if (copy > PAGE_SIZE) copy = PAGE_SIZE; - page = alloc_pages(sk->sk_allocation, 0); + page = alloc_page(sk->sk_allocation); if (page == NULL) { err = -ENOMEM; goto error; Regards, Shani - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH]:Replace with time_before in net/ipv4/ipip.c
Hi, Replacing (jiffies - errtime < TIMEOUT) with time_before in net/ipv4/ipip.c thanks. Signed-off-by: Shani Moideen <[EMAIL PROTECTED]> diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 3ec5ce0..d2bc835 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c @@ -108,6 +108,7 @@ #include #include #include +#include #include #include @@ -324,7 +325,7 @@ static int ipip_err(struct sk_buff *skb, u32 info) if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED) goto out; - if (jiffies - t->err_time < IPTUNNEL_ERR_TIMEO) + if (time_before(jiffies , t->err_time + IPTUNNEL_ERR_TIMEO)) t->err_count++; else t->err_count = 1; @@ -590,7 +591,7 @@ static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) } if (tunnel->err_count > 0) { - if (jiffies - tunnel->err_time < IPTUNNEL_ERR_TIMEO) { + if (time_before(jiffies , tunnel->err_time + IPTUNNEL_ERR_TIMEO)) { tunnel->err_count--; dst_link_failure(skb); } else -- Shani - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH]:Replacing with time_before in net/ipv4/ip_gre.c
Hi, Replacing with time_before in net/ipv4/ip_gre.c thanks. Signed-off-by: Shani Moideen <[EMAIL PROTECTED]> diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 9151da6..05cd63b 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -376,7 +377,7 @@ static void ipgre_err(struct sk_buff *skb, u32 info) if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED) goto out; - if (jiffies - t->err_time < IPTUNNEL_ERR_TIMEO) + if (time_before(jiffies , t->err_time + IPTUNNEL_ERR_TIMEO)) t->err_count++; else t->err_count = 1; @@ -801,7 +802,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) #endif if (tunnel->err_count > 0) { - if (jiffies - tunnel->err_time < IPTUNNEL_ERR_TIMEO) { + if (time_before(jiffies , tunnel->err_time + IPTUNNEL_ERR_TIMEO)) { tunnel->err_count--; dst_link_failure(skb); Shani - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Replace with time_after in drivers/net/tokenring/3c359.c
Hi, Replacing with time_after in drivers/net/tokenring/3c359.c Applies and compiles clean on latest linus tree. thanks. Signed-off-by: Shani Moideen <[EMAIL PROTECTED]> diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index 7580bde..512cd4d 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c @@ -61,6 +61,7 @@ #include #include #include +#include #include @@ -409,7 +410,7 @@ static int xl_hw_reset(struct net_device *dev) t=jiffies; while (readw(xl_mmio + MMIO_INTSTATUS) & INTSTAT_CMD_IN_PROGRESS) { schedule(); - if(jiffies-t > 40*HZ) { + if(time_after(jiffies, t + 40*HZ)) { printk(KERN_ERR "%s: 3COM 3C359 Velocity XL card not responding to global reset.\n", dev->name); return -ENODEV; } @@ -520,7 +521,7 @@ static int xl_hw_reset(struct net_device *dev) t=jiffies; while ( !(readw(xl_mmio + MMIO_INTSTATUS_AUTO) & INTSTAT_SRB) ) { schedule(); - if(jiffies-t > 15*HZ) { + if(time_after(jiffies, t + 15*HZ)) { printk(KERN_ERR "3COM 3C359 Velocity XL card not responding.\n"); return -ENODEV; } @@ -796,7 +797,7 @@ static int xl_open_hw(struct net_device *dev) t=jiffies; while (! (readw(xl_mmio + MMIO_INTSTATUS) & INTSTAT_SRB)) { schedule(); - if(jiffies-t > 40*HZ) { + if(time_after(jiffies, t + 40*HZ)) { printk(KERN_ERR "3COM 3C359 Velocity XL card not responding.\n"); break ; } @@ -1011,7 +1012,7 @@ static void xl_reset(struct net_device *dev) t=jiffies; while (readw(xl_mmio + MMIO_INTSTATUS) & INTSTAT_CMD_IN_PROGRESS) { - if(jiffies-t > 40*HZ) { + if(time_after(jiffies, t + 40*HZ)) { printk(KERN_ERR "3COM 3C359 Velocity XL card not responding.\n"); break ; } @@ -1283,7 +1284,7 @@ static int xl_close(struct net_device *dev) t=jiffies; while (readw(xl_mmio + MMIO_INTSTATUS) & INTSTAT_CMD_IN_PROGRESS) { schedule(); - if(jiffies-t > 10*HZ) { + if(time_after(jiffies, t + 10*HZ)) { printk(KERN_ERR "%s: 3COM 3C359 Velocity XL-DNSTALL not responding.\n", dev->name); break ; } @@ -1292,7 +1293,7 @@ static int xl_close(struct net_device *dev) t=jiffies; while (readw(xl_mmio + MMIO_INTSTATUS) & INTSTAT_CMD_IN_PROGRESS) { schedule(); - if(jiffies-t > 10*HZ) { + if(time_after(jiffies, t + 10*HZ)) { printk(KERN_ERR "%s: 3COM 3C359 Velocity XL-DNDISABLE not responding.\n", dev->name); break ; } @@ -1301,7 +1302,7 @@ static int xl_close(struct net_device *dev) t=jiffies; while (readw(xl_mmio + MMIO_INTSTATUS) & INTSTAT_CMD_IN_PROGRESS) { schedule(); - if(jiffies-t > 10*HZ) { + if(time_after(jiffies, t + 10*HZ)) { printk(KERN_ERR "%s: 3COM 3C359 Velocity XL-UPSTALL not responding.\n", dev->name); break ; } @@ -1318,7 +1319,7 @@ static int xl_close(struct net_device *dev) t=jiffies; while (!(readw(xl_mmio + MMIO_INTSTATUS) & INTSTAT_SRB)) { schedule(); - if(jiffies-t > 10*HZ) { + if(time_after(jiffies, t + 10*HZ)) { printk(KERN_ERR "%s: 3COM 3C359 Velocity XL-CLOSENIC not responding.\n", dev->name); break ; } @@ -1347,7 +1348,7 @@ static int xl_close(struct net_device *dev) t=jiffies; while (readw(xl_mmio + MMIO_INTSTATUS) & INTSTAT_CMD_IN_PROGRESS) { schedule(); - if(jiffies-t > 10*HZ) { + if(time_after(jiffies,t + 10*HZ)) { printk(KERN_ERR "%s: 3COM 3C359 Velocity XL-UPRESET not responding.\n", dev->name); break ; } @@ -1356,7 +1357,7 @@ static int xl_close(struct net_device *dev) t=jiffies; while (readw(xl_mmio + MMIO_INTSTATUS) & INTSTAT_CMD_IN_PROGRESS) { schedule(); - if(jiffies-t > 10*HZ) { + if(time_after(jiffies, t + 10*HZ)) { printk(KERN_ERR "%s: 3COM
[PATCH-resend]drivers/net/eexpress.c replace with time_after && time_before in drivers/net/eexpress.c
Resending the patch with few corrections related to time_after and time_before in drivers/net/eexpress.c as suggested by Marcin slusarz. thanks. Signed-off-by: Shani Moideen <[EMAIL PROTECTED]> diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c index 3868b80..1321757 100644 --- a/drivers/net/eexpress.c +++ b/drivers/net/eexpress.c @@ -115,6 +115,7 @@ #include #include #include +#include #include #include @@ -556,7 +557,7 @@ static void unstick_cu(struct net_device *dev) if (lp->started) { - if ((jiffies - dev->trans_start)>50) + if (time_after( jiffies, dev->trans_start + 50)) { if (lp->tx_link==lp->last_tx_restart) { @@ -612,7 +613,7 @@ static void unstick_cu(struct net_device *dev) } else { - if ((jiffies-lp->init_time)>10) + if (time_after(jiffies, lp->init_time + 10)) { unsigned short status = scb_status(dev); printk(KERN_WARNING "%s: i82586 startup timed out, status %04x, resetting...\n", @@ -776,7 +777,7 @@ static unsigned short eexp_start_irq(struct net_device *dev, static void eexp_cmd_clear(struct net_device *dev) { unsigned long int oldtime = jiffies; - while (scb_rdcmd(dev) && ((jiffies-oldtime)<10)); + while (scb_rdcmd(dev) && (time_before(jiffies, oldtime + 10))); if (scb_rdcmd(dev)) { printk("%s: command didn't clear\n", dev->name); } @@ -1650,7 +1651,7 @@ eexp_set_multicast(struct net_device *dev) #endif oj = jiffies; while ((SCB_CUstat(scb_status(dev)) == 2) && - ((jiffies-oj) < 2000)); + (time_before(jiffies, oj + 2000))); if (SCB_CUstat(scb_status(dev)) == 2) printk("%s: warning, CU didn't stop\n", dev->name); lp->started &= ~(STARTED_CU); -- Shani Moideen - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html