]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
bhnd: Fix some -Wunused-but-set-variable warnings
authorMark Johnston <markj@FreeBSD.org>
Mon, 28 Feb 2022 15:54:25 +0000 (10:54 -0500)
committerMark Johnston <markj@FreeBSD.org>
Mon, 7 Mar 2022 13:18:25 +0000 (08:18 -0500)
(cherry picked from commit 1db163b82565302edebcfde9aee3a77586bccb1f)

sys/dev/bhnd/bcma/bcma.c
sys/dev/bhnd/bhndb/bhndb.c
sys/dev/bhnd/cores/chipc/bhnd_pmu_chipc.c
sys/dev/bhnd/cores/chipc/chipc.c
sys/dev/bhnd/siba/siba.c

index 7b2bc2d59e0f80e6c8d79c05cab5ad66e71a4938..5ae6db1fbca63d0a2e04b36e743df799db9f32df 100644 (file)
@@ -120,11 +120,8 @@ bcma_add_child(device_t dev, u_int order, const char *name, int unit)
 static void
 bcma_child_deleted(device_t dev, device_t child)
 {
-       struct bhnd_softc       *sc;
        struct bcma_devinfo     *dinfo;
 
-       sc = device_get_softc(dev);
-
        /* Call required bhnd(4) implementation */
        bhnd_generic_child_deleted(dev, child);
 
index c90ed9abf67153f1ed30a6f3a7aac52f5889e419..7a4063238e29dd30f136bb005803c205a9eea25a 100644 (file)
@@ -145,12 +145,9 @@ bhndb_probe_nomatch(device_t dev, device_t child)
 static int
 bhndb_print_child(device_t dev, device_t child)
 {
-       struct bhndb_softc      *sc;
        struct resource_list    *rl;
        int                      retval = 0;
 
-       sc = device_get_softc(dev);
-
        retval += bus_print_child_header(dev, child);
 
        rl = BUS_GET_RESOURCE_LIST(dev, child);
@@ -1902,12 +1899,9 @@ bhndb_bus_barrier(device_t dev, device_t child, struct bhnd_resource *r,
 static int
 bhndb_bhnd_map_intr(device_t dev, device_t child, u_int intr, rman_res_t *irq)
 {
-       struct bhndb_softc      *sc;
        u_int                    ivec;
        int                      error;
 
-       sc = device_get_softc(dev);
-
        /* Is the intr valid? */
        if (intr >= bhnd_get_intr_count(child))
                return (EINVAL);
index 14ee0385cf5e7a2302c84e3ff34de659e68972ca..d04702c10f978645b2f47b2e4e3ad54ef13ac6d0 100644 (file)
@@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$");
 static int
 bhnd_pmu_chipc_probe(device_t dev)
 {
-       struct bhnd_pmu_softc   *sc;
        struct chipc_caps       *ccaps;
        struct chipc_softc      *chipc_sc;
        device_t                 chipc;
@@ -70,8 +69,6 @@ bhnd_pmu_chipc_probe(device_t dev)
        uint32_t                 pcaps;
        uint8_t                  rev;
 
-       sc = device_get_softc(dev);
-
        /* Look for chipc parent */
        chipc = device_get_parent(dev);
        if (device_get_devclass(chipc) != devclass_find("bhnd_chipc"))
index 1449c3b565dc63a6ff8d995fafd36b62d5a9c58d..f0e3afb486c0f1b46a8ce2e8535a03dbc8576f6b 100644 (file)
@@ -621,12 +621,9 @@ chipc_child_location_str(device_t dev, device_t child, char *buf,
 static device_t
 chipc_add_child(device_t dev, u_int order, const char *name, int unit)
 {
-       struct chipc_softc      *sc;
        struct chipc_devinfo    *dinfo;
        device_t                 child;
 
-       sc = device_get_softc(dev);
-
        child = device_add_child_ordered(dev, order, name, unit);
        if (child == NULL)
                return (NULL);
index 6794412ef76085e48558ba5c430befbacd1df4bb..994f4327b752571f492a942fb5db302f1ac44a21 100644 (file)
@@ -1260,11 +1260,8 @@ siba_add_child(device_t dev, u_int order, const char *name, int unit)
 static void
 siba_child_deleted(device_t dev, device_t child)
 {
-       struct bhnd_softc       *sc;
        struct siba_devinfo     *dinfo;
 
-       sc = device_get_softc(dev);
-
        /* Call required bhnd(4) implementation */
        bhnd_generic_child_deleted(dev, child);