From nobody Sun Jul 24 11:02:32 2022 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 4LrKyJ2w6wz4XXQJ; Sun, 24 Jul 2022 11:02:32 +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 4LrKyJ2G3Lz3dvV; Sun, 24 Jul 2022 11:02:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660552; 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=GNAXnybCom8CG7wItVCJ5iVebUzeUahtgy3gIOZp2C4=; b=JLMlnFinpxldf0+OU4joxT/uynbHXjlPAmhCA1aSzXG2c51LK56ANM+2gLaoSL/k4zXpWb GzWTE+yA26tQHLpNglhxcnY4Zgzadi7K48SiTtpZ23En++SKpXNKU8ZqqcM68+TkWQ6MlD 51c+xoDAhXuJHWH9aRu/uvnKc/K7bdYhvhhB6+SzwRR097M0R0bBxvMobGyy6+L9rTT0A6 9EVEF09VOdwm8omNVFZ5CvsCRLUTf1bXDSlyD1o8q2p6StuLJ0TXwj+ZGKcOtBefTYCN31 hEJfhwY/JWLrWD+Jo/Mzq7xTDNVv53LieK+S4yzqJlTL3nSDNQqELyymlhf0Rw== 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 4LrKyJ1NC3zGZ4; Sun, 24 Jul 2022 11:02: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 26OB2WWP041664; Sun, 24 Jul 2022 11:02:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26OB2W7M041663; Sun, 24 Jul 2022 11:02:32 GMT (envelope-from git) Date: Sun, 24 Jul 2022 11:02:32 GMT Message-Id: <202207241102.26OB2W7M041663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f895c3b38743 - stable/12 - Fix unused variable warning in if_re_netmap.h 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f895c3b3874385f1302c727a9bb2fa1bc1f08b11 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660552; 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=GNAXnybCom8CG7wItVCJ5iVebUzeUahtgy3gIOZp2C4=; b=QcXefYVrgiUrj8zyTZT+b1/K2jTVQori/trc1utmAmcaB7vP5IxNPYpqHXWuMTgaq/qZ+x AqbHVfWBRdWyn8JxAzw6wx/HDyLZmRf6VDnJcskQtSLVYUKP6FVIQIzE4Mk7xYfDEr0C36 HXapsoppaLZllDnNw0CmT54lofk3gJrozO35vPbcKzDIrlAOCBmmuOsPJzyMDpk/DtrPaY rge9kBh+Ah/EHA5Xse+z1Z0Q5j1Ish2nS0OL3qMTAQR3wl5Kh7aQ8AyI5sd1or7aH3OmA9 Mits2qUKJwd6RiemwtMAg0JStHTyBQK/C5CxogSn9H5ZoAbn2URMbuOKNysFsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658660552; a=rsa-sha256; cv=none; b=s+CHPXRX7ySg5MapHlg4I8g46+5hM7hDZBKUid60uWE0iapZpyTIac711/VAi8HfDZMbaV UFOcmEC70SG6RCsNfXEKmsH82JqEsSU3ORPphgnwXAk4z0e7JyoSkI7Iqhb2VOYWtTeVrf yUBil4zP64hrIRDxT/oeMm8UpQ6hOMZ1AvscbTjr2jTl81x4mxPREBHKRDGjxkWAmT5g6X Mxkb5eeHJ/juG3JwnW3wcrg9AqBwxbSTvekW2iiVfwGCZc7afrr05ydsHapDd4qTQQ4kLh LWU4WEa866gQ0K0ZbJ+WBiJloJS9MtQMgOsLM9IJBznmv/HT6pKoEzODp9jj0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f895c3b3874385f1302c727a9bb2fa1bc1f08b11 commit f895c3b3874385f1302c727a9bb2fa1bc1f08b11 Author: Dimitry Andric AuthorDate: 2022-07-21 19:52:29 +0000 Commit: Dimitry Andric CommitDate: 2022-07-24 11:01:22 +0000 Fix unused variable warning in if_re_netmap.h With clang 15, the following -Werror warning is produced: sys/dev/netmap/if_re_netmap.h:179:8: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable] u_int n; ^ The 'n' variable appears to have been a debugging aid that has never been used for anything, so remove it. MFC after: 3 days (cherry picked from commit 8bfedf5852bcb846bfdd2a54989d65cdbb16f7ef) --- sys/dev/netmap/if_re_netmap.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/netmap/if_re_netmap.h b/sys/dev/netmap/if_re_netmap.h index 0e56a731ac6a..7c356ab4bd22 100644 --- a/sys/dev/netmap/if_re_netmap.h +++ b/sys/dev/netmap/if_re_netmap.h @@ -176,7 +176,6 @@ re_netmap_rxsync(struct netmap_kring *kring, int flags) struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap ring */ u_int nic_i; /* index into the NIC ring */ - u_int n; u_int const lim = kring->nkr_num_slots - 1; u_int const head = kring->rhead; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; @@ -236,7 +235,7 @@ re_netmap_rxsync(struct netmap_kring *kring, int flags) nm_i = kring->nr_hwcur; if (nm_i != head) { nic_i = netmap_idx_k2n(kring, nm_i); - for (n = 0; nm_i != head; n++) { + while (nm_i != head) { struct netmap_slot *slot = &ring->slot[nm_i]; uint64_t paddr; void *addr = PNMB(na, slot, &paddr);