bhnd: Fix some -Wunused-but-set-variable warnings

MFC after:	1 week
This commit is contained in:
Mark Johnston 2022-02-28 10:54:25 -05:00
parent 1dc8ed06f3
commit 1db163b825
5 changed files with 0 additions and 18 deletions

View 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);

View File

@ -146,12 +146,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);
@ -1894,12 +1891,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);

View 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"))

View File

@ -599,12 +599,9 @@ chipc_print_child(device_t dev, device_t child)
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);

View 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);