drivers/base/power/domain_governor.c:236: warning: cannot understand function prototype: 'struct dev_power_governor pm_domain_always_on_gov = '

From: kernel test robot
Date: Sun Dec 03 2023 - 01:34:27 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 815fb87b753055df2d9e50f6cd80eb10235fe3e9
commit: c84e358718a66f76ac0de1681d15d8d0c68fcdab soc: Mediatek: Add SCPSYS power domain driver
date: 8 years ago
config: x86_64-buildonly-randconfig-006-20230906 (https://download.01.org/0day-ci/archive/20231203/202312030241.E2FA2zJY-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231203/202312030241.E2FA2zJY-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312030241.E2FA2zJY-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

In file included from include/linux/kobject.h:21,
from include/linux/device.h:17,
from include/linux/pm_domain.h:12,
from drivers/base/power/domain_governor.c:10:
include/linux/sysfs.h: In function 'sysfs_get_dirent':
include/linux/sysfs.h:496:44: warning: pointer targets in passing argument 2 of 'kernfs_find_and_get' differ in signedness [-Wpointer-sign]
496 | return kernfs_find_and_get(parent, name);
| ^~~~
| |
| const unsigned char *
In file included from include/linux/sysfs.h:15:
include/linux/kernfs.h:424:57: note: expected 'const char *' but argument is of type 'const unsigned char *'
424 | kernfs_find_and_get(struct kernfs_node *kn, const char *name)
| ~~~~~~~~~~~~^~~~
>> drivers/base/power/domain_governor.c:236: warning: cannot understand function prototype: 'struct dev_power_governor pm_domain_always_on_gov = '


vim +236 drivers/base/power/domain_governor.c

e59a8db8d9b7c0 Rafael J. Wysocki 2012-01-14 232
925b44a273aa8c Mark Brown 2011-12-08 233 /**
925b44a273aa8c Mark Brown 2011-12-08 234 * pm_genpd_gov_always_on - A governor implementing an always-on policy
925b44a273aa8c Mark Brown 2011-12-08 235 */
925b44a273aa8c Mark Brown 2011-12-08 @236 struct dev_power_governor pm_domain_always_on_gov = {

:::::: The code at line 236 was first introduced by commit
:::::: 925b44a273aa8c4c23c006c1228aacd538eead09 PM / Domains: Provide an always on power domain governor

:::::: TO: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
:::::: CC: Rafael J. Wysocki <rjw@xxxxxxx>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki