Skip to content

Commit

Permalink
Fix sunrpc warning noise
Browse files Browse the repository at this point in the history
Commit c5a4dd8 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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed May 8, 2007
1 parent 60c9b27 commit 215d067
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,9 @@ void *rpc_malloc(struct rpc_task *task, size_t size)
else
buf = kmalloc(size, gfp);
*buf = size;
dprintk("RPC: %5u allocated buffer of size %u at %p\n",
dprintk("RPC: %5u allocated buffer of size %zu at %p\n",
task->tk_pid, size, buf);
return (void *) ++buf;
return ++buf;
}

/**
Expand All @@ -775,14 +775,14 @@ void *rpc_malloc(struct rpc_task *task, size_t size)
*/
void rpc_free(void *buffer)
{
size_t size, *buf = (size_t *) buffer;
size_t size, *buf = buffer;

if (!buffer)
return;
size = *buf;
buf--;

dprintk("RPC: freeing buffer of size %u at %p\n",
dprintk("RPC: freeing buffer of size %zu at %p\n",
size, buf);
if (size <= RPC_BUFFER_MAXSIZE)
mempool_free(buf, rpc_buffer_mempool);
Expand Down

0 comments on commit 215d067

Please sign in to comment.