Skip to content

Commit 1494a4d

Browse files
sivaprasad6541igaw
authored andcommitted
nvme: Added message key for printable eye in normal format
-Printable Eye message key missing for eye plotting -Removed malloc for vsdata as memory cleanup taken care by caller Signed-off-by: Sivaprasad Gutha <[email protected]>
1 parent abe110c commit 1494a4d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

nvme-print-stdout.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ static void stdout_eom_printable_eye(struct nvme_eom_lane_desc *lane)
776776
char *eye = (char *)lane->eye_desc;
777777
int i, j;
778778

779+
printf("Printable Eye:\n");
779780
for (i = 0; i < le16_to_cpu(lane->nrows); i++) {
780781
for (j = 0; j < le16_to_cpu(lane->ncols); j++)
781782
printf("%c", eye[i * le16_to_cpu(lane->ncols) + j]);
@@ -817,17 +818,11 @@ static void stdout_phy_rx_eom_descs(struct nvme_phy_rx_eom_log *log)
817818
if (edlen == 0)
818819
continue;
819820

820-
/* Hex dump Vendor Specific Eye Data */
821-
vsdata = malloc(edlen);
822-
if (!vsdata)
823-
return;
824-
825821
vsdataoffset = (nrows * ncols) + sizeof(struct nvme_eom_lane_desc);
826822
vsdata = (unsigned char *)((unsigned char *)desc + vsdataoffset);
827823
printf("Eye Data:\n");
828824
d(vsdata, edlen, 16, 1);
829825
printf("\n");
830-
free(vsdata);
831826

832827
p += log->dsize;
833828
}

0 commit comments

Comments
 (0)