mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-20 19:34:46 +00:00
Fix sunrpc warning noise
Commit c5a4dd8b7c
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>
This commit is contained in:
parent
60c9b2746f
commit
215d06780d
|
@ -763,9 +763,9 @@ void *rpc_malloc(struct rpc_task *task, size_t size)
|
||||||
else
|
else
|
||||||
buf = kmalloc(size, gfp);
|
buf = kmalloc(size, gfp);
|
||||||
*buf = size;
|
*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);
|
task->tk_pid, size, buf);
|
||||||
return (void *) ++buf;
|
return ++buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -775,14 +775,14 @@ void *rpc_malloc(struct rpc_task *task, size_t size)
|
||||||
*/
|
*/
|
||||||
void rpc_free(void *buffer)
|
void rpc_free(void *buffer)
|
||||||
{
|
{
|
||||||
size_t size, *buf = (size_t *) buffer;
|
size_t size, *buf = buffer;
|
||||||
|
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
return;
|
return;
|
||||||
size = *buf;
|
size = *buf;
|
||||||
buf--;
|
buf--;
|
||||||
|
|
||||||
dprintk("RPC: freeing buffer of size %u at %p\n",
|
dprintk("RPC: freeing buffer of size %zu at %p\n",
|
||||||
size, buf);
|
size, buf);
|
||||||
if (size <= RPC_BUFFER_MAXSIZE)
|
if (size <= RPC_BUFFER_MAXSIZE)
|
||||||
mempool_free(buf, rpc_buffer_mempool);
|
mempool_free(buf, rpc_buffer_mempool);
|
||||||
|
|
Loading…
Reference in a new issue