Re: linux-next: Tree for Mar 18 (drivers/base/power/sysfs.c)

From: Stephen Rothwell
Date: Wed Mar 18 2020 - 23:20:17 EST


Hi Randy,

On Wed, 18 Mar 2020 09:14:29 -0700 Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote:
>
> on i386:
>
> ../drivers/base/power/sysfs.c: In function âdpm_sysfs_change_ownerâ:
> ../drivers/base/power/sysfs.c:708:44: error: passing argument 2 of âsysfs_group_change_ownerâ from incompatible pointer type [-Werror=incompatible-pointer-types]
> rc = sysfs_group_change_owner(&dev->kobj, &pm_attr_group, kuid, kgid);
> ^
> In file included from ../include/linux/kobject.h:20:0,
> from ../include/linux/device.h:17,
> from ../drivers/base/power/sysfs.c:3:
> ../include/linux/sysfs.h:576:19: note: expected âconst struct attribute_group **â but argument is of type âconst struct attribute_group *â
> static inline int sysfs_group_change_owner(struct kobject *kobj,
> ^~~~~~~~~~~~~~~~~~~~~~~~
> ../drivers/base/power/sysfs.c:714:16: error: passing argument 2 of âsysfs_group_change_ownerâ from incompatible pointer type [-Werror=incompatible-pointer-types]
> &dev->kobj, &pm_runtime_attr_group, kuid, kgid);
> ^
> In file included from ../include/linux/kobject.h:20:0,
> from ../include/linux/device.h:17,
> from ../drivers/base/power/sysfs.c:3:
> ../include/linux/sysfs.h:576:19: note: expected âconst struct attribute_group **â but argument is of type âconst struct attribute_group *â
> static inline int sysfs_group_change_owner(struct kobject *kobj,
> ^~~~~~~~~~~~~~~~~~~~~~~~
> ../drivers/base/power/sysfs.c:720:45: error: passing argument 2 of âsysfs_group_change_ownerâ from incompatible pointer type [-Werror=incompatible-pointer-types]
> rc = sysfs_group_change_owner(&dev->kobj, &pm_wakeup_attr_group,
> ^
> In file included from ../include/linux/kobject.h:20:0,
> from ../include/linux/device.h:17,
> from ../drivers/base/power/sysfs.c:3:
> ../include/linux/sysfs.h:576:19: note: expected âconst struct attribute_group **â but argument is of type âconst struct attribute_group *â
> static inline int sysfs_group_change_owner(struct kobject *kobj,
> ^~~~~~~~~~~~~~~~~~~~~~~~
> ../drivers/base/power/sysfs.c:732:16: error: passing argument 2 of âsysfs_group_change_ownerâ from incompatible pointer type [-Werror=incompatible-pointer-types]
> &dev->kobj, &pm_qos_latency_tolerance_attr_group, kuid,
> ^
> In file included from ../include/linux/kobject.h:20:0,
> from ../include/linux/device.h:17,
> from ../drivers/base/power/sysfs.c:3:
> ../include/linux/sysfs.h:576:19: note: expected âconst struct attribute_group **â but argument is of type âconst struct attribute_group *â
> static inline int sysfs_group_change_owner(struct kobject *kobj,
> ^~~~~~~~~~~~~~~~~~~~~~~~

Caused by commitCONFIG_SYSFS

303a42769c4c ("sysfs: add sysfs_group{s}_change_owner()")

from the net-next tree.

The CONFIG_SYSFS declaration of sysfs_group_change_owner() is different
from the !CONFIG_SYSFS version.

--
Cheers,
Stephen Rothwell

Attachment: pgpB030IzvgjO.pgp
Description: OpenPGP digital signature