All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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...
Date: Wed, 8 Jan 2025 06:30:47 +0800	[thread overview]
Message-ID: <202501080655.PRQU9F6E-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-01-07 22:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202501080655.PRQU9F6E-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux@weissschuh.net \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.