linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [mcgrof-next:20210813-sysfs-fixes-v8 7/10] arch/x86/kernel/cpu/resctrl/rdtgroup.c:212:13: warning: passing argument 7 of '__kernfs_create_file' makes integer from pointer without a cast
@ 2021-08-14 12:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-14 12:06 UTC (permalink / raw)
  To: Luis Chamberlain; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 14779 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20210813-sysfs-fixes-v8
head:   f5b8aadeca76656caad8bccc795bfe7b0730230a
commit: da898d13309d7b2855a74ee4e49e0fb43a55a2f1 [7/10] sysfs: fix deadlock race with module removal
config: i386-randconfig-c001-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/commit/?id=da898d13309d7b2855a74ee4e49e0fb43a55a2f1
        git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
        git fetch --no-tags mcgrof-next 20210813-sysfs-fixes-v8
        git checkout da898d13309d7b2855a74ee4e49e0fb43a55a2f1
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/ipc.h:6,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   arch/x86/kernel/cpu/resctrl/rdtgroup.c: In function 'rdtgroup_add_file':
   include/linux/uidgid.h:30:35: error: incompatible type for argument 4 of '__kernfs_create_file'
      30 | #define KUIDT_INIT(value) (kuid_t){ value }
         |                                   ^~~~~~~~~
         |                                   |
         |                                   kuid_t {aka struct <anonymous>}
   include/linux/uidgid.h:55:25: note: in expansion of macro 'KUIDT_INIT'
      55 | #define GLOBAL_ROOT_UID KUIDT_INIT(0)
         |                         ^~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:211:7: note: in expansion of macro 'GLOBAL_ROOT_UID'
     211 |       GLOBAL_ROOT_UID, GLOBAL_ROOT_GID,
         |       ^~~~~~~~~~~~~~~
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'struct module *' but argument is of type 'kuid_t' {aka 'struct <anonymous>'}
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/ipc.h:6,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/uidgid.h:31:35: error: incompatible type for argument 5 of '__kernfs_create_file'
      31 | #define KGIDT_INIT(value) (kgid_t){ value }
         |                                   ^~~~~~~~~
         |                                   |
         |                                   kgid_t {aka struct <anonymous>}
   include/linux/uidgid.h:56:25: note: in expansion of macro 'KGIDT_INIT'
      56 | #define GLOBAL_ROOT_GID KGIDT_INIT(0)
         |                         ^~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:211:24: note: in expansion of macro 'GLOBAL_ROOT_GID'
     211 |       GLOBAL_ROOT_UID, GLOBAL_ROOT_GID,
         |                        ^~~~~~~~~~~~~~~
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'kuid_t' {aka 'struct <anonymous>'} but argument is of type 'kgid_t' {aka 'struct <anonymous>'}
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:212:7: error: incompatible type for argument 6 of '__kernfs_create_file'
     212 |       0, rft->kf_ops, rft, NULL, NULL);
         |       ^
         |       |
         |       int
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'kgid_t' {aka 'struct <anonymous>'} but argument is of type 'int'
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/cpu/resctrl/rdtgroup.c:212:13: warning: passing argument 7 of '__kernfs_create_file' makes integer from pointer without a cast [-Wint-conversion]
     212 |       0, rft->kf_ops, rft, NULL, NULL);
         |          ~~~^~~~~~~~
         |             |
         |             const struct kernfs_ops *
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'loff_t' {aka 'long long int'} but argument is of type 'const struct kernfs_ops *'
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:212:23: error: passing argument 8 of '__kernfs_create_file' from incompatible pointer type [-Werror=incompatible-pointer-types]
     212 |       0, rft->kf_ops, rft, NULL, NULL);
         |                       ^~~
         |                       |
         |                       struct rftype *
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'const struct kernfs_ops *' but argument is of type 'struct rftype *'
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:210:7: error: too few arguments to function '__kernfs_create_file'
     210 |  kn = __kernfs_create_file(parent_kn, rft->name, rft->mode,
         |       ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: declared here
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/ipc.h:6,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   arch/x86/kernel/cpu/resctrl/rdtgroup.c: In function 'mon_addfile':
   include/linux/uidgid.h:30:35: error: incompatible type for argument 4 of '__kernfs_create_file'
      30 | #define KUIDT_INIT(value) (kuid_t){ value }
         |                                   ^~~~~~~~~
         |                                   |
         |                                   kuid_t {aka struct <anonymous>}
   include/linux/uidgid.h:55:25: note: in expansion of macro 'KUIDT_INIT'
      55 | #define GLOBAL_ROOT_UID KUIDT_INIT(0)
         |                         ^~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:2484:7: note: in expansion of macro 'GLOBAL_ROOT_UID'
    2484 |       GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, 0,
         |       ^~~~~~~~~~~~~~~
   In file included from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/energy_model.h:7,
                    from include/linux/device.h:16,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/kernfs.h:382:21: note: expected 'struct module *' but argument is of type 'kuid_t' {aka 'struct <anonymous>'}
     382 | struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
         |                     ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/ipc.h:6,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from include/linux/cacheinfo.h:6,
                    from arch/x86/kernel/cpu/resctrl/rdtgroup.c:15:
   include/linux/uidgid.h:31:35: error: incompatible type for argument 5 of '__kernfs_create_file'
      31 | #define KGIDT_INIT(value) (kgid_t){ value }
         |                                   ^~~~~~~~~
         |                                   |
         |                                   kgid_t {aka struct <anonymous>}
   include/linux/uidgid.h:56:25: note: in expansion of macro 'KGIDT_INIT'
      56 | #define GLOBAL_ROOT_GID KGIDT_INIT(0)
         |                         ^~~~~~~~~~
   arch/x86/kernel/cpu/resctrl/rdtgroup.c:2484:24: note: in expansion of macro 'GLOBAL_ROOT_GID'
    2484 |       GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, 0,


vim +/__kernfs_create_file +212 arch/x86/kernel/cpu/resctrl/rdtgroup.c

4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  204  
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  205  static int rdtgroup_add_file(struct kernfs_node *parent_kn, struct rftype *rft)
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  206  {
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  207  	struct kernfs_node *kn;
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  208  	int ret;
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  209  
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  210  	kn = __kernfs_create_file(parent_kn, rft->name, rft->mode,
488dee96bb62f0 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Dmitry Torokhov 2018-07-20  211  				  GLOBAL_ROOT_UID, GLOBAL_ROOT_GID,
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28 @212  				  0, rft->kf_ops, rft, NULL, NULL);
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  213  	if (IS_ERR(kn))
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  214  		return PTR_ERR(kn);
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  215  
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  216  	ret = rdtgroup_kn_set_ugid(kn);
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  217  	if (ret) {
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  218  		kernfs_remove(kn);
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  219  		return ret;
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  220  	}
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  221  
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  222  	return 0;
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  223  }
4e978d06dedb82 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c Fenghua Yu      2016-10-28  224  

:::::: The code at line 212 was first introduced by commit
:::::: 4e978d06dedb8207b298a5a8a49fce4b2ab80d12 x86/intel_rdt: Add "info" files to resctrl file system

:::::: TO: Fenghua Yu <fenghua.yu@intel.com>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32478 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-14 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 12:06 [mcgrof-next:20210813-sysfs-fixes-v8 7/10] arch/x86/kernel/cpu/resctrl/rdtgroup.c:212:13: warning: passing argument 7 of '__kernfs_create_file' makes integer from pointer without a cast kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).