Re: [PATCH DRAFT 1/4] : tracefs: port to kernfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Christian,

kernel test robot noticed the following build errors:

[auto build test ERROR on 41bccc98fb7931d63d03f326a746ac4d429c1dd3]

url:    https://github.com/intel-lab-lkp/linux/commits/Christian-Brauner/tracefs-port-to-kernfs/20240131-214120
base:   41bccc98fb7931d63d03f326a746ac4d429c1dd3
patch link:    https://lore.kernel.org/r/20240131-tracefs-kernfs-v1-1-f20e2e9a8d61%40kernel.org
patch subject: [PATCH DRAFT 1/4] : tracefs: port to kernfs
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20240201/202402010828.cl2RunjG-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/20240201/202402010828.cl2RunjG-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/202402010828.cl2RunjG-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   fs/kernfs/mount.c: In function 'kernfs_node_owner':
>> fs/kernfs/mount.c:248:20: error: 'struct kernfs_node' has no member named 'iattrs'; did you mean 'iattr'?
     248 |         return kn->iattrs->ia_uid;
         |                    ^~~~~~
         |                    iattr
   fs/kernfs/mount.c: At top level:
>> fs/kernfs/mount.c:251:8: error: conflicting types for 'kernfs_node_group'; have 'kuid_t(struct kernfs_node *)'
     251 | kuid_t kernfs_node_group(struct kernfs_node *kn)
         |        ^~~~~~~~~~~~~~~~~
   In file included from fs/kernfs/kernfs-internal.h:19,
                    from fs/kernfs/mount.c:22:
   include/linux/kernfs.h:248:8: note: previous declaration of 'kernfs_node_group' with type 'kgid_t(struct kernfs_node *)'
     248 | kgid_t kernfs_node_group(struct kernfs_node *kn);
         |        ^~~~~~~~~~~~~~~~~
   fs/kernfs/mount.c: In function 'kernfs_node_group':
   fs/kernfs/mount.c:253:20: error: 'struct kernfs_node' has no member named 'iattrs'; did you mean 'iattr'?
     253 |         return kn->iattrs->ia_gid;
         |                    ^~~~~~
         |                    iattr
   fs/kernfs/mount.c: In function 'kernfs_node_owner':
   fs/kernfs/mount.c:249:1: warning: control reaches end of non-void function [-Wreturn-type]
     249 | }
         | ^
   fs/kernfs/mount.c: In function 'kernfs_node_group':
   fs/kernfs/mount.c:254:1: warning: control reaches end of non-void function [-Wreturn-type]
     254 | }
         | ^
--
   kernel/trace/trace.c: In function 'tracing_dentry_percpu':
>> kernel/trace/trace.c:8916:56: error: passing argument 2 of 'tracefs_create_dir' from incompatible pointer type [-Werror=incompatible-pointer-types]
    8916 |         tr->percpu_dir = tracefs_create_dir("per_cpu", d_tracer);
         |                                                        ^~~~~~~~
         |                                                        |
         |                                                        struct dentry *
   In file included from kernel/trace/trace.c:24:
   include/linux/tracefs.h:97:60: note: expected 'struct kernfs_node *' but argument is of type 'struct dentry *'
      97 |                                        struct kernfs_node *parent);
         |                                        ~~~~~~~~~~~~~~~~~~~~^~~~~~
>> kernel/trace/trace.c:8916:24: error: assignment to 'struct dentry *' from incompatible pointer type 'struct kernfs_node *' [-Werror=incompatible-pointer-types]
    8916 |         tr->percpu_dir = tracefs_create_dir("per_cpu", d_tracer);
         |                        ^
   kernel/trace/trace.c: In function 'tracing_init_tracefs_percpu':
   kernel/trace/trace.c:8946:45: error: passing argument 2 of 'tracefs_create_dir' from incompatible pointer type [-Werror=incompatible-pointer-types]
    8946 |         d_cpu = tracefs_create_dir(cpu_dir, d_percpu);
         |                                             ^~~~~~~~
         |                                             |
         |                                             struct dentry *
   include/linux/tracefs.h:97:60: note: expected 'struct kernfs_node *' but argument is of type 'struct dentry *'
      97 |                                        struct kernfs_node *parent);
         |                                        ~~~~~~~~~~~~~~~~~~~~^~~~~~
   kernel/trace/trace.c:8946:15: error: assignment to 'struct dentry *' from incompatible pointer type 'struct kernfs_node *' [-Werror=incompatible-pointer-types]
    8946 |         d_cpu = tracefs_create_dir(cpu_dir, d_percpu);
         |               ^
   kernel/trace/trace.c: In function 'trace_create_file':
