From nobody Wed Apr 06 23:46: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 279DB1A84638; Wed, 6 Apr 2022 23:46:31 +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 4KYh460RSsz4RFr; Wed, 6 Apr 2022 23:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649288790; 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=I7vDfCp9wJC9JZhxNo3Gf6IINXdpCCdB+e4vNgnH2BY=; b=OM5tUn+9wzbLC/0SOnVPc8QBS4iBUBVHdrmuiLqFUiZb8vqqsd3ju9GjbYQL/abJ4XVsVO duTQw1nQ4aebe8//pvi3klQFD/7KUkU8dTF5o1QztFh8kiYdHJezX7AYjP9HTWUf9MVzwK +zeMef/umGqx9F4rtlF8bycNJ+RVxOEkpXqAC3LRiAO31SOU7Kybjqw1BXtT2FNwymg/zl eYD9NBcbMGUq3OMtg0H4ySP7khkZk/ZmLgcbaS+JfpRHBT4IbBKFhPORCNO39UlwO6l0An j8qMDAgQnM1Ou8LoaE5Mmuw8+hfZqm1rPrv4fKLXr9Ge3sCOmXRDeoDkYI3pqg== 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 4BB51245E8; Wed, 6 Apr 2022 23:46: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 236NkT1l009299; Wed, 6 Apr 2022 23:46:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 236NkTfM009298; Wed, 6 Apr 2022 23:46:29 GMT (envelope-from git) Date: Wed, 6 Apr 2022 23:46:29 GMT Message-Id: <202204062346.236NkTfM009298@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: 8af242195658 - main - lio: Quiet set but unused warnings. 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: 8af24219565873d0acb2a862b15527f2366d8dbe Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649288790; 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=I7vDfCp9wJC9JZhxNo3Gf6IINXdpCCdB+e4vNgnH2BY=; b=Ki4egVOtdR54GP4oDJ33bOy78ngNx9wb9bE0cIrj4lmyv7F3vjgix//xMs7utb81HMuAU2 fQwKho2mRrGhVBoninDhIkDoDQLifG1jSum2bn+nQOpg3ZV1FG/wzudj8i18CkSy5lvYr4 312QPG3lf7AFEcW9uCF2vU8d82k55UWBI0gXFRvMxCDcGJn58pUEWu2jPt21fJ/2LXomgk Wv0UHyGltXVC5GEfiTfRE9rwxOeCJp10pCBCWcUhMx58OlUtkG0DIqvzvtqELrFBRhaqci rOockcgqWhueSBtKZjzSaLXWeIrezeY3bw1kYZpzGOo1lpykGKPSgnTy46xC2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649288790; a=rsa-sha256; cv=none; b=R4c/WPCBTD6WpvnUom1mkQYQxHj5BxyZM5QF2x/gtJbQ2K/lxVPXWwNjTgEW7xj1T0HfGI yvo4WIWki4/2CBlIIBGdB03kwK5x10R4kGIbBRxSMBXLOFIXFWJVIiveYGLo0sn2IZIV/c fbfDwVhgJOMyY4ZgVo2cVLQgFj4zo4q6EanczKaPKD3wEnjQJcFWRwcuaPs125Dtm6+uHv atbADY147TOnKg3Ud/inrfbIbZaLdMjuhdYWPuMSz+R2zOp2SR4DHH7WCKAu9+kcXhDLAi 1nMxgknCDcdT2kgksVYZF3LJYL9RrDRGspjJcXsouMIBhuATIcLnTdUZ/lu3fg== 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=8af24219565873d0acb2a862b15527f2366d8dbe commit 8af24219565873d0acb2a862b15527f2366d8dbe Author: John Baldwin AuthorDate: 2022-04-06 23:45:29 +0000 Commit: John Baldwin CommitDate: 2022-04-06 23:45:29 +0000 lio: Quiet set but unused warnings. - Remove unused variables. - Mark a value only used in debug traces as unused. - Remove variables only used for device register reads with side-effects with void casts on the read. --- sys/dev/liquidio/base/lio_console.c | 5 ++--- sys/dev/liquidio/base/lio_device.c | 9 ++++----- sys/dev/liquidio/base/lio_request_manager.c | 5 ----- sys/dev/liquidio/lio_main.c | 3 +-- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/sys/dev/liquidio/base/lio_console.c b/sys/dev/liquidio/base/lio_console.c index c36fb5bf2247..397c2f963800 100644 --- a/sys/dev/liquidio/base/lio_console.c +++ b/sys/dev/liquidio/base/lio_console.c @@ -776,7 +776,7 @@ lio_get_uboot_version(struct octeon_device *oct) struct lio_console *console; int32_t bytes_read, total_read, tries; uint32_t console_num = 0; - int i, ret = 0; + int i, ret __unused = 0; ret = lio_console_send_cmd(oct, "setenv stdout pci", 50); @@ -860,7 +860,6 @@ lio_download_firmware(struct octeon_device *oct, const uint8_t * data, struct lio_firmware_file_header *h; uint64_t load_addr; uint32_t crc32_result, i, image_len, rem; - int ret = 0; if (size < sizeof(struct lio_firmware_file_header)) { lio_dev_err(oct, "Firmware file too small (%d < %d).\n", @@ -936,6 +935,6 @@ lio_download_firmware(struct octeon_device *oct, const uint8_t * data, lio_dev_info(oct, "Writing boot command: %s\n", h->bootcmd); /* Invoke the bootcmd */ - ret = lio_console_send_cmd(oct, h->bootcmd, 50); + lio_console_send_cmd(oct, h->bootcmd, 50); return (0); } diff --git a/sys/dev/liquidio/base/lio_device.c b/sys/dev/liquidio/base/lio_device.c index 8bcf4f329848..a673a9bf414a 100644 --- a/sys/dev/liquidio/base/lio_device.c +++ b/sys/dev/liquidio/base/lio_device.c @@ -905,7 +905,7 @@ uint64_t lio_pci_readq(struct octeon_device *oct, uint64_t addr) { uint64_t val64; - volatile uint32_t val32, addrhi; + volatile uint32_t addrhi; mtx_lock(&oct->pci_win_lock); @@ -919,11 +919,11 @@ lio_pci_readq(struct octeon_device *oct, uint64_t addr) lio_write_csr32(oct, oct->reg_list.pci_win_rd_addr_hi, addrhi); /* Read back to preserve ordering of writes */ - val32 = lio_read_csr32(oct, oct->reg_list.pci_win_rd_addr_hi); + (void)lio_read_csr32(oct, oct->reg_list.pci_win_rd_addr_hi); lio_write_csr32(oct, oct->reg_list.pci_win_rd_addr_lo, addr & 0xffffffff); - val32 = lio_read_csr32(oct, oct->reg_list.pci_win_rd_addr_lo); + (void)lio_read_csr32(oct, oct->reg_list.pci_win_rd_addr_lo); val64 = lio_read_csr64(oct, oct->reg_list.pci_win_rd_data); @@ -935,7 +935,6 @@ lio_pci_readq(struct octeon_device *oct, uint64_t addr) void lio_pci_writeq(struct octeon_device *oct, uint64_t val, uint64_t addr) { - volatile uint32_t val32; mtx_lock(&oct->pci_win_lock); @@ -944,7 +943,7 @@ lio_pci_writeq(struct octeon_device *oct, uint64_t val, uint64_t addr) /* The write happens when the LSB is written. So write MSB first. */ lio_write_csr32(oct, oct->reg_list.pci_win_wr_data_hi, val >> 32); /* Read the MSB to ensure ordering of writes. */ - val32 = lio_read_csr32(oct, oct->reg_list.pci_win_wr_data_hi); + (void)lio_read_csr32(oct, oct->reg_list.pci_win_wr_data_hi); lio_write_csr32(oct, oct->reg_list.pci_win_wr_data_lo, val & 0xffffffff); diff --git a/sys/dev/liquidio/base/lio_request_manager.c b/sys/dev/liquidio/base/lio_request_manager.c index db7548e7ddff..e07d65a6c33b 100644 --- a/sys/dev/liquidio/base/lio_request_manager.c +++ b/sys/dev/liquidio/base/lio_request_manager.c @@ -406,7 +406,6 @@ lio_process_iq_request_list(struct octeon_device *oct, { struct lio_soft_command *sc; struct octeon_instr_irh *irh = NULL; - struct lio_mbuf_free_info *finfo; void *buf; uint32_t inst_count = 0; uint32_t old = iq->flush_index; @@ -415,7 +414,6 @@ lio_process_iq_request_list(struct octeon_device *oct, while (old != iq->octeon_read_index) { reqtype = iq->request_list[old].reqtype; buf = iq->request_list[old].buf; - finfo = buf; if (reqtype == LIO_REQTYPE_NONE) goto skip_this; @@ -632,7 +630,6 @@ lio_prepare_soft_command(struct octeon_device *oct, struct lio_soft_command *sc, uint8_t opcode, uint8_t subcode, uint32_t irh_ossp, uint64_t ossp0, uint64_t ossp1) { - struct lio_config *lio_cfg; struct octeon_instr_ih3 *ih3; struct octeon_instr_pki_ih3 *pki_ih3; struct octeon_instr_irh *irh; @@ -641,8 +638,6 @@ lio_prepare_soft_command(struct octeon_device *oct, struct lio_soft_command *sc, KASSERT(opcode <= 15, ("%s, %d, opcode > 15", __func__, __LINE__)); KASSERT(subcode <= 127, ("%s, %d, opcode > 127", __func__, __LINE__)); - lio_cfg = lio_get_conf(oct); - if (LIO_CN23XX_PF(oct)) { ih3 = (struct octeon_instr_ih3 *)&sc->cmd.cmd3.ih3; diff --git a/sys/dev/liquidio/lio_main.c b/sys/dev/liquidio/lio_main.c index a7c1308c10d9..79cf7105bed3 100644 --- a/sys/dev/liquidio/lio_main.c +++ b/sys/dev/liquidio/lio_main.c @@ -795,11 +795,10 @@ static int lio_chip_specific_setup(struct octeon_device *oct) { char *s; - uint32_t dev_id, rev_id; + uint32_t dev_id; int ret = 1; dev_id = lio_read_pci_cfg(oct, 0); - rev_id = pci_get_revid(oct->device); oct->subdevice_id = pci_get_subdevice(oct->device); switch (dev_id) {