Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751877AbdLKXCU (ORCPT ); Mon, 11 Dec 2017 18:02:20 -0500 Received: from mx1.polytechnique.org ([129.104.30.34]:32793 "EHLO mx1.polytechnique.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750759AbdLKXCR (ORCPT ); Mon, 11 Dec 2017 18:02:17 -0500 X-Greylist: delayed 442 seconds by postgrey-1.27 at vger.kernel.org; Mon, 11 Dec 2017 18:02:16 EST X-Google-Smtp-Source: ACJfBosD1t33sd0d02javgLKOtS7lm/fuKWQHvnvfELOhATpJltz94YJlx8xOCkDQI8W31O2v7n/Gg/AmvqK8HM92WY= MIME-Version: 1.0 In-Reply-To: <1513030969.2747.19.camel@wdc.com> References: <20171210192311.5334-1-nicolas.iooss_linux@m4x.org> <1513030969.2747.19.camel@wdc.com> From: Nicolas Iooss Date: Mon, 11 Dec 2017 23:54:49 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/1] scsi: fnic: add a space after %p in printf format To: Bart Van Assche Cc: "kartilak@cisco.com" , "linux-scsi@vger.kernel.org" , "satishkh@cisco.com" , "sebaddel@cisco.com" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Mon Dec 11 23:54:51 2017 +0100 (CET)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.000000, queueID=51CCC56495B Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1570 Lines: 39 On Mon, Dec 11, 2017 at 11:22 PM, Bart Van Assche wrote: > > 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 > > --- > > 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? Does it? On the kernel I use it does not, and the documentation for %p does not show a 0x prefix (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/printk-formats.txt?h=v4.15-rc3#n57). Nicolas