[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070508200319.GA7035@martell.zuzino.mipt.ru>
Date: Wed, 9 May 2007 00:03:19 +0400
From: Alexey Dobriyan <adobriyan@...il.com>
To: Chris Wedgwood <cw@...f.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Type cast some size_t arguments to 'unsigned int' to avoid (harmless) gcc printk warnings.
On Tue, May 08, 2007 at 11:29:26AM -0700, Chris Wedgwood wrote:
> --- a/net/sunrpc/sched.c
> +++ b/net/sunrpc/sched.c
> @@ -764,7 +764,7 @@ void *rpc_malloc(struct rpc_task *task, size_t size)
> buf = kmalloc(size, gfp);
> *buf = size;
> dprintk("RPC: %5u allocated buffer of size %u at %p\n",
> - task->tk_pid, size, buf);
> + task->tk_pid, (unsigned int)size, buf);
> return (void *) ++buf;
> }
>
> @@ -783,7 +783,7 @@ void rpc_free(void *buffer)
> buf--;
>
> dprintk("RPC: freeing buffer of size %u at %p\n",
> - size, buf);
> + (unsigned int)size, buf);
For one, size_t should be printed with %zu.
For two, this is already fixed in mainline.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists