Linux-ACPI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] i2c: core: remove unused function
@ 2019-07-31 10:56 Anders Roxell
  2019-08-06 20:33 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Anders Roxell @ 2019-07-31 10:56 UTC (permalink / raw)
  To: mika.westerberg, wsa; +Cc: linux-i2c, linux-acpi, linux-kernel, 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")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/i2c/i2c-core-acpi.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
index bc80aafb521f..bb6b39fe343a 100644
--- a/drivers/i2c/i2c-core-acpi.c
+++ b/drivers/i2c/i2c-core-acpi.c
@@ -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);
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: core: remove unused function
  2019-07-31 10:56 [PATCH] i2c: core: remove unused function Anders Roxell
@ 2019-08-06 20:33 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2019-08-06 20:33 UTC (permalink / raw)
  To: Anders Roxell; +Cc: mika.westerberg, linux-i2c, linux-acpi, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1700 bytes --]

Hi Anders,

On Wed, Jul 31, 2019 at 12:56:42PM +0200, Anders Roxell wrote:
> 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")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

Can you resend with gkh and "Suzuki K Poulose <suzuki.poulose@arm.com>"
added to CC? Greg maintains a branch with device_lookup changes and
Suzuki is the author of it.

Kind regards,

   Wolfram

> ---
>  drivers/i2c/i2c-core-acpi.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
> index bc80aafb521f..bb6b39fe343a 100644
> --- a/drivers/i2c/i2c-core-acpi.c
> +++ b/drivers/i2c/i2c-core-acpi.c
> @@ -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);
> -- 
> 2.20.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 10:56 [PATCH] i2c: core: remove unused function Anders Roxell
2019-08-06 20:33 ` Wolfram Sang

Linux-ACPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-acpi/0 linux-acpi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-acpi linux-acpi/ https://lore.kernel.org/linux-acpi \
		linux-acpi@vger.kernel.org linux-acpi@archiver.kernel.org
	public-inbox-index linux-acpi


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-acpi


AGPL code for this site: git clone https://public-inbox.org/ public-inbox