array_entry = error->array_member;
num_entries = min_t(u32, be32_to_cpu(error->num_entries),
- sizeof(error->array_member));
+ ARRAY_SIZE(error->array_member));
for (i = 0; i < num_entries; i++, array_entry++) {
if (!memcmp(array_entry->vpd.vpd.sn, zero_sn, IPR_SERIAL_NUM_LEN))
ipr_err_separator;
array_entry = error->array_member;
- num_entries = min_t(u32, be32_to_cpu(error->num_entries),
- sizeof(error->array_member));
+ num_entries = min_t(u32, error->num_entries,
+ ARRAY_SIZE(error->array_member));
for (i = 0; i < num_entries; i++, array_entry++) {
ipr_err("Array Member %d:\n", i);
ipr_log_ext_vpd(&array_entry->vpd);
- ipr_err("Current Location: %s",
+ ipr_err("Current Location: %s\n",
ipr_format_res_path(array_entry->res_path, buffer,
sizeof(buffer)));
- ipr_err("Expected Location: %s",
+ ipr_err("Expected Location: %s\n",
ipr_format_res_path(array_entry->expected_res_path,
buffer, sizeof(buffer)));
__be32 wwid[2];
}__attribute__((packed));
+struct ipr_ext_vpd64 {
+ struct ipr_vpd vpd;
+ __be32 wwid[4];
+}__attribute__((packed));
+
struct ipr_std_inq_data {
u8 peri_qual_dev_type;
#define IPR_STD_INQ_PERI_QUAL(peri) ((peri) >> 5)
__be64 res_path;
struct ipr_std_inq_data std_inq_data;
u8 reserved2[4];
- __be64 reserved3[2]; // description text
+ __be64 reserved3[2];
u8 reserved4[8];
}__attribute__ ((packed, aligned (8)));
u8 array_id;
u8 last_res_path[8];
u8 protection_level[8];
- struct ipr_ext_vpd array_vpd;
+ struct ipr_ext_vpd64 array_vpd;
u8 description[16];
u8 reserved2[3];
u8 num_entries;