aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.c
diff options
context:
space:
mode:
authorWayne Boyer <wayneb@linux.vnet.ibm.com>2010-09-27 13:45:28 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-10-07 18:24:44 -0400
commit7262026f0eded76b935a12b9b15af05516a8610a (patch)
treea66ae900a7528feda79e9f5b40f4ec137de8aa00 /drivers/scsi/ipr.c
parent4ebcfb929b6be63bacdba34f6aae0f5b51432d2c (diff)
[SCSI] ipr: fix array error logging
The structure definitions for reporting array errors did not have the correct size for the Array WWID field. This patch fixes those definitions. It also fixes part of the output formatting that did not have newlines and fixes size calculations. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r--drivers/scsi/ipr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 3b28e8728131..df9a12c8b373 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -1671,7 +1671,7 @@ static void ipr_log_enhanced_array_error(struct ipr_ioa_cfg *ioa_cfg,
1671 1671
1672 array_entry = error->array_member; 1672 array_entry = error->array_member;
1673 num_entries = min_t(u32, be32_to_cpu(error->num_entries), 1673 num_entries = min_t(u32, be32_to_cpu(error->num_entries),
1674 sizeof(error->array_member)); 1674 ARRAY_SIZE(error->array_member));
1675 1675
1676 for (i = 0; i < num_entries; i++, array_entry++) { 1676 for (i = 0; i < num_entries; i++, array_entry++) {
1677 if (!memcmp(array_entry->vpd.vpd.sn, zero_sn, IPR_SERIAL_NUM_LEN)) 1677 if (!memcmp(array_entry->vpd.vpd.sn, zero_sn, IPR_SERIAL_NUM_LEN))
@@ -2152,8 +2152,8 @@ static void ipr_log_sis64_array_error(struct ipr_ioa_cfg *ioa_cfg,
2152 ipr_err_separator; 2152 ipr_err_separator;
2153 2153
2154 array_entry = error->array_member; 2154 array_entry = error->array_member;
2155 num_entries = min_t(u32, be32_to_cpu(error->num_entries), 2155 num_entries = min_t(u32, error->num_entries,
2156 sizeof(error->array_member)); 2156 ARRAY_SIZE(error->array_member));
2157 2157
2158 for (i = 0; i < num_entries; i++, array_entry++) { 2158 for (i = 0; i < num_entries; i++, array_entry++) {
2159 2159
@@ -2167,10 +2167,10 @@ static void ipr_log_sis64_array_error(struct ipr_ioa_cfg *ioa_cfg,
2167 2167
2168 ipr_err("Array Member %d:\n", i); 2168 ipr_err("Array Member %d:\n", i);
2169 ipr_log_ext_vpd(&array_entry->vpd); 2169 ipr_log_ext_vpd(&array_entry->vpd);
2170 ipr_err("Current Location: %s", 2170 ipr_err("Current Location: %s\n",
2171 ipr_format_res_path(array_entry->res_path, buffer, 2171 ipr_format_res_path(array_entry->res_path, buffer,
2172 sizeof(buffer))); 2172 sizeof(buffer)));
2173 ipr_err("Expected Location: %s", 2173 ipr_err("Expected Location: %s\n",
2174 ipr_format_res_path(array_entry->expected_res_path, 2174 ipr_format_res_path(array_entry->expected_res_path,
2175 buffer, sizeof(buffer))); 2175 buffer, sizeof(buffer)));
2176 2176