Skip to contentSkip to conversation

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

PATCH Stephen Rothwell 1 participant 1 message Dec 1, 2022

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

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 <[email protected]>
Date: Thu, 1 Dec 2022 13:08:06 +1100
Subject: [PATCH] fix up for "drivers/accel: define kconfig and register a new major"

---
 drivers/accel/drm_accel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/accel/drm_accel.c +1 -1
index a5ee84a4017a..1b69824286fd 100644
@@ -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));
 }
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell