diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2007-05-08 05:37:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 15:03:19 -0400 |
commit | 215d06780d13fd7de629b02b61b7b7bf88ce5039 (patch) | |
tree | 93442b82b26ec08426938404f55fc2fd65f18da5 /net/sunrpc/sched.c | |
parent | 60c9b2746f589b0b809582b0471cf30ad3ae439f (diff) |
Fix sunrpc warning noise
Commit c5a4dd8b7c15927a8fbff83171b57cad675a79b9 introduced the following
compiler warnings:
net/sunrpc/sched.c:766: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'size_t'
net/sunrpc/sched.c:785: warning: format '%u' expects type 'unsigned int', but argument 2 has type 'size_t'
- Use %zu to format size_t
- Kill 2 useless casts
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r-- | net/sunrpc/sched.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 4a53e94f8134..99014516b73c 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -763,9 +763,9 @@ void *rpc_malloc(struct rpc_task *task, size_t size) | |||
763 | else | 763 | else |
764 | buf = kmalloc(size, gfp); | 764 | buf = kmalloc(size, gfp); |
765 | *buf = size; | 765 | *buf = size; |
766 | dprintk("RPC: %5u allocated buffer of size %u at %p\n", | 766 | dprintk("RPC: %5u allocated buffer of size %zu at %p\n", |
767 | task->tk_pid, size, buf); | 767 | task->tk_pid, size, buf); |
768 | return (void *) ++buf; | 768 | return ++buf; |
769 | } | 769 | } |
770 | 770 | ||
771 | /** | 771 | /** |
@@ -775,14 +775,14 @@ void *rpc_malloc(struct rpc_task *task, size_t size) | |||
775 | */ | 775 | */ |
776 | void rpc_free(void *buffer) | 776 | void rpc_free(void *buffer) |
777 | { | 777 | { |
778 | size_t size, *buf = (size_t *) buffer; | 778 | size_t size, *buf = buffer; |
779 | 779 | ||
780 | if (!buffer) | 780 | if (!buffer) |
781 | return; | 781 | return; |
782 | size = *buf; | 782 | size = *buf; |
783 | buf--; | 783 | buf--; |
784 | 784 | ||
785 | dprintk("RPC: freeing buffer of size %u at %p\n", | 785 | dprintk("RPC: freeing buffer of size %zu at %p\n", |
786 | size, buf); | 786 | size, buf); |
787 | if (size <= RPC_BUFFER_MAXSIZE) | 787 | if (size <= RPC_BUFFER_MAXSIZE) |
788 | mempool_free(buf, rpc_buffer_mempool); | 788 | mempool_free(buf, rpc_buffer_mempool); |