Hi Jeff,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on linux/master v5.14 next-20210910]
[cannot apply to ceph-client/for-linus gfs2/for-next nfs/linux-next asm-generic/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Jeff-Layton/locks-remove-LOCK_MA...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
e99f23c5bf59219d0cd9b6e0d7d4c1b641a98704
config: nios2-buildonly-randconfig-r006-20210910 (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/0day-ci/linux/commit/6ad4c7ee0637575ecc2f2acb3bf693d03...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Jeff-Layton/locks-remove-LOCK_MAND-flock-lock-support/20210911-042031
git checkout 6ad4c7ee0637575ecc2f2acb3bf693d033259c83
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
fs/locks.c: In function 'lock_get_status':
> fs/locks.c:2771:9: warning: ISO C90 forbids mixed declarations
and code [-Wdeclaration-after-statement]
2771 | int type = IS_LEASE(fl)
? target_leasetype(fl) : fl->fl_type;
| ^~~
vim +2771 fs/locks.c
7012b02a2b2c42 Jeff Layton 2013-06-21 2721
7f8ada98d9edd8 Pavel Emelyanov 2007-10-01 2722 static void lock_get_status(struct
seq_file *f, struct file_lock *fl,
b8da9b10e26cee Luo Longjun 2021-02-25 2723 loff_t id, char *pfx, int
repeat)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2724 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 2725 struct inode *inode = NULL;
ab1f16116527e4 Vitaliy Gusev 2008-01-17 2726 unsigned int fl_pid;
9d78edeaec759f Alexey Gladkov 2020-05-18 2727 struct pid_namespace *proc_pidns =
proc_pid_ns(file_inode(f->file)->i_sb);
d67fd44f697dff Nikolay Borisov 2016-08-17 2728
9d5b86ac13c573 Benjamin Coddington 2017-07-16 2729 fl_pid = locks_translate_pid(fl,
proc_pidns);
d67fd44f697dff Nikolay Borisov 2016-08-17 2730 /*
1cf8e5de4055f8 Konstantin Khorenko 2018-06-08 2731 * If lock owner is dead (and pid is
freed) or not visible in current
1cf8e5de4055f8 Konstantin Khorenko 2018-06-08 2732 * pidns, zero is shown as a pid
value. Check lock info from
1cf8e5de4055f8 Konstantin Khorenko 2018-06-08 2733 * init_pid_ns to get saved lock pid
value.
d67fd44f697dff Nikolay Borisov 2016-08-17 2734 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2735
^1da177e4c3f41 Linus Torvalds 2005-04-16 2736 if (fl->fl_file != NULL)
c568d68341be70 Miklos Szeredi 2016-09-16 2737 inode =
locks_inode(fl->fl_file);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2738
b8da9b10e26cee Luo Longjun 2021-02-25 2739 seq_printf(f, "%lld: ",
id);
b8da9b10e26cee Luo Longjun 2021-02-25 2740
b8da9b10e26cee Luo Longjun 2021-02-25 2741 if (repeat)
b8da9b10e26cee Luo Longjun 2021-02-25 2742 seq_printf(f, "%*s",
repeat - 1 + (int)strlen(pfx), pfx);
b8da9b10e26cee Luo Longjun 2021-02-25 2743
^1da177e4c3f41 Linus Torvalds 2005-04-16 2744 if (IS_POSIX(fl)) {
c918d42a27a9be Jeff Layton 2014-02-03 2745 if (fl->fl_flags &
FL_ACCESS)
5315c26a6c557f Fabian Frederick 2014-05-09 2746 seq_puts(f, "ACCESS");
cff2fce58b2b0f Jeff Layton 2014-04-22 2747 else if (IS_OFDLCK(fl))
5315c26a6c557f Fabian Frederick 2014-05-09 2748 seq_puts(f, "OFDLCK");
c918d42a27a9be Jeff Layton 2014-02-03 2749 else
5315c26a6c557f Fabian Frederick 2014-05-09 2750 seq_puts(f, "POSIX ");
c918d42a27a9be Jeff Layton 2014-02-03 2751
c918d42a27a9be Jeff Layton 2014-02-03 2752 seq_printf(f, " %s ",
f7e33bdbd6d1bd Jeff Layton 2021-08-19 2753 (inode == NULL) ?
"*NOINODE*" : "ADVISORY ");
^1da177e4c3f41 Linus Torvalds 2005-04-16 2754 } else if (IS_FLOCK(fl)) {
5315c26a6c557f Fabian Frederick 2014-05-09 2755 seq_puts(f, "FLOCK ADVISORY
");
^1da177e4c3f41 Linus Torvalds 2005-04-16 2756 } else if (IS_LEASE(fl)) {
8144f1f69943f4 Jeff Layton 2014-08-11 2757 if (fl->fl_flags &
FL_DELEG)
8144f1f69943f4 Jeff Layton 2014-08-11 2758 seq_puts(f, "DELEG ");
8144f1f69943f4 Jeff Layton 2014-08-11 2759 else
5315c26a6c557f Fabian Frederick 2014-05-09 2760 seq_puts(f, "LEASE ");
8144f1f69943f4 Jeff Layton 2014-08-11 2761
ab83fa4b49a54e J. Bruce Fields 2011-07-26 2762 if (lease_breaking(fl))
5315c26a6c557f Fabian Frederick 2014-05-09 2763 seq_puts(f, "BREAKING
");
^1da177e4c3f41 Linus Torvalds 2005-04-16 2764 else if (fl->fl_file)
5315c26a6c557f Fabian Frederick 2014-05-09 2765 seq_puts(f, "ACTIVE
");
^1da177e4c3f41 Linus Torvalds 2005-04-16 2766 else
5315c26a6c557f Fabian Frederick 2014-05-09 2767 seq_puts(f, "BREAKER
");
^1da177e4c3f41 Linus Torvalds 2005-04-16 2768 } else {
5315c26a6c557f Fabian Frederick 2014-05-09 2769 seq_puts(f, "UNKNOWN UNKNOWN
");
^1da177e4c3f41 Linus Torvalds 2005-04-16 2770 }
43e4cb942e88e7 Pavel Begunkov 2019-07-24 @2771 int type = IS_LEASE(fl) ?
target_leasetype(fl) : fl->fl_type;
43e4cb942e88e7 Pavel Begunkov 2019-07-24 2772
43e4cb942e88e7 Pavel Begunkov 2019-07-24 2773 seq_printf(f, "%s ", (type
== F_WRLCK) ? "WRITE" :
43e4cb942e88e7 Pavel Begunkov 2019-07-24 2774 (type == F_RDLCK) ?
"READ" : "UNLCK");
^1da177e4c3f41 Linus Torvalds 2005-04-16 2775 if (inode) {
3648888e90bb7f Jeff Layton 2015-04-03 2776 /* userspace relies on this
representation of dev_t */
98ca480a8f22fd Amir Goldstein 2019-12-22 2777 seq_printf(f, "%d
%02x:%02x:%lu ", fl_pid,
^1da177e4c3f41 Linus Torvalds 2005-04-16 2778 MAJOR(inode->i_sb->s_dev),
^1da177e4c3f41 Linus Torvalds 2005-04-16 2779 MINOR(inode->i_sb->s_dev),
inode->i_ino);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2780 } else {
ab1f16116527e4 Vitaliy Gusev 2008-01-17 2781 seq_printf(f, "%d
<none>:0 ", fl_pid);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2782 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2783 if (IS_POSIX(fl)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 2784 if (fl->fl_end == OFFSET_MAX)
7f8ada98d9edd8 Pavel Emelyanov 2007-10-01 2785 seq_printf(f, "%Ld
EOF\n", fl->fl_start);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2786 else
7f8ada98d9edd8 Pavel Emelyanov 2007-10-01 2787 seq_printf(f, "%Ld
%Ld\n", fl->fl_start, fl->fl_end);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2788 } else {
5315c26a6c557f Fabian Frederick 2014-05-09 2789 seq_puts(f, "0 EOF\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 2790 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2791 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2792
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org