linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH next 2/2] pohmelfs: fix printk format warnings
@ 2009-02-13 12:59 Alexander Beregalov
  2009-02-13 13:08 ` Frank Seidel
  2009-02-13 13:14 ` Evgeniy Polyakov
  0 siblings, 2 replies; 6+ messages in thread
From: Alexander Beregalov @ 2009-02-13 12:59 UTC (permalink / raw)
  To: zbr, gregkh, linux-next, linux-kernel

drivers/staging/pohmelfs/inode.c:917: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t'
drivers/staging/pohmelfs/inode.c:1036: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'
drivers/staging/pohmelfs/trans.c:164: warning: format '%u' expects type 'unsigned int', but argument 5 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:170: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:517: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:600: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
drivers/staging/pohmelfs/trans.c:610: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---

 drivers/staging/pohmelfs/inode.c |    4 ++--
 drivers/staging/pohmelfs/trans.c |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c
index 0980c3c..d4ba96c 100644
--- a/drivers/staging/pohmelfs/inode.c
+++ b/drivers/staging/pohmelfs/inode.c
@@ -914,7 +914,7 @@ ssize_t pohmelfs_write(struct file *file, const char __user *buf,
 	kiocb.ki_pos = pos;
 	kiocb.ki_left = len;
 
-	dprintk("%s: len: %u, pos: %llu.\n", __func__, len, pos);
+	dprintk("%s: len: %u, pos: %llu.\n", __func__, (unsigned)len, pos);
 
 	mutex_lock(&inode->i_mutex);
 	ret = pohmelfs_data_lock(pi, pos, len, POHMELFS_WRITE_LOCK);
@@ -1034,7 +1034,7 @@ static int pohmelfs_send_xattr_req(struct pohmelfs_inode *pi, u64 id, u64 start,
 	void *data;
 
 	dprintk("%s: id: %llu, start: %llu, name: '%s', attrsize: %u, cmd: %d.\n",
-			__func__, id, start, name, attrsize, command);
+			__func__, id, start, name, (unsigned)attrsize, command);
 
 	path_len = pohmelfs_path_length(pi);
 	if (path_len < 0) {
diff --git a/drivers/staging/pohmelfs/trans.c b/drivers/staging/pohmelfs/trans.c
index 92054bd..efc9afe 100644
--- a/drivers/staging/pohmelfs/trans.c
+++ b/drivers/staging/pohmelfs/trans.c
@@ -161,7 +161,7 @@ int netfs_trans_send(struct netfs_trans *t, struct netfs_state *st)
 	err = kernel_sendmsg(st->socket, &msg, (struct kvec *)msg.msg_iov, 1, t->iovec.iov_len);
 	if (err <= 0) {
 		printk("%s: failed to send contig transaction: t: %p, gen: %u, size: %u, err: %d.\n",
-				__func__, t, t->gen, t->iovec.iov_len, err);
+				__func__, t, t->gen, (unsigned)t->iovec.iov_len, err);
 		if (err == 0)
 			err = -ECONNRESET;
 		goto err_out_unlock_return;
@@ -169,7 +169,7 @@ int netfs_trans_send(struct netfs_trans *t, struct netfs_state *st)
 
 	dprintk("%s: sent %s transaction: t: %p, gen: %u, size: %u, page_num: %u.\n",
 			__func__, (t->page_num)?"partial":"full",
-			t, t->gen, t->iovec.iov_len, t->page_num);
+			t, t->gen, (unsigned)t->iovec.iov_len, t->page_num);
 
 	err = 0;
 	if (t->attached_pages)
@@ -515,7 +515,7 @@ int netfs_trans_finish(struct netfs_trans *t, struct pohmelfs_sb *psb)
 	}
 
 	dprintk("%s: t: %u, size: %u, iov_len: %u, attached_size: %u, attached_pages: %u.\n",
-			__func__, t->gen, cmd->size, t->iovec.iov_len, t->attached_size, t->attached_pages);
+			__func__, t->gen, cmd->size, (unsigned)t->iovec.iov_len, t->attached_size, t->attached_pages);
 	err = pohmelfs_trans_crypt(t, psb);
 	if (err) {
 		t->result = err;
@@ -598,7 +598,7 @@ void *netfs_trans_add(struct netfs_trans *t, unsigned int size)
 
 	if (io->iov_len + size > t->total_size) {
 		dprintk("%s: too big size t: %p, gen: %u, iov_len: %u, size: %u, total: %u.\n",
-				__func__, t, t->gen, io->iov_len, size, t->total_size);
+				__func__, t, t->gen, (unsigned)io->iov_len, size, t->total_size);
 		ptr = ERR_PTR(-E2BIG);
 		goto out;
 	}
@@ -608,7 +608,7 @@ void *netfs_trans_add(struct netfs_trans *t, unsigned int size)
 
 out:
 	dprintk("%s: t: %p, gen: %u, size: %u, total: %u.\n",
-		__func__, t, t->gen, size, io->iov_len);
+		__func__, t, t->gen, size, (unsigned)io->iov_len);
 	return ptr;
 }
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH next 2/2] pohmelfs: fix printk format warnings
  2009-02-13 12:59 [PATCH next 2/2] pohmelfs: fix printk format warnings Alexander Beregalov
@ 2009-02-13 13:08 ` Frank Seidel
  2009-02-13 13:14 ` Evgeniy Polyakov
  1 sibling, 0 replies; 6+ messages in thread
From: Frank Seidel @ 2009-02-13 13:08 UTC (permalink / raw)
  To: Alexander Beregalov; +Cc: zbr, gregkh, linux-next, linux-kernel

Alexander Beregalov schrieb:
> drivers/staging/pohmelfs/inode.c:917: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t'
> drivers/staging/pohmelfs/inode.c:1036: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'
> drivers/staging/pohmelfs/trans.c:164: warning: format '%u' expects type 'unsigned int', but argument 5 has type '__kernel_size_t'
> drivers/staging/pohmelfs/trans.c:170: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'
> drivers/staging/pohmelfs/trans.c:517: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
> drivers/staging/pohmelfs/trans.c:600: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
> drivers/staging/pohmelfs/trans.c:610: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'
> 
> Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Frank Seidel <frank@f-seidel.de>

Looks of for me.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH next 2/2] pohmelfs: fix printk format warnings
  2009-02-13 12:59 [PATCH next 2/2] pohmelfs: fix printk format warnings Alexander Beregalov
  2009-02-13 13:08 ` Frank Seidel
@ 2009-02-13 13:14 ` Evgeniy Polyakov
  2009-02-13 13:29   ` Frank Seidel
  2009-02-13 14:37   ` Alexander Beregalov
  1 sibling, 2 replies; 6+ messages in thread
From: Evgeniy Polyakov @ 2009-02-13 13:14 UTC (permalink / raw)
  To: Alexander Beregalov; +Cc: gregkh, linux-next, linux-kernel

Hi Alexander.

On Fri, Feb 13, 2009 at 03:59:44PM +0300, Alexander Beregalov (a.beregalov@gmail.com) wrote:
> drivers/staging/pohmelfs/inode.c:917: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t'
> drivers/staging/pohmelfs/inode.c:1036: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'
> drivers/staging/pohmelfs/trans.c:164: warning: format '%u' expects type 'unsigned int', but argument 5 has type '__kernel_size_t'
> drivers/staging/pohmelfs/trans.c:170: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'
> drivers/staging/pohmelfs/trans.c:517: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
> drivers/staging/pohmelfs/trans.c:600: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
> drivers/staging/pohmelfs/trans.c:610: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'

Doesn't size_t have %zu format?

-- 
	Evgeniy Polyakov

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH next 2/2] pohmelfs: fix printk format warnings
  2009-02-13 13:14 ` Evgeniy Polyakov
@ 2009-02-13 13:29   ` Frank Seidel
  2009-02-13 14:37   ` Alexander Beregalov
  1 sibling, 0 replies; 6+ messages in thread
From: Frank Seidel @ 2009-02-13 13:29 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: Alexander Beregalov, gregkh, linux-next, linux-kernel

Evgeniy Polyakov wrote:
> Doesn't size_t have %zu format?

That's right. So that would be even more accurate.

Thanks,
Frank

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH next 2/2] pohmelfs: fix printk format warnings
  2009-02-13 13:14 ` Evgeniy Polyakov
  2009-02-13 13:29   ` Frank Seidel
@ 2009-02-13 14:37   ` Alexander Beregalov
  2009-02-13 14:42     ` Evgeniy Polyakov
  1 sibling, 1 reply; 6+ messages in thread
From: Alexander Beregalov @ 2009-02-13 14:37 UTC (permalink / raw)
  To: Evgeniy Polyakov; +Cc: gregkh, linux-next, linux-kernel

2009/2/13 Evgeniy Polyakov <zbr@ioremap.net>:
> Hi Alexander.
>
> On Fri, Feb 13, 2009 at 03:59:44PM +0300, Alexander Beregalov (a.beregalov@gmail.com) wrote:
>> drivers/staging/pohmelfs/inode.c:917: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t'
>> drivers/staging/pohmelfs/inode.c:1036: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'
>> drivers/staging/pohmelfs/trans.c:164: warning: format '%u' expects type 'unsigned int', but argument 5 has type '__kernel_size_t'
>> drivers/staging/pohmelfs/trans.c:170: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'
>> drivers/staging/pohmelfs/trans.c:517: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
>> drivers/staging/pohmelfs/trans.c:600: warning: format '%u' expects type 'unsigned int', but argument 6 has type '__kernel_size_t'
>> drivers/staging/pohmelfs/trans.c:610: warning: format '%u' expects type 'unsigned int', but argument 7 has type '__kernel_size_t'
>
> Doesn't size_t have %zu format?
Hi

Thanks for the tip, may I rewrite the patch?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH next 2/2] pohmelfs: fix printk format warnings
  2009-02-13 14:37   ` Alexander Beregalov
@ 2009-02-13 14:42     ` Evgeniy Polyakov
  0 siblings, 0 replies; 6+ messages in thread
From: Evgeniy Polyakov @ 2009-02-13 14:42 UTC (permalink / raw)
  To: Alexander Beregalov; +Cc: gregkh, linux-next, linux-kernel

On Fri, Feb 13, 2009 at 05:37:28PM +0300, Alexander Beregalov (a.beregalov@gmail.com) wrote:
> > Doesn't size_t have %zu format?
> Hi
> 
> Thanks for the tip, may I rewrite the patch?

Sure :)
Thank you.

-- 
	Evgeniy Polyakov

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-02-13 14:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-13 12:59 [PATCH next 2/2] pohmelfs: fix printk format warnings Alexander Beregalov
2009-02-13 13:08 ` Frank Seidel
2009-02-13 13:14 ` Evgeniy Polyakov
2009-02-13 13:29   ` Frank Seidel
2009-02-13 14:37   ` Alexander Beregalov
2009-02-13 14:42     ` Evgeniy Polyakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).