From d87b31e159cb313dad1049e91943dcdd479f2b2d Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Tue, 1 Sep 2020 22:03:10 +0000 Subject: [PATCH] nvme: clean up empty lines in .c and .h files --- sys/dev/nvme/nvme.c | 1 - sys/dev/nvme/nvme.h | 11 ----------- sys/dev/nvme/nvme_ctrlr.c | 1 - sys/dev/nvme/nvme_pci.c | 1 - sys/dev/nvme/nvme_private.h | 7 ------- sys/dev/nvme/nvme_qpair.c | 5 ----- sys/dev/nvme/nvme_sysctl.c | 2 -- sys/dev/nvme/nvme_test.c | 3 --- sys/dev/nvme/nvme_util.c | 1 - 9 files changed, 32 deletions(-) diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c index b34359e944c9..464af466046f 100644 --- a/sys/dev/nvme/nvme.c +++ b/sys/dev/nvme/nvme.c @@ -52,7 +52,6 @@ struct nvme_consumer nvme_consumer[NVME_MAX_CONSUMERS]; uma_zone_t nvme_request_zone; int32_t nvme_retry_count; - MALLOC_DEFINE(M_NVME, "nvme", "nvme(4) memory allocations"); devclass_t nvme_devclass; diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 4c8e49205162..e721909021de 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -576,7 +576,6 @@ struct nvme_command _Static_assert(sizeof(struct nvme_command) == 16 * 4, "bad size for nvme_command"); struct nvme_completion { - /* dword 0 */ uint32_t cdw0; /* command-specific */ @@ -871,7 +870,6 @@ _Static_assert(sizeof(struct nvme_power_state) == 32, "bad size for nvme_power_s #define NVME_FIRMWARE_REVISION_LENGTH 8 struct nvme_controller_data { - /* bytes 0-255: controller capabilities and features */ /** pci vendor id */ @@ -1117,7 +1115,6 @@ struct nvme_controller_data { _Static_assert(sizeof(struct nvme_controller_data) == 4096, "bad size for nvme_controller_data"); struct nvme_namespace_data { - /** namespace size */ uint64_t nsze; @@ -1231,7 +1228,6 @@ struct nvme_namespace_data { _Static_assert(sizeof(struct nvme_namespace_data) == 4096, "bad size for nvme_namepsace_data"); enum nvme_log_page { - /* 0x00 - reserved */ NVME_LOG_ERROR = 0x01, NVME_LOG_HEALTH_INFORMATION = 0x02, @@ -1272,7 +1268,6 @@ enum nvme_log_page { }; struct nvme_error_information_entry { - uint64_t error_count; uint16_t sqid; uint16_t cid; @@ -1291,7 +1286,6 @@ struct nvme_error_information_entry { _Static_assert(sizeof(struct nvme_error_information_entry) == 64, "bad size for nvme_error_information_entry"); struct nvme_health_information_page { - uint8_t critical_warning; uint16_t temperature; uint8_t available_spare; @@ -1336,7 +1330,6 @@ struct nvme_health_information_page { _Static_assert(sizeof(struct nvme_health_information_page) == 512, "bad size for nvme_health_information_page"); struct nvme_firmware_page { - uint8_t afi; uint8_t reserved[7]; uint64_t revision[7]; /* revisions for 7 slots */ @@ -1456,7 +1449,6 @@ _Static_assert(sizeof(struct nvme_resv_status_ext) == 64, "bad size for nvme_res #define NVME_TEST_MAX_THREADS 128 struct nvme_io_test { - enum nvme_nvm_opcode opc; uint32_t size; uint32_t time; /* in seconds */ @@ -1466,7 +1458,6 @@ struct nvme_io_test { }; enum nvme_io_test_flags { - /* * Specifies whether dev_refthread/dev_relthread should be * called during NVME_BIO_TEST. Ignored for other test @@ -1476,7 +1467,6 @@ enum nvme_io_test_flags { }; struct nvme_pt_command { - /* * cmd is used to specify a passthrough command to a controller or * namespace. @@ -1855,7 +1845,6 @@ void nvme_health_information_page_swapbytes(struct nvme_health_information_page s->ttftmt2 = le32toh(s->ttftmt2); } - static inline void nvme_firmware_page_swapbytes(struct nvme_firmware_page *s) { diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index a2fd9919558a..8feb3d4d0ac1 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -745,7 +745,6 @@ nvme_ctrlr_async_event_log_page_cb(void *arg, const struct nvme_completion *cpl) } } - /* * Pass the cpl data from the original async event completion, * not the log page fetch. diff --git a/sys/dev/nvme/nvme_pci.c b/sys/dev/nvme/nvme_pci.c index af06e579ad47..1b28ab4d40e6 100644 --- a/sys/dev/nvme/nvme_pci.c +++ b/sys/dev/nvme/nvme_pci.c @@ -93,7 +93,6 @@ static struct _pcsid { 0x00000000, 0, 0, NULL } }; - static int nvme_match(uint32_t devid, uint16_t subdevice, struct _pcsid *ep) { diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 747dfab925fd..b76ed5179027 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -118,7 +118,6 @@ extern int32_t nvme_retry_count; extern bool nvme_verbose_cmd_dump; struct nvme_completion_poll_status { - struct nvme_completion cpl; int done; }; @@ -132,7 +131,6 @@ extern devclass_t nvme_devclass; #define NVME_REQUEST_CCB 5 struct nvme_request { - struct nvme_command cmd; struct nvme_qpair *qpair; union { @@ -149,7 +147,6 @@ struct nvme_request { }; struct nvme_async_event_request { - struct nvme_controller *ctrlr; struct nvme_request *req; struct nvme_completion cpl; @@ -159,7 +156,6 @@ struct nvme_async_event_request { }; struct nvme_tracker { - TAILQ_ENTRY(nvme_tracker) tailq; struct nvme_request *req; struct nvme_qpair *qpair; @@ -172,7 +168,6 @@ struct nvme_tracker { }; struct nvme_qpair { - struct nvme_controller *ctrlr; uint32_t id; int domain; @@ -221,7 +216,6 @@ struct nvme_qpair { } __aligned(CACHE_LINE_SIZE); struct nvme_namespace { - struct nvme_controller *ctrlr; struct nvme_namespace_data data; uint32_t id; @@ -236,7 +230,6 @@ struct nvme_namespace { * One of these per allocated PCI device. */ struct nvme_controller { - device_t dev; struct mtx lock; diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 863b9f58ac3b..850a4ba19760 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -47,7 +47,6 @@ static void _nvme_qpair_submit_request(struct nvme_qpair *qpair, static void nvme_qpair_destroy(struct nvme_qpair *qpair); struct nvme_opcode_string { - uint16_t opc; const char * str; }; @@ -128,7 +127,6 @@ get_io_opcode_string(uint16_t opc) return (entry->str); } - static void nvme_admin_qpair_print_command(struct nvme_qpair *qpair, struct nvme_command *cmd) @@ -195,7 +193,6 @@ nvme_qpair_print_command(struct nvme_qpair *qpair, struct nvme_command *cmd) } struct nvme_status_string { - uint16_t sc; const char * str; }; @@ -662,7 +659,6 @@ nvme_qpair_construct(struct nvme_qpair *qpair, qpair->ctrlr = ctrlr; if (ctrlr->msix_enabled) { - /* * MSI-X vector resource IDs start at 1, so we add one to * the queue's vector to get the corresponding rid to use. @@ -762,7 +758,6 @@ nvme_qpair_construct(struct nvme_qpair *qpair, list_phys = prpmem_phys; prp_list = prpmem; for (i = 0; i < qpair->num_trackers; i++) { - if (list_phys + prpsz > prpmem_phys + prpmemsz) { qpair->num_trackers = i; break; diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index 3aabfb020486..fb0c9830eac5 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -86,7 +86,6 @@ nvme_dump_queue(struct nvme_qpair *qpair) } } - static int nvme_sysctl_dump_debug(SYSCTL_HANDLER_ARGS) { @@ -253,7 +252,6 @@ nvme_sysctl_reset_stats(SYSCTL_HANDLER_ARGS) return (0); } - static void nvme_sysctl_initialize_queue(struct nvme_qpair *qpair, struct sysctl_ctx_list *ctrlr_ctx, struct sysctl_oid *que_tree) diff --git a/sys/dev/nvme/nvme_test.c b/sys/dev/nvme/nvme_test.c index c494c2214d11..bd2c1dac3923 100644 --- a/sys/dev/nvme/nvme_test.c +++ b/sys/dev/nvme/nvme_test.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include "nvme_private.h" struct nvme_io_test_thread { - uint32_t idx; struct nvme_namespace *ns; enum nvme_nvm_opcode opc; @@ -59,7 +58,6 @@ struct nvme_io_test_thread { }; struct nvme_io_test_internal { - struct nvme_namespace *ns; enum nvme_nvm_opcode opc; struct timeval start; @@ -103,7 +101,6 @@ nvme_ns_bio_test(void *arg) offset = idx * 2048ULL * nvme_ns_get_sector_size(io_test->ns); while (1) { - bio = g_alloc_bio(); memset(bio, 0, sizeof(*bio)); diff --git a/sys/dev/nvme/nvme_util.c b/sys/dev/nvme/nvme_util.c index e673cf75362e..6b9cb467fd49 100644 --- a/sys/dev/nvme/nvme_util.c +++ b/sys/dev/nvme/nvme_util.c @@ -60,4 +60,3 @@ nvme_strvis(uint8_t *dst, const uint8_t *src, int dstlen, int srclen) } *dst = '\0'; } -