From nobody Thu Jul 21 19:53:38 2022 X-Original-To: dev-commits-src-main@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 4LpjtV6xc6z4XPMq; Thu, 21 Jul 2022 19:53:38 +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 4LpjtV5lsnz3bvD; Thu, 21 Jul 2022 19:53:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658433218; 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=wZ943FnQqRddBxagcQMYm9Y87s6Ov28x31kcyLvqpgM=; b=KJ9UN4tDn+c/WlrCg43d0o7mT40XINSvUp0f/AoJj1jszJKb2bsXG1zQLdfA9ieva3ykrM fviDrXXs5rn+nXvMzIxjUjsYFxk8sHztC2uD6OjnEsh7fey/wnhZU7myOUSoQ4nj8HS3A/ +AD+DVrLLgztZ+rqkaqKZgKG9LnnK0ZmHO4pprTZTS5yCV+RE7LDN87LMzoXMgPpEWf5/i aJXWOpBuM5Wt7+FTjkeFeszZI2rk3wyExF9mwPI7KV1R8+pl3ORFhztSBVROTZZN/cDvzg byoP8Gv6XMRe2qVwEg1wNdtxjwRIHHNi3hgSZtntpH2cbq2D+V82an+vos1D2A== 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 4LpjtV4t9nzZ78; Thu, 21 Jul 2022 19:53:38 +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 26LJrcaq006578; Thu, 21 Jul 2022 19:53:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26LJrcge006577; Thu, 21 Jul 2022 19:53:38 GMT (envelope-from git) Date: Thu, 21 Jul 2022 19:53:38 GMT Message-Id: <202207211953.26LJrcge006577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 8bfedf5852bc - main - Fix unused variable warning in if_re_netmap.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 8bfedf5852bcb846bfdd2a54989d65cdbb16f7ef Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658433218; 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=wZ943FnQqRddBxagcQMYm9Y87s6Ov28x31kcyLvqpgM=; b=mauP6aULXVG9skypKr12t37npxmfa2l+Qe0y8RHb5DIEzDiKgOI2gennKQDSzQ38Gbxi+v z/OklqCaQp8nMOAYU6aXeD+2o+KT410yMYLP7n560TXFMmPPKOaX3zJs/FtZAKxZLYV5El BcE01wV5dzVivEdMUFtTz5UNYSl1xTp7qQg+UHDXVLZvJdCTgUjL+pHt/vbonjWzqcT642 dcwiuttc65tgmmbmRAOI1VJqPwtOJRP8B5Rc8IClir6GQv89Imy5v4rZj4BtXL1f9eD58F qqBtGUU6BDNCtiFWdtc/8M4XZHUbZbkDPG6KTh2DNs8C/JBE75y5nrpHFZ/Skw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658433218; a=rsa-sha256; cv=none; b=kih5C7mQHuSnyBySrPN4mbiIw3NTOPdBgKNkpfX7Hy5MhEQBQqyBVa1xBGVL6TD47S46I5 ojgt9VCM4l//aMVuIvjjbMMuJqt0eFh8jqOO/bDw2mHs5Cdoz3ZNz6jbPCZweNhezH8WNm mXFdMnOlsy5NjboRxpCS1wy+xmuCeZDxU5vSatUepT6R8RDhEj2kVBzUvr70nvFC/f7EBZ soFps99pHGzww2gqq4GJhLyWzk4j9kmf5m9tNllCx8OHyvxW/7TQLip/hLbNIQDvyJVoaC blYwyo1DrEdSaPjcvCOwC60m5rme2reQjSX6uFTSlr2aWmSjck6C3iy3Sfy6bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8bfedf5852bcb846bfdd2a54989d65cdbb16f7ef commit 8bfedf5852bcb846bfdd2a54989d65cdbb16f7ef Author: Dimitry Andric AuthorDate: 2022-07-21 19:52:29 +0000 Commit: Dimitry Andric CommitDate: 2022-07-21 19:52:39 +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 --- 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);