From: Ewan Milne <emilne@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>,
James Bottomley <JBottomley@Parallels.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/4] scsi: always use format argumets for dev_printk
Date: Mon, 19 Jan 2015 10:32:28 -0500 [thread overview]
Message-ID: <1421681548.3891.215.camel@localhost.localdomain> (raw)
In-Reply-To: <1421593891-19984-1-git-send-email-hch@lst.de>
On Sun, 2015-01-18 at 16:11 +0100, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/scsi/scsi_logging.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/scsi/scsi_logging.c b/drivers/scsi/scsi_logging.c
> index 6128303..ecc5918 100644
> --- a/drivers/scsi/scsi_logging.c
> +++ b/drivers/scsi/scsi_logging.c
> @@ -251,7 +251,7 @@ void scsi_print_command(struct scsi_cmnd *cmd)
> if (cmd->cmd_len > 16) {
> /* Print opcode in one line and use separate lines for CDB */
> off += scnprintf(logbuf + off, logbuf_len - off, "\n");
> - dev_printk(KERN_INFO, &cmd->device->sdev_gendev, logbuf);
> + dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf);
> scsi_log_release_buffer(logbuf);
> for (k = 0; k < cmd->cmd_len; k += 16) {
> size_t linelen = min(cmd->cmd_len - k, 16);
> @@ -269,7 +269,7 @@ void scsi_print_command(struct scsi_cmnd *cmd)
> 16, 1, logbuf + off,
> logbuf_len - off, false);
> }
> - dev_printk(KERN_INFO, &cmd->device->sdev_gendev,
> + dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s",
> logbuf);
> scsi_log_release_buffer(logbuf);
> }
> @@ -282,7 +282,7 @@ void scsi_print_command(struct scsi_cmnd *cmd)
> false);
> }
> out_printk:
> - dev_printk(KERN_INFO, &cmd->device->sdev_gendev, logbuf);
> + dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf);
> scsi_log_release_buffer(logbuf);
> }
> EXPORT_SYMBOL(scsi_print_command);
> @@ -360,7 +360,7 @@ scsi_log_dump_sense(const struct scsi_device *sdev, const char *name, int tag,
> hex_dump_to_buffer(&sense_buffer[i], len, 16, 1,
> logbuf + off, logbuf_len - off,
> false);
> - dev_printk(KERN_INFO, &sdev->sdev_gendev, logbuf);
> + dev_printk(KERN_INFO, &sdev->sdev_gendev, "%s", logbuf);
> }
> scsi_log_release_buffer(logbuf);
> }
> @@ -377,7 +377,7 @@ scsi_log_print_sense_hdr(const struct scsi_device *sdev, const char *name,
> return;
> off = sdev_format_header(logbuf, logbuf_len, name, tag);
> off += scsi_format_sense_hdr(logbuf + off, logbuf_len - off, sshdr);
> - dev_printk(KERN_INFO, &sdev->sdev_gendev, logbuf);
> + dev_printk(KERN_INFO, &sdev->sdev_gendev, "%s", logbuf);
> scsi_log_release_buffer(logbuf);
>
> logbuf = scsi_log_reserve_buffer(&logbuf_len);
> @@ -386,7 +386,7 @@ scsi_log_print_sense_hdr(const struct scsi_device *sdev, const char *name,
> off = sdev_format_header(logbuf, logbuf_len, name, tag);
> off += scsi_format_extd_sense(logbuf + off, logbuf_len - off,
> sshdr->asc, sshdr->ascq);
> - dev_printk(KERN_INFO, &sdev->sdev_gendev, logbuf);
> + dev_printk(KERN_INFO, &sdev->sdev_gendev, "%s", logbuf);
> scsi_log_release_buffer(logbuf);
> }
>
> @@ -483,7 +483,7 @@ void scsi_print_result(const struct scsi_cmnd *cmd, const char *msg,
> off += scnprintf(logbuf + off, logbuf_len - off,
> "driverbyte=0x%02x", driver_byte(cmd->result));
> out_printk:
> - dev_printk(KERN_INFO, &cmd->device->sdev_gendev, logbuf);
> + dev_printk(KERN_INFO, &cmd->device->sdev_gendev, "%s", logbuf);
> scsi_log_release_buffer(logbuf);
> }
> EXPORT_SYMBOL(scsi_print_result);
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
prev parent reply other threads:[~2015-01-19 15:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-18 15:11 [PATCH 1/4] scsi: always use format argumets for dev_printk Christoph Hellwig
2015-01-18 15:11 ` [PATCH 2/4] scsi: annotate sdev_prefix_printk and scmd_printk as printf-like Christoph Hellwig
2015-01-19 7:04 ` Hannes Reinecke
2015-01-19 15:32 ` Ewan Milne
2015-01-18 15:11 ` [PATCH 3/4] ch: remove debug noise in ch_do_scsi Christoph Hellwig
2015-01-19 7:05 ` Hannes Reinecke
2015-01-19 15:32 ` Ewan Milne
2015-01-18 15:11 ` [PATCH 4/4] sr: reduce debug noise in sr_do_ioctl Christoph Hellwig
2015-01-19 7:05 ` Hannes Reinecke
2015-01-19 15:33 ` Ewan Milne
2015-01-18 15:22 ` [PATCH 1/4] scsi: always use format argumets for dev_printk James Bottomley
2015-01-19 7:04 ` Hannes Reinecke
2015-01-19 15:32 ` Ewan Milne [this message]
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=1421681548.3891.215.camel@localhost.localdomain \
--to=emilne@redhat.com \
--cc=JBottomley@Parallels.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-scsi@vger.kernel.org \
/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