Move to using bool instead of boolean_t
While there are subtle semantic differences between bool and boolean_t, none of them matter in these cases. Prefer true/false when dealing with bool type. Preserve a couple of TRUEs since they are passed into int args into CAM. Preserve a couple of FALSEs when used for status.done, an int. Differential Revision: https://reviews.freebsd.org/D20999
This commit is contained in:
parent
325c4ced0d
commit
7588c6cc36
@ -181,7 +181,7 @@ nvme_ctrlr_fail(struct nvme_controller *ctrlr)
|
||||
{
|
||||
int i;
|
||||
|
||||
ctrlr->is_failed = TRUE;
|
||||
ctrlr->is_failed = true;
|
||||
nvme_admin_qpair_disable(&ctrlr->adminq);
|
||||
nvme_qpair_fail(&ctrlr->adminq);
|
||||
if (ctrlr->ioq != NULL) {
|
||||
@ -546,7 +546,7 @@ nvme_ctrlr_construct_namespaces(struct nvme_controller *ctrlr)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
static bool
|
||||
is_log_page_id_valid(uint8_t page_id)
|
||||
{
|
||||
|
||||
@ -558,10 +558,10 @@ is_log_page_id_valid(uint8_t page_id)
|
||||
case NVME_LOG_COMMAND_EFFECT:
|
||||
case NVME_LOG_RES_NOTIFICATION:
|
||||
case NVME_LOG_SANITIZE_STATUS:
|
||||
return (TRUE);
|
||||
return (true);
|
||||
}
|
||||
|
||||
return (FALSE);
|
||||
return (false);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
@ -782,7 +782,7 @@ nvme_ctrlr_construct_and_submit_aer(struct nvme_controller *ctrlr,
|
||||
* Disable timeout here, since asynchronous event requests should by
|
||||
* nature never be timed out.
|
||||
*/
|
||||
req->timeout = FALSE;
|
||||
req->timeout = false;
|
||||
req->cmd.opc = NVME_OPC_ASYNC_EVENT_REQUEST;
|
||||
nvme_ctrlr_submit_admin_request(ctrlr, req);
|
||||
}
|
||||
@ -1198,7 +1198,7 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev)
|
||||
TASK_INIT(&ctrlr->reset_task, 0, nvme_ctrlr_reset_task, ctrlr);
|
||||
TASK_INIT(&ctrlr->fail_req_task, 0, nvme_ctrlr_fail_req_task, ctrlr);
|
||||
STAILQ_INIT(&ctrlr->fail_req);
|
||||
ctrlr->is_failed = FALSE;
|
||||
ctrlr->is_failed = false;
|
||||
|
||||
make_dev_args_init(&md_args);
|
||||
md_args.mda_devsw = &nvme_ctrlr_cdevsw;
|
||||
|
@ -141,7 +141,7 @@ struct nvme_request {
|
||||
} u;
|
||||
uint32_t type;
|
||||
uint32_t payload_size;
|
||||
boolean_t timeout;
|
||||
bool timeout;
|
||||
nvme_cb_fn_t cb_fn;
|
||||
void *cb_arg;
|
||||
int32_t retries;
|
||||
@ -214,7 +214,7 @@ struct nvme_qpair {
|
||||
|
||||
struct nvme_tracker **act_tr;
|
||||
|
||||
boolean_t is_enabled;
|
||||
bool is_enabled;
|
||||
|
||||
struct mtx lock __aligned(CACHE_LINE_SIZE);
|
||||
|
||||
@ -322,7 +322,7 @@ struct nvme_controller {
|
||||
uint32_t is_initialized;
|
||||
uint32_t notification_sent;
|
||||
|
||||
boolean_t is_failed;
|
||||
bool is_failed;
|
||||
STAILQ_HEAD(, nvme_request) fail_req;
|
||||
};
|
||||
|
||||
@ -487,7 +487,7 @@ _nvme_allocate_request(nvme_cb_fn_t cb_fn, void *cb_arg)
|
||||
if (req != NULL) {
|
||||
req->cb_fn = cb_fn;
|
||||
req->cb_arg = cb_arg;
|
||||
req->timeout = TRUE;
|
||||
req->timeout = true;
|
||||
}
|
||||
return (req);
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ nvme_qpair_print_completion(struct nvme_qpair *qpair,
|
||||
cpl->cdw0);
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
static bool
|
||||
nvme_completion_is_retry(const struct nvme_completion *cpl)
|
||||
{
|
||||
uint8_t sct, sc, dnr;
|
||||
@ -423,7 +423,7 @@ nvme_qpair_complete_tracker(struct nvme_tracker *tr,
|
||||
{
|
||||
struct nvme_qpair * qpair = tr->qpair;
|
||||
struct nvme_request *req;
|
||||
boolean_t retry, error, retriable;
|
||||
bool retry, error, retriable;
|
||||
|
||||
req = tr->req;
|
||||
error = nvme_completion_is_error(cpl);
|
||||
@ -508,7 +508,7 @@ nvme_qpair_manual_complete_request(struct nvme_qpair *qpair,
|
||||
struct nvme_request *req, uint32_t sct, uint32_t sc)
|
||||
{
|
||||
struct nvme_completion cpl;
|
||||
boolean_t error;
|
||||
bool error;
|
||||
|
||||
memset(&cpl, 0, sizeof(cpl));
|
||||
cpl.sqid = qpair->id;
|
||||
@ -1127,7 +1127,7 @@ static void
|
||||
nvme_qpair_enable(struct nvme_qpair *qpair)
|
||||
{
|
||||
|
||||
qpair->is_enabled = TRUE;
|
||||
qpair->is_enabled = true;
|
||||
}
|
||||
|
||||
void
|
||||
@ -1215,7 +1215,7 @@ nvme_qpair_disable(struct nvme_qpair *qpair)
|
||||
{
|
||||
struct nvme_tracker *tr;
|
||||
|
||||
qpair->is_enabled = FALSE;
|
||||
qpair->is_enabled = false;
|
||||
mtx_lock(&qpair->lock);
|
||||
TAILQ_FOREACH(tr, &qpair->outstanding_tr, tailq)
|
||||
callout_stop(&tr->timer);
|
||||
|
Loading…
Reference in New Issue
Block a user