>> kernel/trace/trace.c:9156:47: error: passing argument 3 of 'tracefs_create_file' from incompatible pointer type [-Werror=incompatible-pointer-types]
    9156 |         ret = tracefs_create_file(name, mode, parent, data, fops);
         |                                               ^~~~~~
         |                                               |
         |                                               struct dentry *
   include/linux/tracefs.h:93:61: note: expected 'struct kernfs_node *' but argument is of type 'struct dentry *'
      93 |                                         struct kernfs_node *parent, void *data,
         |                                         ~~~~~~~~~~~~~~~~~~~~^~~~~~
   kernel/trace/trace.c:9156:61: error: passing argument 5 of 'tracefs_create_file' from incompatible pointer type [-Werror=incompatible-pointer-types]
    9156 |         ret = tracefs_create_file(name, mode, parent, data, fops);
         |                                                             ^~~~
         |                                                             |
         |                                                             const struct file_operations *
   include/linux/tracefs.h:94:66: note: expected 'const struct kernfs_ops *' but argument is of type 'const struct file_operations *'
      94 |                                         const struct kernfs_ops *ops);
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   kernel/trace/trace.c:9156:13: error: assignment to 'struct dentry *' from incompatible pointer type 'struct kernfs_node *' [-Werror=incompatible-pointer-types]
    9156 |         ret = tracefs_create_file(name, mode, parent, data, fops);
         |             ^
   kernel/trace/trace.c: In function 'trace_options_init_dentry':
   kernel/trace/trace.c:9175:53: error: passing argument 2 of 'tracefs_create_dir' from incompatible pointer type [-Werror=incompatible-pointer-types]
    9175 |         tr->options = tracefs_create_dir("options", d_tracer);
         |                                                     ^~~~~~~~
         |                                                     |
         |                                                     struct dentry *
   include/linux/tracefs.h:97:60: note: expected 'struct kernfs_node *' but argument is of type 'struct dentry *'
      97 |                                        struct kernfs_node *parent);
         |                                        ~~~~~~~~~~~~~~~~~~~~^~~~~~
   kernel/trace/trace.c:9175:21: error: assignment to 'struct dentry *' from incompatible pointer type 'struct kernfs_node *' [-Werror=incompatible-pointer-types]
    9175 |         tr->options = tracefs_create_dir("options", d_tracer);
         |                     ^
   kernel/trace/trace.c: In function 'trace_array_create_dir':
   kernel/trace/trace.c:9631:17: error: assignment to 'struct dentry *' from incompatible pointer type 'struct kernfs_node *' [-Werror=incompatible-pointer-types]
    9631 |         tr->dir = tracefs_create_dir(tr->name, trace_instance_dir);
         |                 ^
>> kernel/trace/trace.c:9637:34: error: passing argument 1 of 'tracefs_remove' from incompatible pointer type [-Werror=incompatible-pointer-types]
    9637 |                 tracefs_remove(tr->dir);
         |                                ~~^~~~~
         |                                  |
         |                                  struct dentry *
   include/linux/tracefs.h:99:41: note: expected 'struct kernfs_node *' but argument is of type 'struct dentry *'
      99 | void tracefs_remove(struct kernfs_node *kn);
         |                     ~~~~~~~~~~~~~~~~~~~~^~
   kernel/trace/trace.c: In function '__remove_instance':
   kernel/trace/trace.c:9818:26: error: passing argument 1 of 'tracefs_remove' from incompatible pointer type [-Werror=incompatible-pointer-types]
    9818 |         tracefs_remove(tr->dir);
         |                        ~~^~~~~
         |                          |
         |                          struct dentry *
   include/linux/tracefs.h:99:41: note: expected 'struct kernfs_node *' but argument is of type 'struct dentry *'
      99 | void tracefs_remove(struct kernfs_node *kn);
         |                     ~~~~~~~~~~~~~~~~~~~~^~
   cc1: some warnings being treated as errors
