Debian Codegraph @

demos/janitorings/alloc_page.cocci

raw
1 // From: Shani Moideen <[email protected]>
2 // Subject: [KJ] [KJ PATCH] Replacing alloc_pages(gfp,
3 // 0) with alloc_page(gfp) in net/core/sock.c
4 // To: [email protected], [email protected]
5 // Cc: [email protected], [email protected]
6 // Date: Wed, 13 Jun 2007 08:16:42 +0530
7 // Organization: Linux COE, Wipro Technolgies
8 //
9 //
10 // Replacing alloc_pages(gfp,0) with alloc_page(gfp)
11 // in net/core/sock.c
12 //
13 // Signed-off-by: Shani Moideen <[email protected]>
14 // ----
15 //
16 // diff --git a/net/core/sock.c b/net/core/sock.c
17 // index 22183c2..25bb52b 100644
18 // --- a/net/core/sock.c
19 // +++ b/net/core/sock.c
20 // @@ -1193,7 +1193,7 @@ static struct sk_buff *sock_alloc_send_pskb(struct sock *sk,
21 // struct page *page;
22 // skb_frag_t *frag;
23 //
24 // - page = alloc_pages(sk->sk_allocation, 0);
25 // + page = alloc_page(sk->sk_allocation);
26 // if (!page) {
27 // err = -ENOBUFS;
28 // skb_shinfo(skb)->nr_frags = i;
29
30 @@
31 expression X;
32 @@
33
34 - alloc_pages(X, 0)
35 + alloc_page(X)