lkml.org 
[lkml]   [2017]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/1] scsi: fnic: add a space after %p in printf format
Date
On Sun, 2017-12-10 at 20:23 +0100, Nicolas Iooss wrote:
> fnic_fcpio_icmnd_cmpl_handler() displays the value of sc with:
>
> FNIC_SCSI_DBG(KERN_INFO...
> "... sc = 0x%p"
> "scsi_status ..."
> ...
>
> As the literal strings get merged, the function uses %ps instead of the
> intended raw %p format. Fix this by inserting a space.
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> ---
> drivers/scsi/fnic/fnic_scsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
> index 242e2ee494a1..8cbd3c9f0b4c 100644
> --- a/drivers/scsi/fnic/fnic_scsi.c
> +++ b/drivers/scsi/fnic/fnic_scsi.c
> @@ -906,7 +906,7 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic,
>
> FNIC_SCSI_DBG(KERN_INFO, fnic->lport->host,
> "icmnd_cmpl abts pending "
> - "hdr status = %s tag = 0x%x sc = 0x%p"
> + "hdr status = %s tag = 0x%x sc = 0x%p "
> "scsi_status = %x residual = %d\n",

Since the %p format specifier already inserts a 0x prefix, shouldn't 0x%p be changed
into %p?

Bart.
\
 
 \ /
  Last update: 2017-12-11 23:23    [W:0.063 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site