From owner-svn-src-head@freebsd.org Tue Sep 1 22:03:13 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4335137E014; Tue, 1 Sep 2020 22:03:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bh1KY15Hdz4cHf; Tue, 1 Sep 2020 22:03:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09CDB20703; Tue, 1 Sep 2020 22:03:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 081M3CWh054909; Tue, 1 Sep 2020 22:03:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 081M3BM6054898; Tue, 1 Sep 2020 22:03:11 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009012203.081M3BM6054898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 1 Sep 2020 22:03:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365189 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 365189 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2020 22:03:13 -0000 Author: mjg Date: Tue Sep 1 22:03:10 2020 New Revision: 365189 URL: https://svnweb.freebsd.org/changeset/base/365189 Log: nvme: clean up empty lines in .c and .h files Modified: head/sys/dev/nvme/nvme.c head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_ctrlr.c head/sys/dev/nvme/nvme_pci.c head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_qpair.c head/sys/dev/nvme/nvme_sysctl.c head/sys/dev/nvme/nvme_test.c head/sys/dev/nvme/nvme_util.c Modified: head/sys/dev/nvme/nvme.c ============================================================================== --- head/sys/dev/nvme/nvme.c Tue Sep 1 22:02:55 2020 (r365188) +++ head/sys/dev/nvme/nvme.c Tue Sep 1 22:03:10 2020 (r365189) @@ -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; Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Tue Sep 1 22:02:55 2020 (r365188) +++ head/sys/dev/nvme/nvme.h Tue Sep 1 22:03:10 2020 (r365189) @@ -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, #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) == #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. @@ -1854,7 +1844,6 @@ void nvme_health_information_page_swapbytes(struct nvm s->ttftmt1 = le32toh(s->ttftmt1); s->ttftmt2 = le32toh(s->ttftmt2); } - static inline void nvme_firmware_page_swapbytes(struct nvme_firmware_page *s) Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Tue Sep 1 22:02:55 2020 (r365188) +++ head/sys/dev/nvme/nvme_ctrlr.c Tue Sep 1 22:03:10 2020 (r365189) @@ -745,7 +745,6 @@ nvme_ctrlr_async_event_log_page_cb(void *arg, const st } } - /* * Pass the cpl data from the original async event completion, * not the log page fetch. Modified: head/sys/dev/nvme/nvme_pci.c ============================================================================== --- head/sys/dev/nvme/nvme_pci.c Tue Sep 1 22:02:55 2020 (r365188) +++ head/sys/dev/nvme/nvme_pci.c Tue Sep 1 22:03:10 2020 (r365189) @@ -93,7 +93,6 @@ static struct _pcsid { 0x00000000, 0, 0, NULL } }; - static int nvme_match(uint32_t devid, uint16_t subdevice, struct _pcsid *ep) { Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Tue Sep 1 22:02:55 2020 (r365188) +++ head/sys/dev/nvme/nvme_private.h Tue Sep 1 22:03:10 2020 (r365189) @@ -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; Modified: head/sys/dev/nvme/nvme_qpair.c ============================================================================== --- head/sys/dev/nvme/nvme_qpair.c Tue Sep 1 22:02:55 2020 (r365188) +++ head/sys/dev/nvme/nvme_qpair.c Tue Sep 1 22:03:10 2020 (r365189) @@ -47,7 +47,6 @@ static void _nvme_qpair_submit_request(struct nvme_qpa 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, str } 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; Modified: head/sys/dev/nvme/nvme_sysctl.c ============================================================================== --- head/sys/dev/nvme/nvme_sysctl.c Tue Sep 1 22:02:55 2020 (r365188) +++ head/sys/dev/nvme/nvme_sysctl.c Tue Sep 1 22:03:10 2020 (r365189) @@ -86,7 +86,6 @@ nvme_dump_queue(struct nvme_qpair *qpair) } } - static int nvme_sysctl_dump_debug(SYSCTL_HANDLER_ARGS) { @@ -252,7 +251,6 @@ nvme_sysctl_reset_stats(SYSCTL_HANDLER_ARGS) return (0); } - static void nvme_sysctl_initialize_queue(struct nvme_qpair *qpair, Modified: head/sys/dev/nvme/nvme_test.c ============================================================================== --- head/sys/dev/nvme/nvme_test.c Tue Sep 1 22:02:55 2020 (r365188) +++ head/sys/dev/nvme/nvme_test.c Tue Sep 1 22:03:10 2020 (r365189) @@ -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)); Modified: head/sys/dev/nvme/nvme_util.c ============================================================================== --- head/sys/dev/nvme/nvme_util.c Tue Sep 1 22:02:55 2020 (r365188) +++ head/sys/dev/nvme/nvme_util.c Tue Sep 1 22:03:10 2020 (r365189) @@ -60,4 +60,3 @@ nvme_strvis(uint8_t *dst, const uint8_t *src, int dstl } *dst = '\0'; } -