Skip to contentSkip to conversation

i2c: core: remove unused function

PATCH In review Anders Roxell 2 participants 2 messages Jul 31, 2019 – Aug 6, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: core: remove unused function

GCC warns taht function 'i2c_acpi_find_match_adapter()' is not used.

../drivers/i2c/i2c-core-acpi.c:347:12: warning:
‘i2c_acpi_find_match_adapter’ defined but not used [-Wunused-function]
static int i2c_acpi_find_match_adapter(struct device *dev, const void *data)

            ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Rework to remove the function 'i2c_acpi_find_match_adapter()'.

Fixes 00500147cbd3 ("drivers: Introduce device lookup variants by ACPI_COMPANION device")
---
 drivers/i2c/i2c-core-acpi.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/i2c/i2c-core-acpi.c +0 -11
index bc80aafb521f..bb6b39fe343a 100644
@@ -344,17 +344,6 @@ u32 i2c_acpi_find_bus_speed(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(i2c_acpi_find_bus_speed);
 
-static int i2c_acpi_find_match_adapter(struct device *dev, const void *data)
-{
-	struct i2c_adapter *adapter = i2c_verify_adapter(dev);
-
-	if (!adapter)
-		return 0;
-
-	return ACPI_HANDLE(dev) == (acpi_handle)data;
-}
-
-
 struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle)
 {
 	struct device *dev = bus_find_device_by_acpi_dev(&i2c_bus_type, handle);
Signature · 1 line
2.20.1
#1 lore raw

Hi Anders,

Quoted 11 lines · Anders Roxell

GCC warns taht function 'i2c_acpi_find_match_adapter()' is not used.

../drivers/i2c/i2c-core-acpi.c:347:12: warning:
‘i2c_acpi_find_match_adapter’ defined but not used [-Wunused-function]
static int i2c_acpi_find_match_adapter(struct device *dev, const void *data)

            ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Rework to remove the function 'i2c_acpi_find_match_adapter()'.

Fixes 00500147cbd3 ("drivers: Introduce device lookup variants by ACPI_COMPANION device")

Can you resend with gkh and "Suzuki K Poulose <[email protected]>" added to CC? Greg maintains a branch with device_lookup changes and Suzuki is the author of it.

Kind regards,

Wolfram

Quoted 29 lines
---
 drivers/i2c/i2c-core-acpi.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/i2c/i2c-core-acpi.c +0 -11
index bc80aafb521f..bb6b39fe343a 100644
@@ -344,17 +344,6 @@ u32 i2c_acpi_find_bus_speed(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(i2c_acpi_find_bus_speed);
 
-static int i2c_acpi_find_match_adapter(struct device *dev, const void *data)
-{
-	struct i2c_adapter *adapter = i2c_verify_adapter(dev);
-
-	if (!adapter)
-		return 0;
-
-	return ACPI_HANDLE(dev) == (acpi_handle)data;
-}
-
-
 struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle)
 {
 	struct device *dev = bus_find_device_by_acpi_dev(&i2c_bus_type, handle);
Signature · 1 line
2.20.1