From: Don Brace <don.brace@pmcs.com>
To: 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,
james.bottomley@parallels.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH 1/3] hpsa: fix path_info_show
Date: Wed, 09 Dec 2015 15:18:44 -0600 [thread overview]
Message-ID: <20151209211844.519.32243.stgit@brunhilda> (raw)
In-Reply-To: <20151209211816.519.50876.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>
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-09 21:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 21:18 [PATCH 0/3] hpsa update Don Brace
2015-12-09 21:18 ` Don Brace [this message]
2015-12-09 23:15 ` [PATCH 1/3] hpsa: fix path_info_show Matthew R. Ochs
2015-12-09 21:18 ` [PATCH 2/3] hpsa: change SAS transport devices to bus 0 Don Brace
2015-12-09 23:21 ` Matthew R. Ochs
2015-12-15 15:25 ` Don Brace
2015-12-18 20:14 ` Matthew R. Ochs
2015-12-09 21:18 ` [PATCH 3/3] hpsa: add box and bay information for enclosure devices Don Brace
2015-12-09 23:41 ` Matthew R. Ochs
2015-12-18 20:19 ` Matthew R. Ochs
2015-12-21 17:09 ` Don Brace
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=20151209211844.519.32243.stgit@brunhilda \
--to=don.brace@pmcs.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=james.bottomley@parallels.com \
--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