Skip to contentSkip to conversation

soundwire: intel: Remove unused function

PATCH Superseded Sudip Mukherjee 2 participants 2 messages Apr 22, 2020 – Apr 24, 2020 SoundWire

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soundwire: intel: Remove unused function

The function sdw_intel_init() is not used anywhere, remove it for now.

---
 drivers/soundwire/intel_init.c | 23 -----------------------
 1 file changed, 23 deletions(-)
drivers/soundwire/intel_init.c +0 -23
index ad7053463889..2f37dad06321 100644
@@ -183,29 +183,6 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,
 }
 
 /**
- * sdw_intel_init() - SoundWire Intel init routine
- * @parent_handle: ACPI parent handle
- * @res: resource data
- *
- * This scans the namespace and creates SoundWire link controller devices
- * based on the info queried.
- */
-static void *sdw_intel_init(acpi_handle *parent_handle,
-			    struct sdw_intel_res *res)
-{
-	acpi_status status;
-
-	status = acpi_walk_namespace(ACPI_TYPE_DEVICE,
-				     parent_handle, 1,
-				     sdw_intel_acpi_cb,
-				     NULL, res, NULL);
-	if (ACPI_FAILURE(status))
-		return NULL;
-
-	return sdw_intel_add_controller(res);
-}
-
-/**
  * sdw_intel_exit() - SoundWire Intel exit
  * @arg: callback context
  *
Signature · 1 line
2.11.0
#1 lore raw
Quoted 44 lines · Sudip Mukherjee

The function sdw_intel_init() is not used anywhere, remove it for now.

---
 drivers/soundwire/intel_init.c | 23 -----------------------
 1 file changed, 23 deletions(-)
drivers/soundwire/intel_init.c +0 -23
index ad7053463889..2f37dad06321 100644
@@ -183,29 +183,6 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,
 }
 
 /**
- * sdw_intel_init() - SoundWire Intel init routine
- * @parent_handle: ACPI parent handle
- * @res: resource data
- *
- * This scans the namespace and creates SoundWire link controller devices
- * based on the info queried.
- */
-static void *sdw_intel_init(acpi_handle *parent_handle,
-			    struct sdw_intel_res *res)
-{
-	acpi_status status;
-
-	status = acpi_walk_namespace(ACPI_TYPE_DEVICE,
-				     parent_handle, 1,
-				     sdw_intel_acpi_cb,
-				     NULL, res, NULL);
-	if (ACPI_FAILURE(status))
-		return NULL;
-
-	return sdw_intel_add_controller(res);
-}
-
-/**
  * sdw_intel_exit() - SoundWire Intel exit
  * @arg: callback context
  *
Signature · 1 line
2.11.0

This patch will cause two more warnings.

$ make -j$(nproc) -s O=out allyesconfig drivers/soundwire/intel_init.o
../drivers/soundwire/intel_init.c:152:20: warning: ‘sdw_intel_acpi_cb’
defined but not used [-Wunused-function]
 static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,
                    ^~~~~~~~~~~~~~~~~
../drivers/soundwire/intel_init.c:51:2: warning:
‘sdw_intel_add_controller’ defined but not used [-Wunused-function]
 *sdw_intel_add_controller(struct sdw_intel_res *res)
  ^~~~~~~~~~~~~~~~~~~~~~~~

Removing these two functions seems to be enough. link_mask should also be removed at that point.

Cheers,
Nathan