diff --git a/examples/nvme/hotplug/hotplug.c b/examples/nvme/hotplug/hotplug.c index 6948f3143..c38b1436e 100644 --- a/examples/nvme/hotplug/hotplug.c +++ b/examples/nvme/hotplug/hotplug.c @@ -388,7 +388,7 @@ parse_args(int argc, char **argv) { int op; - /* default value*/ + /* default value */ g_time_in_sec = 0; while ((op = getopt(argc, argv, "i:n:r:t:")) != -1) { diff --git a/examples/nvme/identify/identify.c b/examples/nvme/identify/identify.c index 3a2901567..c151c6057 100644 --- a/examples/nvme/identify/identify.c +++ b/examples/nvme/identify/identify.c @@ -318,7 +318,7 @@ print_uint128_dec(uint64_t *v) } } -/* The len should be <= 8.*/ +/* The len should be <= 8. */ static void print_uint_var_dec(uint8_t *array, unsigned int len) { diff --git a/examples/nvme/perf/perf.c b/examples/nvme/perf/perf.c index 1def610ff..73ffb3398 100644 --- a/examples/nvme/perf/perf.c +++ b/examples/nvme/perf/perf.c @@ -862,7 +862,7 @@ parse_args(int argc, char **argv) int op; bool mix_specified = false; - /* default value*/ + /* default value */ g_queue_depth = 0; g_io_size_bytes = 0; workload_type = NULL; diff --git a/include/spdk/bdev.h b/include/spdk/bdev.h index 82c3e11a1..ca608c8ce 100644 --- a/include/spdk/bdev.h +++ b/include/spdk/bdev.h @@ -289,10 +289,10 @@ struct spdk_bdev_io { */ bool in_submit_request; - /** Used in virtual device (e.g., RAID), indicates its parent spdk_bdev_io **/ + /** Used in virtual device (e.g., RAID), indicates its parent spdk_bdev_io */ struct spdk_bdev_io *parent; - /** Used in virtual device (e.g., RAID) for storing multiple child device I/Os **/ + /** Used in virtual device (e.g., RAID) for storing multiple child device I/Os */ TAILQ_HEAD(child_io, spdk_bdev_io) child_io; /** Member used for linking child I/Os together. */ diff --git a/lib/blob/blobstore.c b/lib/blob/blobstore.c index ec2b2bb84..4a1252d21 100644 --- a/lib/blob/blobstore.c +++ b/lib/blob/blobstore.c @@ -1176,7 +1176,7 @@ _spdk_bs_load_used_clusters_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserr /* The length of the mask (in bits) must not be greater than the length of the buffer (converted to bits) */ assert(ctx->mask->length <= (ctx->super->used_cluster_mask_len * sizeof( struct spdk_blob_md_page) * 8)); - /* The length of the mask must be exactly equal to the total number of clusters*/ + /* The length of the mask must be exactly equal to the total number of clusters */ assert(ctx->mask->length == ctx->bs->total_clusters); rc = spdk_bit_array_resize(&ctx->bs->used_clusters, ctx->bs->total_clusters); diff --git a/lib/copy/ioat/copy_engine_ioat.c b/lib/copy/ioat/copy_engine_ioat.c index 2f065da7a..7ae6cc014 100644 --- a/lib/copy/ioat/copy_engine_ioat.c +++ b/lib/copy/ioat/copy_engine_ioat.c @@ -287,7 +287,7 @@ copy_engine_ioat_init(void) return 0; } - /*Init the whitelist*/ + /* Init the whitelist */ for (i = 0; i < IOAT_MAX_CHANNELS; i++) { pci_bdf = spdk_conf_section_get_nmval(sp, "Whitelist", i, 0); if (!pci_bdf) diff --git a/lib/env_dpdk/pci.c b/lib/env_dpdk/pci.c index 9259b99d1..08e545404 100644 --- a/lib/env_dpdk/pci.c +++ b/lib/env_dpdk/pci.c @@ -330,7 +330,7 @@ spdk_pci_device_get_serial_number(struct spdk_pci_device *dev, char *sn, size_t while (1) { if ((header & 0x0000ffff) == PCI_EXT_CAP_ID_SN) { if (pos) { - /*skip the header*/ + /* skip the header */ pos += 4; for (i = 0; i < 2; i++) { err = spdk_pci_device_cfg_read32(dev, &buf[i], pos + 4 * i); @@ -342,7 +342,7 @@ spdk_pci_device_get_serial_number(struct spdk_pci_device *dev, char *sn, size_t } } pos = (header >> 20) & 0xffc; - /*0 if no other items exist*/ + /* 0 if no other items exist */ if (pos < PCI_CFG_SIZE) return -1; err = spdk_pci_device_cfg_read32(dev, &header, pos); diff --git a/lib/iscsi/conn.h b/lib/iscsi/conn.h index ee6ead2ea..e991d4796 100644 --- a/lib/iscsi/conn.h +++ b/lib/iscsi/conn.h @@ -152,7 +152,7 @@ struct spdk_iscsi_conn { uint32_t StatSN; uint32_t exp_statsn; - uint32_t ttt; /* target transfer tag*/ + uint32_t ttt; /* target transfer tag */ char *partial_text_parameter; STAILQ_ENTRY(spdk_iscsi_conn) link; diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index fdac9ae91..f46810b44 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -2151,13 +2151,13 @@ spdk_iscsi_op_login_rsp_handle(struct spdk_iscsi_conn *conn, rsp_pdu->data_segment_len = rc; SPDK_TRACEDUMP(SPDK_TRACE_DEBUG, "Negotiated Params", rsp_pdu->data, rc); - /* handle the CSG bit case*/ + /* handle the CSG bit case */ rc = spdk_iscsi_op_login_rsp_handle_csg_bit(conn, rsp_pdu, params, alloc_len); if (rc < 0) return rc; - /*handle the T bit case*/ + /* handle the T bit case */ if (ISCSI_BHS_LOGIN_GET_TBIT(rsph->flags)) rc = spdk_iscsi_op_login_rsp_handle_t_bit(conn, rsp_pdu); @@ -2188,7 +2188,7 @@ spdk_iscsi_op_login(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) return rc; } - /*For other values, we need to directly return*/ + /* For other values, we need to directly return */ if (rc < 0) { spdk_put_pdu(rsp_pdu); return rc; @@ -2994,7 +2994,7 @@ spdk_iscsi_op_scsi(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) return SPDK_ISCSI_CONNECTION_FATAL; } - /* check the ImmediateData and also pdu->data_segment_len*/ + /* check the ImmediateData and also pdu->data_segment_len */ if ((!conn->sess->ImmediateData && (pdu->data_segment_len > 0)) || (pdu->data_segment_len > conn->sess->FirstBurstLength)) { spdk_iscsi_task_put(task); @@ -3625,7 +3625,7 @@ void spdk_clear_all_transfer_task(struct spdk_iscsi_conn *conn, spdk_del_connection_queued_task(&conn->queued_r2t_tasks, lun); } -/* This function is used to hanlde the r2t snack*/ +/* This function is used to handle the r2t snack */ static int spdk_iscsi_handle_r2t_snack(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task, @@ -3667,7 +3667,7 @@ spdk_iscsi_handle_r2t_snack(struct spdk_iscsi_conn *conn, return 0; } -/* This function is used to recover the data in packet*/ +/* This function is used to recover the data in packet */ static int spdk_iscsi_handle_recovery_datain(struct spdk_iscsi_conn *conn, struct spdk_iscsi_task *task, @@ -3722,7 +3722,7 @@ spdk_iscsi_handle_recovery_datain(struct spdk_iscsi_conn *conn, return 0; } -/* This function is used to handle the status snack*/ +/* This function is used to handle the status snack */ static int spdk_iscsi_handle_status_snack(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) @@ -3779,7 +3779,7 @@ spdk_iscsi_handle_status_snack(struct spdk_iscsi_conn *conn, return 0; } -/*This function is used to handle the data ack snack*/ +/* This function is used to handle the data ack snack */ static int spdk_iscsi_handle_data_ack(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) @@ -3931,7 +3931,7 @@ spdk_iscsi_send_r2t_recovery(struct spdk_iscsi_conn *conn, return 0; } -/*This function is used to handle the snack request from the initiator*/ +/* This function is used to handle the snack request from the initiator */ static int spdk_iscsi_op_snack(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) { @@ -4009,7 +4009,7 @@ spdk_iscsi_op_snack(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu) return rc; } -/*This fucntion is used to refree the pdu when it is acknowledged*/ +/* This fucntion is used to refree the pdu when it is acknowledged */ static void spdk_remove_acked_pdu(struct spdk_iscsi_conn *conn, uint32_t ExpStatSN) @@ -4173,7 +4173,7 @@ spdk_iscsi_send_r2t(struct spdk_iscsi_conn *conn, to_be32(&rsph->r2t_sn, *R2TSN); *R2TSN += 1; - task->r2t_datasn = 0; /*next expected datasn to ack*/ + task->r2t_datasn = 0; /* next expected datasn to ack */ to_be32(&rsph->buffer_offset, (uint32_t)offset); to_be32(&rsph->desired_xfer_len, (uint32_t)len); diff --git a/lib/iscsi/param.c b/lib/iscsi/param.c index ca7d241df..f1be26579 100644 --- a/lib/iscsi/param.c +++ b/lib/iscsi/param.c @@ -590,10 +590,10 @@ spdk_iscsi_special_param_construction(struct spdk_iscsi_conn *conn, } /** -* spdk_iscsi_construct_data_from_param: -* To construct the data which will be returned to the initiator -* return: length of the negotiated data, -1 inidicates error; -*/ + * spdk_iscsi_construct_data_from_param: + * To construct the data which will be returned to the initiator + * return: length of the negotiated data, -1 inidicates error; + */ static int spdk_iscsi_construct_data_from_param(struct iscsi_param *param, char *new_val, char *data, int alloc_len, int total) @@ -619,10 +619,10 @@ spdk_iscsi_construct_data_from_param(struct iscsi_param *param, char *new_val, } /** -* To negotiate param with -* type = ISPT_LIST - return: the negotiated value of the key -*/ + * To negotiate param with + * type = ISPT_LIST + * return: the negotiated value of the key + */ static char *spdk_iscsi_negotiate_param_list(int *add_param_value, struct iscsi_param *param, char *valid_list, char *in_val, @@ -668,10 +668,10 @@ static char *spdk_iscsi_negotiate_param_list(int *add_param_value, } /** -* To negotiate param with -* type = ISPT_NUMERICAL_MIN/MAX, ISPT_NUMERICAL_DECLARATIVE - return: the negotiated value of the key -*/ + * To negotiate param with + * type = ISPT_NUMERICAL_MIN/MAX, ISPT_NUMERICAL_DECLARATIVE + * return: the negotiated value of the key + */ static char *spdk_iscsi_negotiate_param_numerical(int *add_param_value, struct iscsi_param *param, char *valid_list, char *in_val, @@ -723,10 +723,10 @@ static char *spdk_iscsi_negotiate_param_numerical(int *add_param_value, } /** -* To negotiate param with -* type = ISPT_BOOLEAN_OR, ISPT_BOOLEAN_AND - return: the negotiated value of the key -*/ + * To negotiate param with + * type = ISPT_BOOLEAN_OR, ISPT_BOOLEAN_AND + * return: the negotiated value of the key + */ static char *spdk_iscsi_negotiate_param_boolean(int *add_param_value, struct iscsi_param *param, char *in_val, char *cur_val, @@ -759,7 +759,7 @@ static char *spdk_iscsi_negotiate_param_boolean(int *add_param_value, /** * The entry function to handle each type of the param * return value: the new negotiated value -*/ + */ static char * spdk_iscsi_negotiate_param_all(int *add_param_value, struct iscsi_param *param, char *valid_list, char *in_val, char *cur_val) @@ -811,7 +811,7 @@ spdk_iscsi_negotiate_param_all(int *add_param_value, struct iscsi_param *param, /** * This function is used to judge whether the param is in session's params or * connection's params -*/ + */ static int spdk_iscsi_negotiate_param_init(struct spdk_iscsi_conn *conn, struct iscsi_param **cur_param_p, @@ -928,13 +928,13 @@ spdk_iscsi_negotiate_params(struct spdk_iscsi_conn *conn, } /* To adjust the location of FirstBurstLength location and put it to - * the end, then we can always firstly determine the MaxBurstLength - */ + * the end, then we can always firstly determine the MaxBurstLength + */ param = spdk_iscsi_param_find(params, "MaxBurstLength"); if (param != NULL) { param = spdk_iscsi_param_find(params, "FirstBurstLength"); - /*check the existence of FirstBurstLength*/ + /* check the existence of FirstBurstLength */ if (param != NULL) { FirstBurstLength_flag = true; if (param->next != NULL) { diff --git a/lib/iscsi/task.h b/lib/iscsi/task.h index 9dfd5939a..e54ee371b 100644 --- a/lib/iscsi/task.h +++ b/lib/iscsi/task.h @@ -68,7 +68,7 @@ struct spdk_iscsi_task { */ uint32_t next_r2t_offset; uint32_t R2TSN; - uint32_t r2t_datasn; /* record next datasn for a r2tsn*/ + uint32_t r2t_datasn; /* record next datasn for a r2tsn */ uint32_t acked_r2tsn; /* next r2tsn to be acked */ uint32_t datain_datasn; uint32_t acked_data_sn; /* next expected datain datasn */ diff --git a/lib/net/interface.c b/lib/net/interface.c index db77f0e6e..8e7c34a89 100644 --- a/lib/net/interface.c +++ b/lib/net/interface.c @@ -388,7 +388,7 @@ static int netlink_addr_msg(uint32_t ifc_idx, uint32_t ip_address, uint32_t crea /* setup the service header (struct rtmsg). */ req.r.ifa_family = AF_INET; - req.r.ifa_prefixlen = 32; /*hardcoded*/ + req.r.ifa_prefixlen = 32; /* hardcoded */ req.r.ifa_flags = IFA_F_PERMANENT | IFA_F_SECONDARY; req.r.ifa_index = ifc_idx; req.r.ifa_scope = 0; diff --git a/lib/nvmf/direct.c b/lib/nvmf/direct.c index e1b64c540..edc57b230 100644 --- a/lib/nvmf/direct.c +++ b/lib/nvmf/direct.c @@ -213,13 +213,13 @@ nvmf_direct_ctrlr_process_admin_cmd(struct spdk_nvmf_request *req) case SPDK_NVME_OPC_KEEP_ALIVE: SPDK_TRACELOG(SPDK_TRACE_NVMF, "Keep Alive\n"); /* - To handle keep alive just clear or reset the - session based keep alive duration counter. - When added, a separate timer based process - will monitor if the time since last recorded - keep alive has exceeded the max duration and - take appropriate action. - */ + * To handle keep alive just clear or reset the + * session based keep alive duration counter. + * When added, a separate timer based process + * will monitor if the time since last recorded + * keep alive has exceeded the max duration and + * take appropriate action. + */ //session->keep_alive_timestamp = ; return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; diff --git a/lib/nvmf/virtual.c b/lib/nvmf/virtual.c index 7f8d87576..c6f43b213 100644 --- a/lib/nvmf/virtual.c +++ b/lib/nvmf/virtual.c @@ -345,13 +345,13 @@ nvmf_virtual_ctrlr_process_admin_cmd(struct spdk_nvmf_request *req) case SPDK_NVME_OPC_KEEP_ALIVE: SPDK_TRACELOG(SPDK_TRACE_NVMF, "Keep Alive\n"); /* - To handle keep alive just clear or reset the - session based keep alive duration counter. - When added, a separate timer based process - will monitor if the time since last recorded - keep alive has exceeded the max duration and - take appropriate action. - */ + * To handle keep alive just clear or reset the + * session based keep alive duration counter. + * When added, a separate timer based process + * will monitor if the time since last recorded + * keep alive has exceeded the max duration and + * take appropriate action. + */ //session->keep_alive_timestamp = ; return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; diff --git a/lib/scsi/lun.c b/lib/scsi/lun.c index 7430445ad..2a4946be6 100644 --- a/lib/scsi/lun.c +++ b/lib/scsi/lun.c @@ -281,7 +281,7 @@ static void spdk_scsi_lun_hot_remove(void *remove_ctx) lun->lcore, 0); } -/*! +/** \brief Constructs a new spdk_scsi_lun object based on the provided parameters. diff --git a/lib/scsi/scsi_bdev.c b/lib/scsi/scsi_bdev.c index 4581221c1..e85c8ffbf 100644 --- a/lib/scsi/scsi_bdev.c +++ b/lib/scsi/scsi_bdev.c @@ -415,7 +415,7 @@ spdk_bdev_scsi_inquiry(struct spdk_bdev *bdev, struct spdk_scsi_task *task, /* MLUS(7) MODE PAGE POLICY(1-0) */ /* MLUS own copy */ - /* Shared MODE PAGE policy*/ + /* Shared MODE PAGE policy */ pdesc->policy = 0; /* Reserved */ pdesc->reserved = 0; diff --git a/lib/trace/trace.c b/lib/trace/trace.c index a39436439..ef782dc45 100644 --- a/lib/trace/trace.c +++ b/lib/trace/trace.c @@ -215,7 +215,7 @@ spdk_trace_register_owner(uint8_t type, char id_prefix) /* 'owner' has 256 entries and since 'type' is a uint8_t, it * can't overrun the array. - */ + */ owner = &g_trace_histories->owner[type]; assert(owner->type == 0); @@ -232,7 +232,7 @@ spdk_trace_register_object(uint8_t type, char id_prefix) /* 'object' has 256 entries and since 'type' is a uint8_t, it * can't overrun the array. - */ + */ object = &g_trace_histories->object[type]; assert(object->type == 0); diff --git a/lib/vhost/rte_vhost/fd_man.h b/lib/vhost/rte_vhost/fd_man.h index bd66ed1c5..b1e7ad53a 100644 --- a/lib/vhost/rte_vhost/fd_man.h +++ b/lib/vhost/rte_vhost/fd_man.h @@ -43,7 +43,7 @@ typedef void (*fd_cb)(int fd, void *dat, int *remove); struct fdentry { int fd; /* -1 indicates this entry is empty */ fd_cb rcb; /* callback when this fd is readable. */ - fd_cb wcb; /* callback when this fd is writeable.*/ + fd_cb wcb; /* callback when this fd is writeable. */ void *dat; /* fd context */ int busy; /* whether this entry is being used in cb. */ }; diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index f3cad48d2..f9d714712 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -302,7 +302,7 @@ get_scsi_lun(struct spdk_scsi_dev *scsi_dev, const __u8 *lun) { uint16_t lun_id = (((uint16_t)lun[2] << 8) | lun[3]) & 0x3FFF; - /* For now only one LUN per controller is allowed so no need to search LUN IDs*/ + /* For now only one LUN per controller is allowed so no need to search LUN IDs */ return likely(scsi_dev != NULL && lun_id < scsi_dev->maxlun) ? scsi_dev->lun[lun_id] : NULL; } diff --git a/scripts/check_format.sh b/scripts/check_format.sh index a81239ed8..efe1e3b98 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -36,6 +36,20 @@ else echo "You do not have astyle installed so your code style is not being checked!" fi +echo -n "Checking comment style..." + +git grep -e '/[*][^ *-]' -- '*.[ch]' > comment.log || true +git grep -e '[^ ][*]/' -- '*.[ch]' >> comment.log || true + +if [ -s comment.log ]; then + echo " Incorrect comment formatting detected" + cat comment.log + rc=1 +else + echo " OK" +fi +rm -f comment.log + echo -n "Checking blank lines at end of file..." if ! git grep -I -l -e . -z | \ diff --git a/test/lib/bdev/bdevperf/bdevperf.c b/test/lib/bdev/bdevperf/bdevperf.c index e3862c0f5..5ca8912ff 100644 --- a/test/lib/bdev/bdevperf/bdevperf.c +++ b/test/lib/bdev/bdevperf/bdevperf.c @@ -509,7 +509,7 @@ main(int argc, char **argv) int op; bool mix_specified; - /* default value*/ + /* default value */ config_file = NULL; g_queue_depth = 0; g_io_size = 0; @@ -660,7 +660,7 @@ main(int argc, char **argv) g_zcopy = false; } - optind = 1; /*reset the optind */ + optind = 1; /* reset the optind */ rte_set_log_level(RTE_LOG_ERR); diff --git a/test/lib/event/event_perf/event_perf.c b/test/lib/event/event_perf/event_perf.c index 13ede4548..fa0f4e49a 100644 --- a/test/lib/event/event_perf/event_perf.c +++ b/test/lib/event/event_perf/event_perf.c @@ -148,7 +148,7 @@ main(int argc, char **argv) exit(1); } - optind = 1; /*reset the optind */ + optind = 1; /* reset the optind */ spdk_app_init(&opts); diff --git a/test/lib/iscsi/param/param_ut.c b/test/lib/iscsi/param/param_ut.c index e11d27c99..fa8cc263e 100644 --- a/test/lib/iscsi/param/param_ut.c +++ b/test/lib/iscsi/param/param_ut.c @@ -116,7 +116,7 @@ burst_length_param_negotation(int FirstBurstLength, int MaxBurstLength, rc = spdk_iscsi_conn_params_init(&conn.params); CU_ASSERT(rc == 0); - /* construct the data*/ + /* construct the data */ len = snprintf(data + total, 8192 - total, "%s=%d", "FirstBurstLength", FirstBurstLength); total += len + 1; @@ -249,7 +249,7 @@ parse_valid_test(void) CU_ASSERT(rc == 0); free(data); - /* partial parameter: value is partial*/ + /* partial parameter: value is partial */ PARSE("C=AAA\0D=B", true, &partial_parameter); SPDK_CU_ASSERT_FATAL(partial_parameter != NULL); CU_ASSERT_STRING_EQUAL(partial_parameter, "D=B"); @@ -262,7 +262,7 @@ parse_valid_test(void) EXPECT_VAL("E", "UUUU"); CU_ASSERT_PTR_NULL(partial_parameter); - /* partial parameter: key is partial*/ + /* partial parameter: key is partial */ PARSE("IAMAFAK", true, &partial_parameter); CU_ASSERT_STRING_EQUAL(partial_parameter, "IAMAFAK"); CU_ASSERT(rc == 0); @@ -327,7 +327,7 @@ parse_invalid_test(void) CU_ASSERT(rc != 0); EXPECT_NULL("CHAP_C"); - /* Test simple value, length of value bigger than 255*/ + /* Test simple value, length of value bigger than 255 */ len = strlen("A=") + ISCSI_TEXT_MAX_SIMPLE_VAL_LEN + 1 /* max simple value len + 1 */ + 1 /* null terminators */; data = malloc(len); @@ -341,8 +341,8 @@ parse_invalid_test(void) EXPECT_NULL("A"); /* key length bigger than 63 */ - len = ISCSI_TEXT_MAX_KEY_LEN + 1 /*max key length + 1*/ + 1 /* = */ + 1 /* A */ + - 1/* null terminators */; + len = ISCSI_TEXT_MAX_KEY_LEN + 1 /* max key length + 1 */ + 1 /* = */ + 1 /* A */ + + 1 /* null terminators */; data = malloc(len); SPDK_CU_ASSERT_FATAL(data != NULL); memset(data, 'A', len); diff --git a/test/lib/nvme/overhead/overhead.c b/test/lib/nvme/overhead/overhead.c index 8fecf8838..48e501457 100644 --- a/test/lib/nvme/overhead/overhead.c +++ b/test/lib/nvme/overhead/overhead.c @@ -497,7 +497,7 @@ parse_args(int argc, char **argv) { int op; - /* default value*/ + /* default value */ g_io_size_bytes = 0; g_time_in_sec = 0; diff --git a/test/lib/nvme/reset/reset.c b/test/lib/nvme/reset/reset.c index 8e7fa6acc..8edf119dc 100644 --- a/test/lib/nvme/reset/reset.c +++ b/test/lib/nvme/reset/reset.c @@ -390,7 +390,7 @@ parse_args(int argc, char **argv) int op; bool mix_specified = false; - /* default value*/ + /* default value */ g_queue_depth = 0; g_io_size_bytes = 0; workload_type = NULL; diff --git a/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c b/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c index efc1d6b5b..645cc9fd6 100644 --- a/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c +++ b/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c @@ -1266,7 +1266,7 @@ test_nvme_ctrlr_construct_intel_support_log_page_list(void) res = spdk_nvme_ctrlr_is_log_page_supported(&ctrlr, SPDK_NVME_INTEL_LOG_SMART); CU_ASSERT(res == false); - /* set valid vendor id, device id and sub device id*/ + /* set valid vendor id, device id and sub device id */ ctrlr.cdata.vid = SPDK_PCI_VID_INTEL; payload.temperature_statistics_log_len = 0; pci_id.vendor_id = SPDK_PCI_VID_INTEL; diff --git a/test/lib/scsi/dev/dev_ut.c b/test/lib/scsi/dev/dev_ut.c index 38ee0a5c9..5bdbdee97 100644 --- a/test/lib/scsi/dev/dev_ut.c +++ b/test/lib/scsi/dev/dev_ut.c @@ -383,7 +383,7 @@ dev_stop_success(void) task_mgmt = spdk_get_task(NULL); - /* Enqueue the tasks into dev->task_mgmt_submit_queue*/ + /* Enqueue the tasks into dev->task_mgmt_submit_queue */ spdk_scsi_dev_queue_mgmt_task(&dev, task_mgmt); spdk_scsi_task_put(task); diff --git a/test/lib/scsi/init/init_ut.c b/test/lib/scsi/init/init_ut.c index 8d8402d28..ef8dc6e14 100644 --- a/test/lib/scsi/init/init_ut.c +++ b/test/lib/scsi/init/init_ut.c @@ -141,7 +141,7 @@ scsi_init_set_max_unmap_lba_count_config_param(void) struct spdk_conf *config; int rc; - /* set scsi_params.max_unmap_lba_count = 65536 of Scsi section*/ + /* set scsi_params.max_unmap_lba_count = 65536 of Scsi section */ config = spdk_config_init_scsi_params("MaxUnmapLbaCount", "65536"); spdk_conf_set_as_default(config); rc = spdk_scsi_subsystem_init(); @@ -164,7 +164,7 @@ scsi_init_set_max_unmap_block_descriptor_count_config_param(void) int rc; /* set scsi_params.max_unmap_block_descriptor_count = 1 - * of Scsi section*/ + * of Scsi section */ config = spdk_config_init_scsi_params("MaxUnmapBlockDescriptorCount", "1"); spdk_conf_set_as_default(config); rc = spdk_scsi_subsystem_init(); @@ -187,7 +187,7 @@ scsi_init_set_optimal_unmap_granularity_config_param(void) int rc; /* set scsi_params.optimal_unmap_granularity = 0 - * of Scsi section*/ + * of Scsi section */ config = spdk_config_init_scsi_params("OptimalUnmapGranularity", "0"); spdk_conf_set_as_default(config); rc = spdk_scsi_subsystem_init(); @@ -210,7 +210,7 @@ scsi_init_set_unmap_granularity_alignment_config_param(void) int rc; /* set scsi_params.unmap_granularity_alignment = 0 - * of Scsi section*/ + * of Scsi section */ config = spdk_config_init_scsi_params("UnmapGranularityAlignment", "0"); spdk_conf_set_as_default(config); rc = spdk_scsi_subsystem_init(); @@ -233,7 +233,7 @@ scsi_init_ugavalid_yes(void) int rc; /* set scsi_params.ugavalid = Yes - * of Scsi section*/ + * of Scsi section */ config = spdk_config_init_scsi_params("Ugavalid", "Yes"); spdk_conf_set_as_default(config); rc = spdk_scsi_subsystem_init(); @@ -256,7 +256,7 @@ scsi_init_ugavalid_no(void) int rc; /* set scsi_params.ugavalid = No - * of Scsi section*/ + * of Scsi section */ config = spdk_config_init_scsi_params("Ugavalid", "No"); spdk_conf_set_as_default(config); rc = spdk_scsi_subsystem_init(); @@ -279,7 +279,7 @@ scsi_init_ugavalid_unknown_value_failure(void) struct spdk_conf *config; /* set scsi_params.ugavalid = unknown value - * of Scsi section*/ + * of Scsi section */ config = spdk_config_init_scsi_params("Ugavalid", "unknown value"); spdk_conf_set_as_default(config); rc = spdk_scsi_subsystem_init(); @@ -302,7 +302,7 @@ scsi_init_max_write_same_length(void) int rc; /* set scsi_params.max_write_same_length = 512 - * of Scsi section*/ + * of Scsi section */ config = spdk_config_init_scsi_params("MaxWriteSameLength", "512"); spdk_conf_set_as_default(config); rc = spdk_scsi_subsystem_init(); diff --git a/test/lib/scsi/lun/lun_ut.c b/test/lib/scsi/lun/lun_ut.c index 3aa8de2e9..655763388 100644 --- a/test/lib/scsi/lun/lun_ut.c +++ b/test/lib/scsi/lun/lun_ut.c @@ -281,7 +281,7 @@ lun_task_mgmt_execute_abort_task_not_supported(void) spdk_scsi_lun_execute_tasks(lun); - /*task should now be on the tasks list */ + /* task should now be on the tasks list */ CU_ASSERT(!TAILQ_EMPTY(&lun->tasks)); rc = spdk_scsi_lun_task_mgmt_execute(mgmt_task); @@ -353,7 +353,7 @@ lun_task_mgmt_execute_abort_task_all_not_supported(void) spdk_scsi_lun_execute_tasks(lun); - /*task should now be on the tasks list */ + /* task should now be on the tasks list */ CU_ASSERT(!TAILQ_EMPTY(&lun->tasks)); rc = spdk_scsi_lun_task_mgmt_execute(mgmt_task); @@ -483,7 +483,7 @@ lun_append_task_null_lun_alloc_len_lt_4096(void) task->cdb[3] = 0; task->cdb[4] = 0; /* alloc_len is set to a minimal value of 4096 - * Hence, rbuf of size 4096 is allocated*/ + * Hence, rbuf of size 4096 is allocated */ spdk_scsi_task_process_null_lun(task); CU_ASSERT_EQUAL(task->status, SPDK_SCSI_STATUS_GOOD);