From: "Madhani, Himanshu" <Himanshu.Madhani@cavium.com>
To: Joe Perches <joe@perches.com>,
"qla2xxx-upstream@qlogic.com" <qla2xxx-upstream@qlogic.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] qla2xxx: Fix ql_dump_buffer
Date: Fri, 3 Mar 2017 19:23:42 +0000 [thread overview]
Message-ID: <SN1PR0701MB183741685AF2616384EB5A42F52B0@SN1PR0701MB1837.namprd07.prod.outlook.com> (raw)
In-Reply-To: <404b1c3a4bfd1f83211482b77b4a9680e755e32a.1488503664.git.joe@perches.com>
> -----Original Message-----
> From: Joe Perches [mailto:joe@perches.com]
> Sent: Thursday, March 2, 2017 5:15 PM
> To: qla2xxx-upstream@qlogic.com
> Cc: James E.J. Bottomley <jejb@linux.vnet.ibm.com>; Martin K. Petersen
> <martin.petersen@oracle.com>; linux-scsi@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH] qla2xxx: Fix ql_dump_buffer
>
> Recent printk changes for KERN_CONT cause this logging to be defectively
> emitted on multiple lines. Fix it.
>
> Also reduces object size a trivial amount.
>
> $ size drivers/scsi/qla2xxx/qla_dbg.o*
> text data bss dec hex filename
> 39125 0 0 39125 98d5 drivers/scsi/qla2xxx/qla_dbg.o.new
> 39164 0 0 39164 98fc drivers/scsi/qla2xxx/qla_dbg.o.old
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/scsi/qla2xxx/qla_dbg.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
> index 21d9fb7fc887..51b4179469d1 100644
> --- a/drivers/scsi/qla2xxx/qla_dbg.c
> +++ b/drivers/scsi/qla2xxx/qla_dbg.c
> @@ -2707,13 +2707,9 @@ ql_dump_buffer(uint32_t level, scsi_qla_host_t
> *vha, int32_t id,
> "%-+5d 0 1 2 3 4 5 6 7 8 9 A B C D E F\n", size);
> ql_dbg(level, vha, id,
> "----- -----------------------------------------------\n");
> - for (cnt = 0; cnt < size; cnt++, buf++) {
> - if (cnt % 16 == 0)
> - ql_dbg(level, vha, id, "%04x:", cnt & ~0xFU);
> - printk(" %02x", *buf);
> - if (cnt % 16 == 15)
> - printk("\n");
> + for (cnt = 0; cnt < size; cnt += 16) {
> + ql_dbg(level, vha, id, "%04x: ", cnt);
> + print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16,
> 1,
> + buf + cnt, min(16U, size - cnt), false);
> }
> - if (cnt % 16 != 0)
> - printk("\n");
> }
> --
> 2.10.0.rc2.1.g053435c
Looks Good.
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
next prev parent reply other threads:[~2017-03-03 19:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 1:14 [PATCH] qla2xxx: Fix ql_dump_buffer Joe Perches
2017-03-03 19:23 ` Madhani, Himanshu [this message]
2017-03-07 3:24 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SN1PR0701MB183741685AF2616384EB5A42F52B0@SN1PR0701MB1837.namprd07.prod.outlook.com \
--to=himanshu.madhani@cavium.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=qla2xxx-upstream@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).