Skip to contentSkip to conversation

linux-next: build warning after merge of the driver-core tree

PATCH In review Stephen Rothwell 4 participants 8 messages Aug 1, 2019

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

Hi all,

After merging the driver-core tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

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)

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

Introduced by commit

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

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 5 lines · Stephen Rothwell

Hi all,

After merging the driver-core tree, today's linux-next build (x86_64 allmodconfig) produced this warning:

Quoted 7 lines

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)

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

Introduced by commit

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

Oops, missed that one.

Suzuki, can you send a follow-on patch to fix this up?

thanks,

greg k-h

#2 lore raw

PATCH 1/3 i2c: Revert incorrect conversion to use generic helper

The patch "drivers: Introduce device lookup variants by ACPI_COMPANION device" converted an incorrect instance in i2c driver to a new helper. Revert this change.

Cc Mika Westerberg <[email protected]>
Cc Wolfram Sang <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/i2c/i2c-core-acpi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/i2c/i2c-core-acpi.c +4 -1
index bc80aafb521f..f60f7a95d48e 100644
@@ -357,7 +357,10 @@ static int i2c_acpi_find_match_adapter(struct device *dev, const void *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);
+	struct device *dev;
+
+	dev = bus_find_device(&i2c_bus_type, NULL, handle,
+			      i2c_acpi_find_match_adapter);
 
 	return dev ? i2c_verify_adapter(dev) : NULL;
 }
Signature · 1 line
2.21.0
#3 lore raw

PATCH 2/3 drivers: Fix typo in parameter description for driver_find_device_by_acpi_dev

Fix a typo in the comment describing the parameters for the new API, which triggers the following warning for htmldocs:

include/linux/device.h:479: warning: Function parameter or member 'drv' not described in 'driver_find_device_by_acpi_dev'

---
 include/linux/device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/device.h +1 -1
index 26af63847ca7..b17548b94c3e 100644
@@ -467,7 +467,7 @@ driver_find_device_by_fwnode(struct device_driver *drv,
 /**
  * driver_find_device_by_devt- device iterator for locating a particular device
  * by devt.
- * @driver: the driver we're iterating
+ * @drv: the driver we're iterating
  * @devt: devt pointer to match.
  */
 static inline struct device *driver_find_device_by_devt(struct device_driver *drv,
Signature · 1 line
2.21.0
#4 lore raw

PATCH 3/3 drivers: Fix htmldocs warnings with bus_find_next_device()

In reply to Suzuki K Poulose

Document the parameters for bus_find_next_device() to avoid htmldocs build warnings as reported below :

include/linux/device.h:236: warning: Function parameter or member 'bus' not described in 'bus_find_next_device' include/linux/device.h:236: warning: Function parameter or member 'cur' not described in 'bus_find_next_device'

---
 include/linux/device.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/device.h +2 -0
index b17548b94c3e..ea0238c73a9c 100644
@@ -229,6 +229,8 @@ static inline struct device *bus_find_device_by_devt(struct bus_type *bus,
 /**
  * bus_find_next_device - Find the next device after a given device in a
  * given bus.
+ * @bus: bus type
+ * @cur: device to begin the search with.
  */
 static inline struct device *
 bus_find_next_device(struct bus_type *bus,struct device *cur)
Signature · 1 line
2.21.0
maintainer
#5 lore raw

Re: [PATCH 1/3] i2c: Revert incorrect conversion to use generic helper

In reply to Suzuki K Poulose
Quoted 8 lines · Suzuki K Poulose

The patch "drivers: Introduce device lookup variants by ACPI_COMPANION device" converted an incorrect instance in i2c driver to a new helper. Revert this change.

Cc Mika Westerberg <[email protected]>
Cc Wolfram Sang <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Fixes 00500147cbd3 ("drivers: Introduce device lookup variants by ACPI_COMPANION device")

I'll go add this...

#6 lore raw

Re: [PATCH 1/3] i2c: Revert incorrect conversion to use generic helper

Quoted 5 lines · Greg KH
Quoted 4 lines · Suzuki K Poulose

The patch "drivers: Introduce device lookup variants by ACPI_COMPANION device" converted an incorrect instance in i2c driver to a new helper. Revert this change.

Quoted 8 lines
Quoted 4 lines
Cc Mika Westerberg <[email protected]>
Cc Wolfram Sang <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Fixes 00500147cbd3 ("drivers: Introduce device lookup variants by ACPI_COMPANION device")

I'll go add this...

Thanks Greg ! Sorry, I thought the commit ids may change in linus's and thus I referred to the "commit subject"

Cheers

maintainer
#7 lore raw

Re: [PATCH 1/3] i2c: Revert incorrect conversion to use generic helper

Quoted 11 lines · Suzuki K Poulose
Quoted 10 lines · Greg KH
Quoted 8 lines · Suzuki K Poulose

The patch "drivers: Introduce device lookup variants by ACPI_COMPANION device" converted an incorrect instance in i2c driver to a new helper. Revert this change.

Cc Mika Westerberg <[email protected]>
Cc Wolfram Sang <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Quoted 6 lines
Quoted 3 lines
Fixes 00500147cbd3 ("drivers: Introduce device lookup variants by ACPI_COMPANION device")

I'll go add this...

Thanks Greg ! Sorry, I thought the commit ids may change in linus's and thus I referred to the "commit subject"

Once they are in my -next branch, they will not change.

thanks,

greg k-h