lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200302092308.GA1997164@kroah.com>
Date:   Mon, 2 Mar 2020 10:23:08 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Hongbo Yao <yaohongbo@...wei.com>
Cc:     christian.brauner@...ntu.com, linux-kernel@...r.kernel.org,
        linux-pm@...r.kernel.org, chenzhou10@...wei.com, rjw@...ysocki.net,
        pavel@....cz
Subject: Re: [PATCH -next] drivers/base/power: fix build error without SYSFS

On Mon, Mar 02, 2020 at 05:29:18PM +0800, Hongbo Yao wrote:
> If CONFIG_SYSFS=n, the following error is seen while building 
> drivers/base/power/sysfs.c:
> 
> 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:564:19: note: expected const struct
> attribute_group ** but argument is of type const struct attribute_group *
> 
> dpm_sysfs_change_owner() should only used when CONFIG_SYSFS is
> defined.
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Fixes: 3b52fc5d7876 ("drivers/base/power: add dpm_sysfs_change_owner()")
> Signed-off-by: Hongbo Yao <yaohongbo@...wei.com>
> ---
>  drivers/base/power/power.h | 10 +++++++++-
>  drivers/base/power/sysfs.c |  2 ++

You shouldn't have to add #ifdefs to a .c file here, it should all be
able to be fixed in the .h file by putting proper "empty" functions.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