Commit bc185fe7 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

nvme: convert is_resetting to bool



It was previously uint32_t because it was accessed with special
uint32_t-only atomic read/write helper functions, but that was replaced
with normal variable accesses protected by a mutex.

Change-Id: I304a7ef8c723cb33fd08110b697f848823a163e7
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 4d7b500a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ nvme_ctrlr_reset(struct nvme_controller *ctrlr)
		return 0;
	}

	ctrlr->is_resetting = 1;
	ctrlr->is_resetting = true;

	nvme_printf(ctrlr, "resetting controller\n");
	/* nvme_ctrlr_start() issues a reset as its first step */
@@ -317,7 +317,7 @@ nvme_ctrlr_reset(struct nvme_controller *ctrlr)
		nvme_ctrlr_fail(ctrlr);
	}

	ctrlr->is_resetting = 0;
	ctrlr->is_resetting = false;

	nvme_mutex_unlock(&ctrlr->ctrlr_lock);

@@ -678,7 +678,7 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, void *devhandle)
	if (rc)
		return rc;

	ctrlr->is_resetting = 0;
	ctrlr->is_resetting = false;
	ctrlr->is_failed = false;

	nvme_mutex_init_recursive(&ctrlr->ctrlr_lock);
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ struct nvme_controller {
	/** I/O queue pairs */
	struct nvme_qpair		*ioq;

	uint32_t			is_resetting;
	bool				is_resetting;

	uint32_t			num_ns;