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

Stephen Rothwell sfr at canb.auug.org.au
Thu Dec 1 02:18:25 UTC 2022


Hi all,

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

drivers/gpu/drm/../../accel/drm_accel.c: In function 'accel_sysfs_init':
drivers/gpu/drm/../../accel/drm_accel.c:41:30: error: assignment to 'char * (*)(const struct device *, umode_t *)' {aka 'char * (*)(const struct device *, short unsigned int *)'} from incompatible pointer type 'char * (*)(struct device *, umode_t *)' {aka 'char * (*)(struct device *, short unsigned int *)'} [-Werror=incompatible-pointer-types]
   41 |         accel_class->devnode = accel_devnode;
      |                              ^

Caused by commit

  ff62b8e6588f ("driver core: make struct class.devnode() take a const *")

interacting with commit

  8bf4889762a8 ("drivers/accel: define kconfig and register a new major")

from the drm tree.

I have applied the following merge resolution patch.

From: Stephen Rothwell <sfr at canb.auug.org.au>
Date: Thu, 1 Dec 2022 13:08:06 +1100
Subject: [PATCH] fix up for "drivers/accel: define kconfig and register a new major"

Signed-off-by: Stephen Rothwell <sfr at canb.auug.org.au>
---
 drivers/accel/drm_accel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/accel/drm_accel.c b/drivers/accel/drm_accel.c
index a5ee84a4017a..1b69824286fd 100644
--- a/drivers/accel/drm_accel.c
+++ b/drivers/accel/drm_accel.c
@@ -27,7 +27,7 @@ static struct device_type accel_sysfs_device_minor = {
 	.name = "accel_minor"
 };
 
-static char *accel_devnode(struct device *dev, umode_t *mode)
+static char *accel_devnode(const struct device *dev, umode_t *mode)
 {
 	return kasprintf(GFP_KERNEL, "accel/%s", dev_name(dev));
 }
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20221201/223430b3/attachment.sig>


More information about the dri-devel mailing list