[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250106155332.050670e4@canb.auug.org.au>
Date: Mon, 6 Jan 2025 15:53:32 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Greg KH <greg@...ah.com>, Wolfram Sang <wsa@...-dreams.de>
Cc: Heiner Kallweit <hkallweit1@...il.com>, Wolfram Sang
<wsa+renesas@...g-engineering.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Zijun Hu <quic_zijuhu@...cinc.com>, Linux
Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Next Mailing List
<linux-next@...r.kernel.org>
Subject: linux-next: build failure after merge of the driver-core tree
Hi all,
After merging the driver-core tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
drivers/i2c/i2c-core-base.c: In function 'delete_device_store':
drivers/i2c/i2c-core-base.c:1350:58: error: passing argument 3 of 'device_find_child' from incompatible pointer type [-Wincompatible-pointer-types]
1350 | child_dev = device_find_child(&adap->dev, &addr, __i2c_find_user_addr);
| ^~~~~~~~~~~~~~~~~~~~
| |
| int (*)(struct device *, void *)
In file included from include/linux/acpi.h:14,
from drivers/i2c/i2c-core-base.c:16:
include/linux/device.h:1085:49: note: expected 'device_match_t' {aka 'int (*)(struct device *, const void *)'} but argument is of type 'int (*)(struct device *, void *)'
1085 | device_match_t match);
| ~~~~~~~~~~~~~~~^~~~~
Caused by commit
f1e8bf56320a ("driver core: Constify API device_find_child() and adapt for various usages")
interacting with commit
3cfe39b3a845 ("i2c: Replace list-based mechanism for handling userspace-created clients")
from the i2c tree.
I have applied the following merge fix patch.
From: Stephen Rothwell <sfr@...b.auug.org.au>
Date: Mon, 6 Jan 2025 15:33:36 +1100
Subject: [PATCH] fix up for "driver core: Constify API device_find_child() and
adapt for various usages"
interacting with commit
3cfe39b3a845 ("i2c: Replace list-based mechanism for handling userspace-created clients")
from the i2c tree.
Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
drivers/i2c/i2c-core-base.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index bd90a6084fc0..c21a16aa96dc 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -1306,10 +1306,10 @@ new_device_store(struct device *dev, struct device_attribute *attr,
}
static DEVICE_ATTR_WO(new_device);
-static int __i2c_find_user_addr(struct device *dev, void *addrp)
+static int __i2c_find_user_addr(struct device *dev, const void *addrp)
{
struct i2c_client *client = i2c_verify_client(dev);
- unsigned short addr = *(unsigned short *)addrp;
+ unsigned short addr = *(const unsigned short *)addrp;
return client && client->flags & I2C_CLIENT_USER &&
i2c_encode_flags_to_addr(client) == addr;
--
2.45.2
--
Cheers,
Stephen Rothwell
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists