aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2005-10-07 02:46:04 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-08 18:00:57 -0400
commitdd0fc66fb33cd610bc1a5db8a5e232d34879b4d7 (patch)
tree51f96a9db96293b352e358f66032e1f4ff79fafb /net/core/skbuff.c
parent3b0e77bd144203a507eb191f7117d2c5004ea1de (diff)
[PATCH] gfp flags annotations - part 1
- added typedef unsigned int __nocast gfp_t; - replaced __nocast uses for gfp flags with gfp_t - it gives exactly the same warnings as far as sparse is concerned, doesn't change generated code (from gcc point of view we replaced unsigned int with typedef) and documents what's going on far better. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 0e9431b59fb2..af9b1516e21f 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -130,7 +130,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
130 * Buffers may only be allocated from interrupts using a @gfp_mask of 130 * Buffers may only be allocated from interrupts using a @gfp_mask of
131 * %GFP_ATOMIC. 131 * %GFP_ATOMIC.
132 */ 132 */
133struct sk_buff *__alloc_skb(unsigned int size, unsigned int __nocast gfp_mask, 133struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
134 int fclone) 134 int fclone)
135{ 135{
136 struct sk_buff *skb; 136 struct sk_buff *skb;
@@ -198,7 +198,7 @@ nodata:
198 */ 198 */
199struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp, 199struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
200 unsigned int size, 200 unsigned int size,
201 unsigned int __nocast gfp_mask) 201 gfp_t gfp_mask)
202{ 202{
203 struct sk_buff *skb; 203 struct sk_buff *skb;
204 u8 *data; 204 u8 *data;
@@ -361,7 +361,7 @@ void __kfree_skb(struct sk_buff *skb)
361 * %GFP_ATOMIC. 361 * %GFP_ATOMIC.
362 */ 362 */
363 363
364struct sk_buff *skb_clone(struct sk_buff *skb, unsigned int __nocast gfp_mask) 364struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
365{ 365{
366 struct sk_buff *n; 366 struct sk_buff *n;
367 367
@@ -500,7 +500,7 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
500 * header is going to be modified. Use pskb_copy() instead. 500 * header is going to be modified. Use pskb_copy() instead.
501 */ 501 */
502 502
503struct sk_buff *skb_copy(const struct sk_buff *skb, unsigned int __nocast gfp_mask) 503struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask)
504{ 504{
505 int headerlen = skb->data - skb->head; 505 int headerlen = skb->data - skb->head;
506 /* 506 /*
@@ -539,7 +539,7 @@ struct sk_buff *skb_copy(const struct sk_buff *skb, unsigned int __nocast gfp_ma
539 * The returned buffer has a reference count of 1. 539 * The returned buffer has a reference count of 1.
540 */ 540 */
541 541
542struct sk_buff *pskb_copy(struct sk_buff *skb, unsigned int __nocast gfp_mask) 542struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask)
543{ 543{
544 /* 544 /*
545 * Allocate the copy buffer 545 * Allocate the copy buffer
@@ -598,7 +598,7 @@ out:
598 */ 598 */
599 599
600int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, 600int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
601 unsigned int __nocast gfp_mask) 601 gfp_t gfp_mask)
602{ 602{
603 int i; 603 int i;
604 u8 *data; 604 u8 *data;
@@ -689,7 +689,7 @@ struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, unsigned int headroom)
689 */ 689 */
690struct sk_buff *skb_copy_expand(const struct sk_buff *skb, 690struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
691 int newheadroom, int newtailroom, 691 int newheadroom, int newtailroom,
692 unsigned int __nocast gfp_mask) 692 gfp_t gfp_mask)
693{ 693{
694 /* 694 /*
695 * Allocate the copy buffer 695 * Allocate the copy buffer