From nobody Fri Apr 08 00:03:29 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A37F91A878B1; Fri, 8 Apr 2022 00:03:30 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KZJPF56qcz4l0q; Fri, 8 Apr 2022 00:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649376209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pDw0hISLxJMnAw3HvqSy++lixf0OLQOQAbVpkzIqAfA=; b=nYSqv8FHtzheN2qmyDcdDxGDMgyN+mYUxyMX23qNt1RnN9gzT5OV+x1iV5egnY1gUUB5o+ b6WxZfTSKd2nIdB9E6MeRfl/RK8tqU5kl78qgIe0LFlYxFEVKCbaR+/IlNojWGcSdPZ4Yh 0JPZSyj3Z6Q4a58zOs2E3h0TsCmzeQes9V80c9VOrLnj+zsca+pKy4lAMFN9GQX0/5Fm1Y Qi9mIfmriF0m2X40TiB5/GOD9UmHgwO80uT85U5JtusIB+X3DyTT2agXzDHJqvDgZ4lIoo XOYrTrcUUWkK+zn9FR1zIZ4igj7QLnIFY0tbMsbExmeYI4snjavhFhuHiX6Imw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 439411A502; Fri, 8 Apr 2022 00:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23803TZZ086414; Fri, 8 Apr 2022 00:03:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23803TDS086413; Fri, 8 Apr 2022 00:03:29 GMT (envelope-from git) Date: Fri, 8 Apr 2022 00:03:29 GMT Message-Id: <202204080003.23803TDS086413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 91aa93eb675a - main - qlnx: Remove unused variables. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91aa93eb675aa916df6b5fd1166ee0bce1cef9dd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649376209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pDw0hISLxJMnAw3HvqSy++lixf0OLQOQAbVpkzIqAfA=; b=pmCvndVGH+nhMDozDaAYCAnEVCq1IBijRme/xBB/gZ6v6CirNY7DWqxgR/JVFQLEvitlf6 qASP5XTQ7X+BFnz58TrhGLbtsLYC+RUbEtrEY9Ucx8IPmNWE+DSKZsWPbIhlXFE3TiV5cJ NQPByyfcLILDlyiLOM8nzO6GPEaHF+l+bbO5V6g1cA9LUcZtlhNCQFgib4NKfeQXW7G+8u o70sM5FYKkGXdXQlth7DBMAWYDnEBKCMu+C5/TobqW7fIfVG5VcMj6YUs5ZXrnFTW1zwbz X9bw7Rsfr7As/P0oRUi7CSO5DO65c58Kz2vhpNJ8spSTVA1wYfUor1S/S1CW9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649376209; a=rsa-sha256; cv=none; b=RvMQ0ZB/ahzEPL5xg5ym53sZVZGa+k0k3hmbYcvOxngc2NmmOSpHqmrR/fO+GTHS04LHIe Lc8jy3FbeG2vplggG9ysulyhEJO7RSLdV5976mBtZKRijVWZIXWszCrURi9qBXiFohKr/K 3hmXkFI9No3FxkX5HC+Tqecx1cx+oN9vIs2gZzAr7RfE7akSrVzA9GraoA4/PiReTs6nby so1Q58JsfxNxeZE9/6RetbxTqV6iuEUBga88Grqw+cXmH7jQJFJWRKlrXaZbBYunG/qHeP g+UrhdQc0KgqgbYcFe/xx6AUV3LO52PxxGSuZhG9IrlRT6XH8+zkqMHqOz4ppg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=91aa93eb675aa916df6b5fd1166ee0bce1cef9dd commit 91aa93eb675aa916df6b5fd1166ee0bce1cef9dd Author: John Baldwin AuthorDate: 2022-04-08 00:01:27 +0000 Commit: John Baldwin CommitDate: 2022-04-08 00:01:27 +0000 qlnx: Remove unused variables. --- sys/dev/qlnx/qlnxe/qlnx_ioctl.c | 3 --- sys/dev/qlnx/qlnxe/qlnx_os.c | 46 ---------------------------------------- sys/dev/qlnx/qlnxe/qlnx_rdma.c | 5 +---- sys/dev/qlnx/qlnxr/qlnxr_cm.c | 3 --- sys/dev/qlnx/qlnxr/qlnxr_verbs.c | 5 +---- 5 files changed, 2 insertions(+), 60 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_ioctl.c b/sys/dev/qlnx/qlnxe/qlnx_ioctl.c index a98ab2e895d8..f87cb8b49921 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_ioctl.c +++ b/sys/dev/qlnx/qlnxe/qlnx_ioctl.c @@ -993,15 +993,12 @@ qlnx_eioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, { qlnx_host_t *ha; int rval = 0; - struct ifnet *ifp; qlnx_trace_t *trace; int i; if ((ha = (qlnx_host_t *)dev->si_drv1) == NULL) return ENXIO; - ifp = ha->ifp; - switch (cmd) { case QLNX_GRC_DUMP_SIZE: qlnx_get_grc_dump_size(ha, (qlnx_grcdump_t *)data); diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 750286d9c458..3278cf3a4333 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -1190,11 +1190,8 @@ qlnx_get_personality(uint8_t pci_func) static void qlnx_set_personality(qlnx_host_t *ha) { - struct ecore_hwfn *p_hwfn; uint8_t personality; - p_hwfn = &ha->cdev.hwfns[0]; - personality = qlnx_get_personality(ha->pci_func); switch (personality) { @@ -3168,11 +3165,8 @@ qlnx_qflush(struct ifnet *ifp) static void qlnx_txq_doorbell_wr32(qlnx_host_t *ha, void *reg_addr, uint32_t value) { - struct ecore_dev *cdev; uint32_t offset; - cdev = &ha->cdev; - offset = (uint32_t)((uint8_t *)reg_addr - (uint8_t *)ha->pci_dbells); bus_write_4(ha->pci_dbells, offset, value); @@ -3191,11 +3185,8 @@ qlnx_tcp_offset(qlnx_host_t *ha, struct mbuf *mp) struct tcphdr *th = NULL; uint32_t ehdrlen = 0, ip_hlen = 0, offset = 0; uint16_t etype = 0; - device_t dev; uint8_t buf[sizeof(struct ip6_hdr)]; - dev = ha->pci_dev; - eh = mtod(mp, struct ether_vlan_header *); if (eh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { @@ -3789,11 +3780,8 @@ static void qlnx_stop(qlnx_host_t *ha) { struct ifnet *ifp = ha->ifp; - device_t dev; int i; - dev = ha->pci_dev; - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); /* @@ -3986,12 +3974,10 @@ qlnx_tpa_start(qlnx_host_t *ha, bus_dmamap_t map; struct eth_rx_bd *rx_bd; int i; - device_t dev; #if __FreeBSD_version >= 1100000 uint8_t hash_type; #endif /* #if __FreeBSD_version >= 1100000 */ - dev = ha->pci_dev; agg_index = cqe->tpa_agg_index; QL_DPRINT7(ha, "[rss_id = %d]: enter\n \ @@ -4303,9 +4289,6 @@ qlnx_tpa_cont(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf *mpf = NULL, *mpl = NULL, *mpc = NULL; struct mbuf *mp; uint32_t agg_index; - device_t dev; - - dev = ha->pci_dev; QL_DPRINT7(ha, "[%d]: enter\n \ \t type = 0x%x\n \ @@ -4424,9 +4407,6 @@ qlnx_tpa_end(qlnx_host_t *ha, struct qlnx_fastpath *fp, uint32_t agg_index; uint32_t len = 0; struct ifnet *ifp = ha->ifp; - device_t dev; - - dev = ha->pci_dev; QL_DPRINT7(ha, "[%d]: enter\n \ \t type = 0x%x\n \ @@ -5037,11 +5017,8 @@ static int qlnx_alloc_dmabuf(qlnx_host_t *ha, qlnx_dma_t *dma_buf) { int ret = 0; - device_t dev; bus_addr_t b_addr; - dev = ha->pci_dev; - ret = bus_dma_tag_create( ha->parent_tag,/* parent */ dma_buf->alignment, @@ -5107,10 +5084,8 @@ qlnx_dma_alloc_coherent(void *ecore_dev, bus_addr_t *phys, uint32_t size) qlnx_dma_t dma_buf; qlnx_dma_t *dma_p; qlnx_host_t *ha; - device_t dev; ha = (qlnx_host_t *)ecore_dev; - dev = ha->pci_dev; size = (size + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); @@ -5142,10 +5117,8 @@ qlnx_dma_free_coherent(void *ecore_dev, void *v_addr, bus_addr_t phys, { qlnx_dma_t dma_buf, *dma_p; qlnx_host_t *ha; - device_t dev; ha = (qlnx_host_t *)ecore_dev; - dev = ha->pci_dev; if (v_addr == NULL) return; @@ -5921,10 +5894,6 @@ qlnx_get_flash_size(qlnx_host_t *ha, uint32_t *flash_size) static int qlnx_alloc_mem_arrays(qlnx_host_t *ha) { - struct ecore_dev *cdev; - - cdev = &ha->cdev; - bzero(&ha->txq_array[0], (sizeof(struct qlnx_tx_queue) * QLNX_MAX_RSS)); bzero(&ha->rxq_array[0], (sizeof(struct qlnx_rx_queue) * QLNX_MAX_RSS)); bzero(&ha->sb_array[0], (sizeof(struct ecore_sb_info) * QLNX_MAX_RSS)); @@ -6137,9 +6106,6 @@ qlnx_alloc_rx_buffer(qlnx_host_t *ha, struct qlnx_rx_queue *rxq) bus_dma_segment_t segs[1]; int nsegs; int ret; - struct ecore_dev *cdev; - - cdev = &ha->cdev; rx_buf_size = rxq->rx_buf_size; @@ -6252,11 +6218,9 @@ static int qlnx_alloc_mem_rxq(qlnx_host_t *ha, struct qlnx_rx_queue *rxq) { int i, rc, num_allocated; - struct ifnet *ifp; struct ecore_dev *cdev; cdev = &ha->cdev; - ifp = ha->ifp; rxq->num_rx_buffers = RX_RING_SIZE; @@ -6504,9 +6468,6 @@ static void qlnx_free_mem_load(qlnx_host_t *ha) { int i; - struct ecore_dev *cdev; - - cdev = &ha->cdev; for (i = 0; i < ha->num_rss; i++) { struct qlnx_fastpath *fp = &ha->fp_array[i]; @@ -7329,10 +7290,8 @@ qlnx_load(qlnx_host_t *ha) { int i; int rc = 0; - struct ecore_dev *cdev; device_t dev; - cdev = &ha->cdev; dev = ha->pci_dev; QL_DPRINT2(ha, "enter\n"); @@ -7873,9 +7832,6 @@ static int __qlnx_iov_update_vport(struct ecore_hwfn *hwfn, uint8_t vfid, struct ecore_sp_vport_update_params *params, uint16_t * tlvs) { - uint8_t mask; - struct ecore_filter_accept_flags *flags; - if (!ecore_iov_vf_has_vport_instance(hwfn, vfid)) { QL_DPRINT1(((qlnx_host_t *)hwfn->p_dev), "VF[%d] vport not initialized\n", vfid); @@ -7886,8 +7842,6 @@ __qlnx_iov_update_vport(struct ecore_hwfn *hwfn, uint8_t vfid, * Simply indicate everything is configured fine, and trace * configuration 'behind their back'. */ - mask = ECORE_ACCEPT_UCAST_UNMATCHED | ECORE_ACCEPT_MCAST_UNMATCHED; - flags = ¶ms->accept_flags; if (!(*tlvs & BIT(ECORE_IOV_VP_UPDATE_ACCEPT_PARAM))) return 0; diff --git a/sys/dev/qlnx/qlnxe/qlnx_rdma.c b/sys/dev/qlnx/qlnxe/qlnx_rdma.c index 5929fee5d263..26b1679ca137 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_rdma.c +++ b/sys/dev/qlnx/qlnxe/qlnx_rdma.c @@ -183,7 +183,6 @@ int qlnx_rdma_dev_remove(struct qlnx_host *ha) { int ret = 0; - qlnx_host_t *ha_prev; qlnx_host_t *ha_cur; QL_DPRINT12(ha, "enter ha = %p\n", ha); @@ -210,15 +209,13 @@ qlnx_rdma_dev_remove(struct qlnx_host *ha) return (ret); } - ha_prev = ha_cur = qlnx_host_list; + ha_cur = qlnx_host_list; while ((ha_cur != ha) && (ha_cur != NULL)) { - ha_prev = ha_cur; ha_cur = ha_cur->next; } if (ha_cur == ha) { - ha_prev = ha->next; ha->next = NULL; } diff --git a/sys/dev/qlnx/qlnxr/qlnxr_cm.c b/sys/dev/qlnx/qlnxr/qlnxr_cm.c index a9976146fe94..7d2bff15c491 100644 --- a/sys/dev/qlnx/qlnxr/qlnxr_cm.c +++ b/sys/dev/qlnx/qlnxr/qlnxr_cm.c @@ -98,7 +98,6 @@ qlnxr_ll2_complete_rx_packet(void *cxt, // struct qlnxr_qp *qp = dev->gsi_qp; struct qlnxr_qp *qp = NULL; unsigned long flags; - uint32_t qp_num = 0; // uint32_t delay_count = 0, gsi_cons = 0; //void * dest_va; @@ -112,8 +111,6 @@ qlnxr_ll2_complete_rx_packet(void *cxt, QL_DPRINT12(dev->ha, "cookie is NULL, bad sign\n"); } - qp_num = (0xFF << 16) | data->qp_id; - if (data->qp_id == 1) { qp = dev->gsi_qp; } else { diff --git a/sys/dev/qlnx/qlnxr/qlnxr_verbs.c b/sys/dev/qlnx/qlnxr/qlnxr_verbs.c index d39f1946c641..c4affef7955c 100644 --- a/sys/dev/qlnx/qlnxr/qlnxr_verbs.c +++ b/sys/dev/qlnx/qlnxr/qlnxr_verbs.c @@ -1235,7 +1235,7 @@ qlnxr_alloc_pbl_tbl(struct qlnxr_dev *dev, dma_addr_t pa; dma_addr_t *pbl_main_tbl; struct qlnxr_pbl *pbl_table; - int i, rc = 0; + int i; qlnx_host_t *ha; ha = dev->ha; @@ -1253,7 +1253,6 @@ qlnxr_alloc_pbl_tbl(struct qlnxr_dev *dev, va = qlnx_dma_alloc_coherent(&dev->ha->cdev, &pa, pbl_info->pbl_size); if (!va) { QL_DPRINT11(ha, "Failed to allocate pbl#%d\n", i); - rc = -ENOMEM; goto err; } memset(va, 0, pbl_info->pbl_size); @@ -2668,7 +2667,6 @@ qlnxr_create_user_qp(struct qlnxr_dev *dev, struct ecore_rdma_create_qp_out_params out_params; struct qlnxr_pd *pd = get_qlnxr_pd(ibpd); struct ib_ucontext *ib_ctx = NULL; - struct qlnxr_ucontext *ctx = NULL; struct qlnxr_create_qp_ureq ureq; int alloc_and_init = QLNX_IS_ROCE(dev); int rc = -EINVAL; @@ -2679,7 +2677,6 @@ qlnxr_create_user_qp(struct qlnxr_dev *dev, QL_DPRINT12(ha, "enter\n"); ib_ctx = ibpd->uobject->context; - ctx = get_qlnxr_ucontext(ib_ctx); memset(&ureq, 0, sizeof(ureq)); rc = ib_copy_from_udata(&ureq, udata, sizeof(ureq));