git: 06c95f1facd1 - main - bhnd: plug set-but-not-used vars

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Tue, 14 Dec 2021 14:59:31 UTC
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=06c95f1facd191ad62fb5c1854342d02d084166d

commit 06c95f1facd191ad62fb5c1854342d02d084166d
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-12-14 14:59:09 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2021-12-14 14:59:09 +0000

    bhnd: plug set-but-not-used vars
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/dev/bhnd/bhnd.c | 22 ----------------------
 1 file changed, 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) {