aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2021-12-14 14:59:09 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2021-12-14 14:59:09 +0000
commit06c95f1facd191ad62fb5c1854342d02d084166d (patch)
tree8ed2b5e62b3c3e483bab76bd7113afaa703f9da4
parent3c39566d659cad5d370465cc1619f139124280eb (diff)
downloadsrc-06c95f1facd191ad62fb5c1854342d02d084166d.tar.gz
src-06c95f1facd191ad62fb5c1854342d02d084166d.zip
bhnd: plug set-but-not-used vars
Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r--sys/dev/bhnd/bhnd.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/sys/dev/bhnd/bhnd.c b/sys/dev/bhnd/bhnd.c
index 0413970e5665..d393c30f160d 100644
--- a/sys/dev/bhnd/bhnd.c
+++ b/sys/dev/bhnd/bhnd.c
@@ -485,15 +485,12 @@ bhnd_generic_alloc_pmu(device_t dev, device_t child)
int
bhnd_generic_release_pmu(device_t dev, device_t child)
{
- struct bhnd_softc *sc;
struct bhnd_core_clkctl *clkctl;
struct bhnd_resource *r;
device_t pmu_dev;
bus_topo_assert();
- sc = device_get_softc(dev);
-
if (device_get_parent(child) != dev)
return (EINVAL);
@@ -577,14 +574,11 @@ bhnd_generic_get_clock_freq(device_t dev, device_t child, bhnd_clock clock,
int
bhnd_generic_request_clock(device_t dev, device_t child, bhnd_clock clock)
{
- struct bhnd_softc *sc;
struct bhnd_core_clkctl *clkctl;
uint32_t avail;
uint32_t req;
int error;
- sc = device_get_softc(dev);
-
if (device_get_parent(child) != dev)
return (EINVAL);
@@ -696,14 +690,11 @@ bhnd_generic_enable_clocks(device_t dev, device_t child, uint32_t clocks)
int
bhnd_generic_request_ext_rsrc(device_t dev, device_t child, u_int rsrc)
{
- struct bhnd_softc *sc;
struct bhnd_core_clkctl *clkctl;
uint32_t req;
uint32_t avail;
int error;
- sc = device_get_softc(dev);
-
if (device_get_parent(child) != dev)
return (EINVAL);
@@ -712,8 +703,6 @@ bhnd_generic_request_ext_rsrc(device_t dev, device_t child, u_int rsrc)
BHND_ASSERT_CLKCTL_AVAIL(clkctl);
- sc = device_get_softc(dev);
-
if (rsrc > BHND_CCS_ERSRC_MAX)
return (EINVAL);
@@ -739,12 +728,9 @@ bhnd_generic_request_ext_rsrc(device_t dev, device_t child, u_int rsrc)
int
bhnd_generic_release_ext_rsrc(device_t dev, device_t child, u_int rsrc)
{
- struct bhnd_softc *sc;
struct bhnd_core_clkctl *clkctl;
uint32_t mask;
- sc = device_get_softc(dev);
-
if (device_get_parent(child) != dev)
return (EINVAL);
@@ -753,8 +739,6 @@ bhnd_generic_release_ext_rsrc(device_t dev, device_t child, u_int rsrc)
BHND_ASSERT_CLKCTL_AVAIL(clkctl);
- sc = device_get_softc(dev);
-
if (rsrc > BHND_CCS_ERSRC_MAX)
return (EINVAL);
@@ -801,12 +785,9 @@ int
bhnd_generic_get_nvram_var(device_t dev, device_t child, const char *name,
void *buf, size_t *size, bhnd_nvram_type type)
{
- struct bhnd_softc *sc;
device_t nvram, parent;
int error;
- sc = device_get_softc(dev);
-
/* If a NVRAM device is available, consult it first */
nvram = bhnd_retain_provider(child, BHND_SERVICE_NVRAM);
if (nvram != NULL) {
@@ -938,9 +919,6 @@ bhnd_child_location(device_t dev, device_t child, struct sbuf *sb)
void
bhnd_generic_child_deleted(device_t dev, device_t child)
{
- struct bhnd_softc *sc;
-
- sc = device_get_softc(dev);
/* Free device info */
if (bhnd_get_pmu_info(child) != NULL) {