@@ -912,6 +912,7 @@ __u8 *pC9_string_buffer;
912
912
static void get_serial_number (struct nvme_id_ctrl * ctrl , char * sn )
913
913
{
914
914
int i ;
915
+
915
916
/* Remove trailing spaces from the name */
916
917
for (i = 0 ; i < sizeof (ctrl -> sn ); i ++ ) {
917
918
if (ctrl -> sn [i ] == ' ' )
@@ -920,8 +921,7 @@ static void get_serial_number(struct nvme_id_ctrl *ctrl, char *sn)
920
921
}
921
922
}
922
923
923
- static void print_telemetry_header (struct telemetry_initiated_log * logheader ,
924
- int tele_type )
924
+ static void print_telemetry_header (struct telemetry_initiated_log * logheader , int tele_type )
925
925
{
926
926
if (logheader ) {
927
927
unsigned int i = 0 , j = 0 ;
@@ -1610,22 +1610,21 @@ static int get_c9_log_page_data(struct nvme_dev *dev, int print_data, int save_b
1610
1610
if (!ret ) {
1611
1611
log_data = (struct telemetry_str_log_format * )header_data ;
1612
1612
if (print_data ) {
1613
- printf ("Statistics Identifier String Table Size = %lld\n" ,
1614
- log_data -> sitsz );
1613
+ printf ("Statistics Identifier String Table Size = %lld\n" , log_data -> sitsz );
1615
1614
printf ("Event String Table Size = %lld\n" , log_data -> estsz );
1616
1615
printf ("VU Event String Table Size = %lld\n" , log_data -> vu_eve_st_sz );
1617
1616
printf ("ASCII Table Size = %lld\n" , log_data -> asctsz );
1618
1617
}
1619
1618
1620
- // Calculating the offset for dynamic fields.
1619
+ /* Calculating the offset for dynamic fields. */
1621
1620
1622
1621
stat_id_str_table_ofst = log_data -> sits * 4 ;
1623
1622
event_str_table_ofst = log_data -> ests * 4 ;
1624
1623
vu_event_str_table_ofst = log_data -> vu_eve_sts * 4 ;
1625
1624
ascii_table_ofst = log_data -> ascts * 4 ;
1626
1625
total_log_page_sz = C9_TELEMETRY_STR_LOG_LEN +
1627
- (log_data -> sitsz * 4 ) + (log_data -> estsz * 4 ) +
1628
- (log_data -> vu_eve_st_sz * 4 ) + (log_data -> asctsz * 4 );
1626
+ (log_data -> sitsz * 4 ) + (log_data -> estsz * 4 ) +
1627
+ (log_data -> vu_eve_st_sz * 4 ) + (log_data -> asctsz * 4 );
1629
1628
1630
1629
if (print_data ) {
1631
1630
printf ("stat_id_str_table_ofst = %lld\n" , stat_id_str_table_ofst );
@@ -3589,9 +3588,7 @@ static void ocp_print_c9_log_binary(__u8 *log_data_buf, int total_log_page_size)
3589
3588
3590
3589
static int get_c9_log_page (struct nvme_dev * dev , char * format )
3591
3590
{
3592
-
3593
3591
int ret = 0 ;
3594
-
3595
3592
nvme_print_flags_t fmt ;
3596
3593
3597
3594
ret = validate_output_format (format , & fmt );
@@ -3616,8 +3613,10 @@ static int get_c9_log_page(struct nvme_dev *dev, char *format)
3616
3613
fprintf (stderr , "unhandled output format\n" );
3617
3614
break ;
3618
3615
}
3619
- } else
3616
+ } else {
3620
3617
fprintf (stderr , "ERROR : OCP : Unable to read C9 data from buffer\n" );
3618
+ }
3619
+
3621
3620
free (header_data );
3622
3621
return ret ;
3623
3622
}
0 commit comments