* [thomas-weissschuh:b4/b4-sysfs-const-bin_attr-cb 63/64] include/linux/sysfs.h:387:34: error: initialization of 'ssize_t (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, loff_t, size_t)' {aka 'int (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, long long int...
@ 2025-01-07 22:30 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-07 22:30 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/thomas.weissschuh/linux.git b4/b4-sysfs-const-bin_attr-cb
head: 1c76e0940bd2d02a30ddaf76ef5bcb648c3fffb1
commit: da56a14a657e9763156eeac71d74f3d73bcb11f5 [63/64] read/write
config: i386-buildonly-randconfig-002-20250108 (https://download.01.org/0day-ci/archive/20250108/202501080655.PRQU9F6E-lkp@intel.com/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/20250108/202501080655.PRQU9F6E-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501080655.PRQU9F6E-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/kobject.h:20,
from kernel/ksysfs.c:10:
>> include/linux/sysfs.h:387:34: error: initialization of 'ssize_t (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, loff_t, size_t)' {aka 'int (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, long long int, unsigned int)'} from incompatible pointer type 'ssize_t (*)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t, size_t)' {aka 'int (*)(struct file *, struct kobject *, struct bin_attribute *, char *, long long int, unsigned int)'} [-Werror=incompatible-pointer-types]
387 | __BIN_ATTR(_name, _mode, sysfs_bin_attr_simple_read, NULL, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:338:17: note: in definition of macro '__BIN_ATTR'
338 | .read = _read, \
| ^~~~~
include/linux/sysfs.h:390:41: note: in expansion of macro '__BIN_ATTR_SIMPLE_RO'
390 | struct bin_attribute bin_attr_##_name = __BIN_ATTR_SIMPLE_RO(_name, 0444)
| ^~~~~~~~~~~~~~~~~~~~
kernel/ksysfs.c:242:24: note: in expansion of macro 'BIN_ATTR_SIMPLE_RO'
242 | static __ro_after_init BIN_ATTR_SIMPLE_RO(notes);
| ^~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:387:34: note: (near initialization for 'bin_attr_notes.read')
387 | __BIN_ATTR(_name, _mode, sysfs_bin_attr_simple_read, NULL, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:338:17: note: in definition of macro '__BIN_ATTR'
338 | .read = _read, \
| ^~~~~
include/linux/sysfs.h:390:41: note: in expansion of macro '__BIN_ATTR_SIMPLE_RO'
390 | struct bin_attribute bin_attr_##_name = __BIN_ATTR_SIMPLE_RO(_name, 0444)
| ^~~~~~~~~~~~~~~~~~~~
kernel/ksysfs.c:242:24: note: in expansion of macro 'BIN_ATTR_SIMPLE_RO'
242 | static __ro_after_init BIN_ATTR_SIMPLE_RO(notes);
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/kobject.h:20,
from include/linux/module.h:21,
from kernel/kheaders.c:10:
>> include/linux/sysfs.h:387:34: error: initialization of 'ssize_t (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, loff_t, size_t)' {aka 'int (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, long long int, unsigned int)'} from incompatible pointer type 'ssize_t (*)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t, size_t)' {aka 'int (*)(struct file *, struct kobject *, struct bin_attribute *, char *, long long int, unsigned int)'} [-Werror=incompatible-pointer-types]
387 | __BIN_ATTR(_name, _mode, sysfs_bin_attr_simple_read, NULL, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:338:17: note: in definition of macro '__BIN_ATTR'
338 | .read = _read, \
| ^~~~~
kernel/kheaders.c:33:9: note: in expansion of macro '__BIN_ATTR_SIMPLE_RO'
33 | __BIN_ATTR_SIMPLE_RO(kheaders.tar.xz, 0444);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:387:34: note: (near initialization for 'kheaders_attr.read')
387 | __BIN_ATTR(_name, _mode, sysfs_bin_attr_simple_read, NULL, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:338:17: note: in definition of macro '__BIN_ATTR'
338 | .read = _read, \
| ^~~~~
kernel/kheaders.c:33:9: note: in expansion of macro '__BIN_ATTR_SIMPLE_RO'
33 | __BIN_ATTR_SIMPLE_RO(kheaders.tar.xz, 0444);
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
kernel/module/sysfs.c: In function 'add_notes_attrs':
>> kernel/module/sysfs.c:193:37: error: assignment to 'ssize_t (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, loff_t, size_t)' {aka 'int (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, long long int, unsigned int)'} from incompatible pointer type 'ssize_t (*)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t, size_t)' {aka 'int (*)(struct file *, struct kobject *, struct bin_attribute *, char *, long long int, unsigned int)'} [-Werror=incompatible-pointer-types]
193 | nattr->read = sysfs_bin_attr_simple_read;
| ^
cc1: some warnings being treated as errors
vim +387 include/linux/sysfs.h
9d6794feeb9090 Ira Weiny 2022-07-19 385
ae587a509903cc Thomas Weißschuh 2024-11-03 386 #define __BIN_ATTR_SIMPLE_RO(_name, _mode) \
ae587a509903cc Thomas Weißschuh 2024-11-03 @387 __BIN_ATTR(_name, _mode, sysfs_bin_attr_simple_read, NULL, 0)
d48c03198a92ed Lukas Wunner 2024-04-06 388
:::::: The code at line 387 was first introduced by commit
:::::: ae587a509903cca138e910445d8c21fe73b45c80 sysfs: implement all BIN_ATTR_* macros in terms of __BIN_ATTR()
:::::: TO: Thomas Weißschuh <linux@weissschuh.net>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-07 22:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 22:30 [thomas-weissschuh:b4/b4-sysfs-const-bin_attr-cb 63/64] include/linux/sysfs.h:387:34: error: initialization of 'ssize_t (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, loff_t, size_t)' {aka 'int (*)(struct file *, struct kobject *, const struct bin_attribute *, char *, long long int kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.