[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110518135823.a809f829.sfr@canb.auug.org.au>
Date: Wed, 18 May 2011 13:58:23 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: "Nicholas A. Bellinger" <nab@...ux-iscsi.org>
Cc: James Bottomley <James.Bottomley@...senPartnership.com>,
linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Kiran Patil <kiran.patil@...el.com>,
Joe Eykholt <jeykholt@...co.com>,
Christoph Hellwig <hch@....de>, Yi Zou <yi.zou@...el.com>
Subject: Re: linux-next: build warning after merge of the scsi tree
Hi Nicholas,
On Tue, 17 May 2011 19:06:02 -0700 "Nicholas A. Bellinger" <nab@...ux-iscsi.org> wrote:
>
> On Wed, 2011-05-18 at 11:49 +1000, Stephen Rothwell wrote:
> >
> > After merging the scsi tree, today's linux-next build (x86_64 allmodconfig)
> > produced this warning:
> >
> > drivers/target/tcm_fc/tfc_io.c: In function 'ft_queue_data_in':
> > drivers/target/tcm_fc/tfc_io.c:209: warning: format '%x' expects type 'unsigned int', but argument 5 has type 'size_t'
> >
> > Introduced by commit 3699d92a4d7b ("[SCSI] tcm_fc: Adding FC_FC4 provider
> > (tcm_fc) for FCoE target (TCM - target core) support").
> >
>
> It appears that this warning was fixed in LIO upstream a while back, but
> did not make it into this morning scsi-misc merge. Please apply.
>
> >From b830de5068d0c3745e83393f81d87f745ef7a4f2 Mon Sep 17 00:00:00 2001
> From: Nicholas Bellinger <nab@...ux-iscsi.org>
> Date: Thu, 17 Feb 2011 21:56:16 +0000
> Subject: [PATCH] tcm_fc: Fix conversion spec compile warning in ft_queue_data_in
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> This patch fixes the following compile warning in ft_queue_data_in():
>
> drivers/target/tcm_fc/tfc_io.c: In function ‘ft_queue_data_in’:
> drivers/target/tcm_fc/tfc_io.c:209: warning: format ‘%x’ expects type ‘unsigned int’, but argument 5 has type ‘size_t’
>
> Signed-off-by: Nicholas A. Bellinger <nab@...ux-iscsi.org>
> ---
> drivers/target/tcm_fc/tfc_io.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
> index 4c3c0ef..3936bb1 100644
> --- a/drivers/target/tcm_fc/tfc_io.c
> +++ b/drivers/target/tcm_fc/tfc_io.c
> @@ -206,7 +206,8 @@ int ft_queue_data_in(struct se_cmd *se_cmd)
> "xid <0x%x>, remaining <0x%x>, "
> "lso_max <0x%x>\n",
> __func__, fp, ep->xid,
> - remaining, lport->lso_max);
> + (unsigned int)remaining,
> + lport->lso_max);
Given that "remaining" really is a length, surely it makes more sense to
print it with %zd than to cast it and print it with %x ...
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists