git: ee28ad11b763 - main - iavf: Quite set but not used warnings.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 06 Apr 2022 23:46:17 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=ee28ad11b7635715ed7d2f5815ace34c433992d1
commit ee28ad11b7635715ed7d2f5815ace34c433992d1
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-06 23:45:28 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-06 23:45:28 +0000
iavf: Quite set but not used warnings.
Move declaration of dev in iavf_if_attach_post under #ifdef IXL_DEBUG.
Remove unused ifp in iavf_stop.
---
sys/dev/iavf/if_iavf_iflib.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/sys/dev/iavf/if_iavf_iflib.c b/sys/dev/iavf/if_iavf_iflib.c
index 7ee43e50a48d..1f6c056bdf0a 100644
--- a/sys/dev/iavf/if_iavf_iflib.c
+++ b/sys/dev/iavf/if_iavf_iflib.c
@@ -463,13 +463,14 @@ iavf_setup_vc_tq(struct iavf_sc *sc)
static int
iavf_if_attach_post(if_ctx_t ctx)
{
- device_t dev;
+#ifdef IXL_DEBUG
+ device_t dev = iflib_get_dev(ctx);
+#endif
struct iavf_sc *sc;
struct iavf_hw *hw;
struct iavf_vsi *vsi;
int error = 0;
- dev = iflib_get_dev(ctx);
INIT_DBG_DEV(dev, "begin");
sc = iavf_sc_from_ctx(ctx);
@@ -1767,10 +1768,6 @@ iavf_update_link_status(struct iavf_sc *sc)
static void
iavf_stop(struct iavf_sc *sc)
{
- struct ifnet *ifp;
-
- ifp = sc->vsi.ifp;
-
iavf_clear_state(&sc->state, IAVF_STATE_RUNNING);
iavf_disable_intr(&sc->vsi);