--
   kernel/trace/trace_stat.c: In function 'destroy_session':
>> kernel/trace/trace_stat.c:69:31: error: passing argument 1 of 'tracefs_remove' from incompatible pointer type [-Werror=incompatible-pointer-types]
      69 |         tracefs_remove(session->file);
         |                        ~~~~~~~^~~~~~
         |                               |
         |                               struct dentry *
   In file included from kernel/trace/trace_stat.c:16:
   include/linux/tracefs.h:99:41: note: expected 'struct kernfs_node *' but argument is of type 'struct dentry *'
      99 | void tracefs_remove(struct kernfs_node *kn);
         |                     ~~~~~~~~~~~~~~~~~~~~^~
   kernel/trace/trace_stat.c: In function 'tracing_stat_init':
>> kernel/trace/trace_stat.c:285:18: error: assignment to 'struct dentry *' from incompatible pointer type 'struct kernfs_node *' [-Werror=incompatible-pointer-types]
     285 |         stat_dir = tracefs_create_dir("trace_stat", NULL);
         |                  ^
   kernel/trace/trace_stat.c: In function 'init_stat_file':
>> kernel/trace/trace_stat.c:301:45: error: passing argument 3 of 'tracefs_create_file' from incompatible pointer type [-Werror=incompatible-pointer-types]
     301 |                                             stat_dir, session,
         |                                             ^~~~~~~~
         |                                             |
         |                                             struct dentry *
   include/linux/tracefs.h:93:61: note: expected 'struct kernfs_node *' but argument is of type 'struct dentry *'
      93 |                                         struct kernfs_node *parent, void *data,
         |                                         ~~~~~~~~~~~~~~~~~~~~^~~~~~
   kernel/trace/trace_stat.c:302:45: error: passing argument 5 of 'tracefs_create_file' from incompatible pointer type [-Werror=incompatible-pointer-types]
     302 |                                             &tracing_stat_fops);
         |                                             ^~~~~~~~~~~~~~~~~~
         |                                             |
         |                                             const struct file_operations *
   include/linux/tracefs.h:94:66: note: expected 'const struct kernfs_ops *' but argument is of type 'const struct file_operations *'
      94 |                                         const struct kernfs_ops *ops);
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   kernel/trace/trace_stat.c:300:23: error: assignment to 'struct dentry *' from incompatible pointer type 'struct kernfs_node *' [-Werror=incompatible-pointer-types]
     300 |         session->file = tracefs_create_file(session->ts->name, TRACE_MODE_WRITE,
         |                       ^
   cc1: some warnings being treated as errors
--
   kernel/trace/trace_events_synth.c: In function 'trace_events_synth_init':
>> kernel/trace/trace_events_synth.c:2322:49: error: passing argument 5 of 'tracefs_create_file' from incompatible pointer type [-Werror=incompatible-pointer-types]
    2322 |                                     NULL, NULL, &synth_events_fops);
         |                                                 ^~~~~~~~~~~~~~~~~~
         |                                                 |
         |                                                 const struct file_operations *
   In file included from kernel/trace/trace_events_synth.c:15:
   include/linux/tracefs.h:94:66: note: expected 'const struct kernfs_ops *' but argument is of type 'const struct file_operations *'
      94 |                                         const struct kernfs_ops *ops);
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   kernel/trace/trace_events_synth.c:2321:15: error: assignment to 'struct dentry *' from incompatible pointer type 'struct kernfs_node *' [-Werror=incompatible-pointer-types]
    2321 |         entry = tracefs_create_file("synthetic_events", TRACE_MODE_WRITE,
         |               ^
   cc1: some warnings being treated as errors


vim +248 fs/kernfs/mount.c

   245	
   246	kuid_t kernfs_node_owner(struct kernfs_node *kn)
   247	{
 > 248		return kn->iattrs->ia_uid;
   249	}
   250	
 > 251	kuid_t kernfs_node_group(struct kernfs_node *kn)
   252	{
   253		return kn->iattrs->ia_gid;
   254	}
   255	

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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux