From: Don Brace <don.brace@pmcs.com>
To: JBottomley@odin.com, Viswas.G@pmcs.com, scott.teel@pmcs.com,
Kevin.Barnett@pmcs.com, scott.benesh@pmcs.com,
Mahesh.Rajashekhara@pmcs.com, hch@infradead.org,
Justin.Lindley@pmcs.com, elliott@hpe.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH v3 1/3] hpsa: fix path_info_show
Date: Tue, 22 Dec 2015 10:36:36 -0600 [thread overview]
Message-ID: <20151222163636.16655.63103.stgit@brunhilda> (raw)
In-Reply-To: <20151222163508.16655.97012.stgit@brunhilda>
left off some changes from Rasmus Villemoes where he changed
snprintf to scnprintf
Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Justin Lindley <justin.lindley@pmcs.com>
Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com>
Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Reviewed-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
---
drivers/scsi/hpsa.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index a386036..f8370b8 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -795,7 +795,7 @@ static ssize_t path_info_show(struct device *dev,
if (hdev->external ||
hdev->devtype == TYPE_RAID ||
is_logical_device(hdev)) {
- output_len += snprintf(buf + output_len,
+ output_len += scnprintf(buf + output_len,
PAGE_SIZE - output_len,
"%s\n", active);
continue;
@@ -809,28 +809,28 @@ static ssize_t path_info_show(struct device *dev,
if (phys_connector[1] < '0')
phys_connector[1] = '0';
if (hdev->phys_connector[i] > 0)
- output_len += snprintf(buf + output_len,
+ output_len += scnprintf(buf + output_len,
PAGE_SIZE - output_len,
"PORT: %.2s ",
phys_connector);
if (hdev->devtype == TYPE_DISK && hdev->expose_device) {
if (box == 0 || box == 0xFF) {
- output_len += snprintf(buf + output_len,
+ output_len += scnprintf(buf + output_len,
PAGE_SIZE - output_len,
"BAY: %hhu %s\n",
bay, active);
} else {
- output_len += snprintf(buf + output_len,
+ output_len += scnprintf(buf + output_len,
PAGE_SIZE - output_len,
"BOX: %hhu BAY: %hhu %s\n",
box, bay, active);
}
} else if (box != 0 && box != 0xFF) {
- output_len += snprintf(buf + output_len,
+ output_len += scnprintf(buf + output_len,
PAGE_SIZE - output_len, "BOX: %hhu %s\n",
box, active);
} else
- output_len += snprintf(buf + output_len,
+ output_len += scnprintf(buf + output_len,
PAGE_SIZE - output_len, "%s\n", active);
}
next prev parent reply other threads:[~2015-12-22 16:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-22 16:36 [PATCH v3 0/3] hpsa update Don Brace
2015-12-22 16:36 ` Don Brace [this message]
2015-12-22 16:36 ` [PATCH v3 2/3] hpsa: change SAS transport devices to bus 0 Don Brace
2015-12-22 16:36 ` [PATCH v3 3/3] hpsa: add box and bay information for enclosure devices Don Brace
2016-01-05 1:59 ` [PATCH v3 0/3] hpsa update 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=20151222163636.16655.63103.stgit@brunhilda \
--to=don.brace@pmcs.com \
--cc=JBottomley@odin.com \
--cc=Justin.Lindley@pmcs.com \
--cc=Kevin.Barnett@pmcs.com \
--cc=Mahesh.Rajashekhara@pmcs.com \
--cc=Viswas.G@pmcs.com \
--cc=elliott@hpe.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=scott.benesh@pmcs.com \
--cc=scott.teel@pmcs.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