From nobody Thu Dec 30 19:22:32 2021 X-Original-To: dev-commits-src-branches@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 8CF52191F0E2; Thu, 30 Dec 2021 19:22:33 +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 4JPypK1JLWz3BwP; Thu, 30 Dec 2021 19:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 AEAF51DF59; Thu, 30 Dec 2021 19:22:32 +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 1BUJMWhS017236; Thu, 30 Dec 2021 19:22:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BUJMWd8017235; Thu, 30 Dec 2021 19:22:32 GMT (envelope-from git) Date: Thu, 30 Dec 2021 19:22:32 GMT Message-Id: <202112301922.1BUJMWd8017235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e17d7f3d86b0 - stable/13 - LinuxKPI: fix -Wunused-but-set-variable warnings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e17d7f3d86b0a323126ae471025924f49e596ee0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640892153; 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=cl0wyH86fn1W3pJHF/yNYfyYNjgkOvRRpTPqnnVcRTk=; b=NJQb2ohl8q1T5deYRTlUJ55Z7lTeeUDxBbMW2TY7HdNDNHvMFL9e4h8L+4sRWkFAv4f3gQ UNgcpnnmZCCArQE3rh9P9SD/0En/2KbFO4OEBFhSTs3s4lUN1MYRA4IugO1StncpqtJ5QD /Zvng5pFM5vHyr5Y/6h2A+JYplqRPhz7Yew1uwnxGPGInid/xL899mnwNRDW2lGSRq2uKA furPMNu5R3tf1Kn/PM3tC1aXcyhpgV2Cc/aoilrJxbpbbH44PAtAcdY8wIcJsfZh9HU6HL fd4cxHeezpIk8GDr/Z/BV9N2KoG/xJ3OSBnIjfxn2IJEEweHLM4NY3wsQp9tmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640892153; a=rsa-sha256; cv=none; b=kCiI7p8T+5L2Hl+nxFwup2aLIvIZTM9djCLaAwhNfGod3KA3fmZbzxAksdgLRY4cstJHot nb6dArpm96Hu9d5U/B0gOF4OZIBPkmRXWJyFU8YuWY8pmEM8Il6bsMIlgREIpneo0II68J IW7JevOlvsjp+3zzEJ7pGx3aAE/GbHRHje/NlAhY2CMaQiE1AaBi7JShHWKxQdGNifccUE BbEMCA7S22Cfk8flMw2e9qEN/Ie50YiOMqtfi1DSugxptrqPB/amf0SorecerS21PM70yN LOOwskjPpUeAzgvSL1bC2BCM0c7Ncnw91H4k7x5I8JvlNOYyr5KbXlZKQ/tdQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e17d7f3d86b0a323126ae471025924f49e596ee0 commit e17d7f3d86b0a323126ae471025924f49e596ee0 Author: Bjoern A. Zeeb AuthorDate: 2021-11-24 21:20:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-12-30 18:25:15 +0000 LinuxKPI: fix -Wunused-but-set-variable warnings Handle write-only variables by removing the unused return value from void functions or removing the unused variables entirely. Sponsored by: The FreeBSD Foundation Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D33107 (cherry picked from commit 7043359ce3c1e56ed55c8b41867a14a418511a05) --- sys/compat/linuxkpi/common/src/linux_firmware.c | 3 +-- sys/compat/linuxkpi/common/src/linux_pci.c | 4 ---- sys/compat/linuxkpi/common/src/linux_usb.c | 8 +++----- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_firmware.c b/sys/compat/linuxkpi/common/src/linux_firmware.c index d779b509105e..47cccd42da20 100644 --- a/sys/compat/linuxkpi/common/src/linux_firmware.c +++ b/sys/compat/linuxkpi/common/src/linux_firmware.c @@ -150,7 +150,6 @@ lkpi_fw_task(void *ctx, int pending) { struct lkpi_fw_task *lfwt; const struct linuxkpi_firmware *fw; - int error; KASSERT(ctx != NULL && pending == 1, ("%s: lfwt %p, pending %d\n", __func__, ctx, pending)); @@ -159,7 +158,7 @@ lkpi_fw_task(void *ctx, int pending) if (lfwt->cont == NULL) goto out; - error = _linuxkpi_request_firmware(lfwt->fw_name, &fw, lfwt->dev, + _linuxkpi_request_firmware(lfwt->fw_name, &fw, lfwt->dev, lfwt->gfp, true, true); /* diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index db94bc08239e..1c562b74c95a 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -1060,11 +1060,9 @@ dma_pool_obj_import(void *arg, void **store, int count, int domain __unused, int flags) { struct dma_pool *pool = arg; - struct linux_dma_priv *priv; struct linux_dma_obj *obj; int error, i; - priv = pool->pool_device->dma_priv; for (i = 0; i < count; i++) { obj = uma_zalloc(linux_dma_obj_zone, flags); if (obj == NULL) @@ -1087,11 +1085,9 @@ static void dma_pool_obj_release(void *arg, void **store, int count) { struct dma_pool *pool = arg; - struct linux_dma_priv *priv; struct linux_dma_obj *obj; int i; - priv = pool->pool_device->dma_priv; for (i = 0; i < count; i++) { obj = store[i]; bus_dmamem_free(pool->pool_dmat, obj->vaddr, obj->dmamap); diff --git a/sys/compat/linuxkpi/common/src/linux_usb.c b/sys/compat/linuxkpi/common/src/linux_usb.c index e93559f95264..11f400bc2c52 100644 --- a/sys/compat/linuxkpi/common/src/linux_usb.c +++ b/sys/compat/linuxkpi/common/src/linux_usb.c @@ -1185,15 +1185,14 @@ usb_linux_free_device(struct usb_device *dev) { struct usb_host_endpoint *uhe; struct usb_host_endpoint *uhe_end; - int err; uhe = dev->linux_endpoint_start; uhe_end = dev->linux_endpoint_end; while (uhe != uhe_end) { - err = usb_setup_endpoint(dev, uhe, 0); + usb_setup_endpoint(dev, uhe, 0); uhe++; } - err = usb_setup_endpoint(dev, &dev->ep0, 0); + usb_setup_endpoint(dev, &dev->ep0, 0); free(dev->linux_endpoint_start, M_USBDEV); } @@ -1276,7 +1275,6 @@ usb_linux_cleanup_interface(struct usb_device *dev, struct usb_interface *iface) struct usb_host_interface *uhi_end; struct usb_host_endpoint *uhe; struct usb_host_endpoint *uhe_end; - int err; uhi = iface->altsetting; uhi_end = iface->altsetting + iface->num_altsetting; @@ -1284,7 +1282,7 @@ usb_linux_cleanup_interface(struct usb_device *dev, struct usb_interface *iface) uhe = uhi->endpoint; uhe_end = uhi->endpoint + uhi->desc.bNumEndpoints; while (uhe != uhe_end) { - err = usb_setup_endpoint(dev, uhe, 0); + usb_setup_endpoint(dev, uhe, 0); uhe++; } uhi++;