Skip to content

Commit e152e97

Browse files
ikegami-tigaw
authored andcommitted
ocp: fix ocp-nvme.c coding style errors
Only fixed some errors found by the file changes. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
1 parent f0379a8 commit e152e97

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

plugins/ocp/ocp-nvme.c

+9-10
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,7 @@ __u8 *pC9_string_buffer;
912912
static void get_serial_number(struct nvme_id_ctrl *ctrl, char *sn)
913913
{
914914
int i;
915+
915916
/* Remove trailing spaces from the name */
916917
for (i = 0; i < sizeof(ctrl->sn); i++) {
917918
if (ctrl->sn[i] == ' ')
@@ -920,8 +921,7 @@ static void get_serial_number(struct nvme_id_ctrl *ctrl, char *sn)
920921
}
921922
}
922923

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)
925925
{
926926
if (logheader) {
927927
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
16101610
if (!ret) {
16111611
log_data = (struct telemetry_str_log_format *)header_data;
16121612
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);
16151614
printf("Event String Table Size = %lld\n", log_data->estsz);
16161615
printf("VU Event String Table Size = %lld\n", log_data->vu_eve_st_sz);
16171616
printf("ASCII Table Size = %lld\n", log_data->asctsz);
16181617
}
16191618

1620-
//Calculating the offset for dynamic fields.
1619+
/* Calculating the offset for dynamic fields. */
16211620

16221621
stat_id_str_table_ofst = log_data->sits * 4;
16231622
event_str_table_ofst = log_data->ests * 4;
16241623
vu_event_str_table_ofst = log_data->vu_eve_sts * 4;
16251624
ascii_table_ofst = log_data->ascts * 4;
16261625
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);
16291628

16301629
if (print_data) {
16311630
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)
35893588

35903589
static int get_c9_log_page(struct nvme_dev *dev, char *format)
35913590
{
3592-
35933591
int ret = 0;
3594-
35953592
nvme_print_flags_t fmt;
35963593

35973594
ret = validate_output_format(format, &fmt);
@@ -3616,8 +3613,10 @@ static int get_c9_log_page(struct nvme_dev *dev, char *format)
36163613
fprintf(stderr, "unhandled output format\n");
36173614
break;
36183615
}
3619-
} else
3616+
} else {
36203617
fprintf(stderr, "ERROR : OCP : Unable to read C9 data from buffer\n");
3618+
}
3619+
36213620
free(header_data);
36223621
return ret;
36233622
}

0 commit comments

Comments
 (0)