tree:
https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
binderfs_new_mount_api
head: 5d31c6d544596d35ccd6b9d200bc350c8ac30870
commit: 5d31c6d544596d35ccd6b9d200bc350c8ac30870 [1/1] binderfs: port to new mount api
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.2.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 5d31c6d544596d35ccd6b9d200bc350c8ac30870
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/android/binderfs.c: In function 'binderfs_parse_param':
> drivers/android/binderfs.c:283:2: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
283 | int max_devices;
| ^~~
drivers/android/binderfs.c:283:6: warning: unused variable 'max_devices'
[-Wunused-variable]
283 | int max_devices;
| ^~~~~~~~~~~
drivers/android/binderfs.c: At top level:
> drivers/android/binderfs.c:348:15: error:
'binderfs_put_super' undeclared here (not in a function); did you mean
'binderfs_kill_super'?
348 | .put_super = binderfs_put_super,
| ^~~~~~~~~~~~~~~~~~
| binderfs_kill_super
> drivers/android/binderfs.c:739:3: error: 'const struct
fs_context_operations' has no member named 'free_fc'; did you mean
'free'?
739 | .free_fc = binderfs_free_fc,
| ^~~~~~~
| free
drivers/android/binderfs.c:333:13: warning: 'binderfs_kill_super' defined but
not used [-Wunused-function]
333 | static void binderfs_kill_super(struct super_block *sb)
| ^~~~~~~~~~~~~~~~~~~
vim +348 drivers/android/binderfs.c
265
266 /**
267 * binderfs_parse_param - parse binderfs mount options
268 */
269 static int binderfs_parse_param(struct fs_context *fc,
270 struct fs_parameter *param)
271 {
272 int opt;
273 struct binderfs_mount_opts *ctx = fc->fs_private;
274 struct fs_parse_result result;
275
276 ctx->max = BINDERFS_MAX_MINOR;
277 ctx->stats_mode = STATS_NONE;
278
279 opt = fs_parse(fc, binderfs_fs_parameters, param, &result);
280 if (opt < 0)
281 return opt;
282
283 int max_devices;
284
285 switch (opt) {
286 case Opt_max:
287 if (result.uint_32 > BINDERFS_MAX_MINOR)
288 return invalfc(fc, "Bad value for '%s'", param->key);
289
290 ctx->max = result.uint_32;
291 break;
292 case Opt_stats_mode:
293 if (strcmp(param->string, "global"))
294 return invalfc(fc, "Bad value for '%s'", param->key);
295
296 if (!capable(CAP_SYS_ADMIN))
297 return -EPERM;
298
299 ctx->stats_mode = STATS_GLOBAL;
300 break;
301 default:
302 return invalfc(fc, "Unsupported parameter '%s'",
param->key);
303 }
304
305 return 0;
306 }
307
308 static int binderfs_reconfigure(struct fs_context *fc)
309 {
310 struct binderfs_mount_opts *ctx = fc->fs_private;
311 struct binderfs_info *info = BINDERFS_SB(fc->root->d_sb);
312
313 if (info->mount_opts.stats_mode != ctx->stats_mode)
314 return invalfc(fc, "Binderfs stats mode cannot be changed during a
remount");
315
316 info->mount_opts.stats_mode = ctx->stats_mode;
317 return 0;
318 }
319
320 static int binderfs_show_options(struct seq_file *seq, struct dentry *root)
321 {
322 struct binderfs_info *info;
323
324 info = BINDERFS_SB(root->d_sb);
325 if (info->mount_opts.max <= BINDERFS_MAX_MINOR)
326 seq_printf(seq, ",max=%d", info->mount_opts.max);
327 if (info->mount_opts.stats_mode == STATS_GLOBAL)
328 seq_printf(seq, ",stats=global");
329
330 return 0;
331 }
332
333 static void binderfs_kill_super(struct super_block *sb)
334 {
335 struct binderfs_info *info = sb->s_fs_info;
336
337 if (info && info->ipc_ns)
338 put_ipc_ns(info->ipc_ns);
339
340 kfree(info);
341 sb->s_fs_info = NULL;
342 }
343
344 static const struct super_operations binderfs_super_ops = {
345 .evict_inode = binderfs_evict_inode,
346 .show_options = binderfs_show_options,
347 .statfs = simple_statfs,
348 .put_super = binderfs_put_super,
349 };
350
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org