All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kbuild-all@lists.01.org, linux-xfs@vger.kernel.org,
	"Darrick J. Wong" <darrick.wong@oracle.com>
Subject: [xfs-linux:xfs-5.5-merge 70/72] fs/compat_ioctl.c:1084:25: error: 'cmd' undeclared here (not in a function); did you mean 'cma'?
Date: Tue, 29 Oct 2019 05:22:48 +0800	[thread overview]
Message-ID: <201910290545.EnIGT2Co%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git xfs-5.5-merge
head:   da1faf13deb0109fb40ad2f4e93e680b34898b18
commit: d5e20bfa0b77b44cff86afe65fda85e3eb6b3582 [70/72] fs: add generic UNRESVSP and ZERO_RANGE ioctl handlers
config: s390-debug_defconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 7.4.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 d5e20bfa0b77b44cff86afe65fda85e3eb6b3582
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=s390 

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

All errors (new ones prefixed by >>):

   fs/compat_ioctl.c: In function '__do_compat_sys_ioctl':
   fs/compat_ioctl.c:1056:2: error: case label not within a switch statement
     case FICLONE:
     ^~~~
   fs/compat_ioctl.c:1057:2: error: case label not within a switch statement
     case FICLONERANGE:
     ^~~~
   fs/compat_ioctl.c:1058:2: error: case label not within a switch statement
     case FIDEDUPERANGE:
     ^~~~
   fs/compat_ioctl.c:1059:2: error: case label not within a switch statement
     case FS_IOC_FIEMAP:
     ^~~~
   fs/compat_ioctl.c:1062:2: error: case label not within a switch statement
     case FIBMAP:
     ^~~~
   fs/compat_ioctl.c:1063:2: error: case label not within a switch statement
     case FIGETBSZ:
     ^~~~
   fs/compat_ioctl.c:1064:2: error: case label not within a switch statement
     case FIONREAD:
     ^~~~
   fs/compat_ioctl.c:1066:4: error: break statement not within loop or switch
       break;
       ^~~~~
   fs/compat_ioctl.c:1069:2: error: 'default' label not within a switch statement
     default:
     ^~~~~~~
   fs/compat_ioctl.c:1078:3: error: break statement not within loop or switch
      break;
      ^~~~~
   fs/compat_ioctl.c:1077:4: error: label 'do_ioctl' used but not defined
       goto do_ioctl;
       ^~~~
   fs/compat_ioctl.c:1073:5: error: label 'out_fput' used but not defined
        goto out_fput;
        ^~~~
   fs/compat_ioctl.c:1005:3: error: label 'out' used but not defined
      goto out;
      ^~~~
   fs/compat_ioctl.c:1079:2: warning: no return statement in function returning non-void [-Wreturn-type]
     }
     ^
   fs/compat_ioctl.c: At top level:
   fs/compat_ioctl.c:1081:2: error: expected identifier or '(' before 'if'
     if (compat_ioctl_check_table(XFORM(cmd)))
     ^~
   fs/compat_ioctl.c:1084:2: warning: data definition has no type or storage class
     error = do_ioctl_trans(cmd, arg, f.file);
     ^~~~~
   fs/compat_ioctl.c:1084:2: error: type defaults to 'int' in declaration of 'error' [-Werror=implicit-int]
>> fs/compat_ioctl.c:1084:25: error: 'cmd' undeclared here (not in a function); did you mean 'cma'?
     error = do_ioctl_trans(cmd, arg, f.file);
                            ^~~
                            cma
   fs/compat_ioctl.c:1084:30: error: 'arg' undeclared here (not in a function)
     error = do_ioctl_trans(cmd, arg, f.file);
                                 ^~~
   fs/compat_ioctl.c:1084:35: error: 'f' undeclared here (not in a function); did you mean 'fd'?
     error = do_ioctl_trans(cmd, arg, f.file);
                                      ^
                                      fd
   fs/compat_ioctl.c:1085:2: error: expected identifier or '(' before 'if'
     if (error == -ENOIOCTLCMD)
     ^~
   fs/compat_ioctl.c:1088:2: error: expected identifier or '(' before 'goto'
     goto out_fput;
     ^~~~
   fs/compat_ioctl.c:1090:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     found_handler:
                  ^
   fs/compat_ioctl.c:1092:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     do_ioctl:
             ^
   fs/compat_ioctl.c:1094:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     out_fput:
             ^
   fs/compat_ioctl.c:1096:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     out:
        ^
   fs/compat_ioctl.c:1098:1: error: expected identifier or '(' before '}' token
    }
    ^
   fs/compat_ioctl.c:976:12: warning: 'compat_ioctl_check_table' defined but not used [-Wunused-function]
    static int compat_ioctl_check_table(unsigned int xcmd)
               ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +1084 fs/compat_ioctl.c

3e63cbb1efca7d Ankit Jain        2009-06-19  1055  
d79bdd52d8be70 Darrick J. Wong   2015-12-19  1056  	case FICLONE:
d79bdd52d8be70 Darrick J. Wong   2015-12-19  1057  	case FICLONERANGE:
54dbc151723756 Darrick J. Wong   2015-12-19  1058  	case FIDEDUPERANGE:
ceac204e1da942 Josef Bacik       2017-09-29  1059  	case FS_IOC_FIEMAP:
d79bdd52d8be70 Darrick J. Wong   2015-12-19  1060  		goto do_ioctl;
d79bdd52d8be70 Darrick J. Wong   2015-12-19  1061  
6272e2667965df Christoph Hellwig 2007-05-08  1062  	case FIBMAP:
6272e2667965df Christoph Hellwig 2007-05-08  1063  	case FIGETBSZ:
6272e2667965df Christoph Hellwig 2007-05-08  1064  	case FIONREAD:
496ad9aa8ef448 Al Viro           2013-01-23  1065  		if (S_ISREG(file_inode(f.file)->i_mode))
6272e2667965df Christoph Hellwig 2007-05-08  1066  			break;
6272e2667965df Christoph Hellwig 2007-05-08  1067  		/*FALL THROUGH*/
6272e2667965df Christoph Hellwig 2007-05-08  1068  
6272e2667965df Christoph Hellwig 2007-05-08  1069  	default:
72c2d531920048 Al Viro           2013-09-22  1070  		if (f.file->f_op->compat_ioctl) {
2903ff019b346a Al Viro           2012-08-28  1071  			error = f.file->f_op->compat_ioctl(f.file, cmd, arg);
6272e2667965df Christoph Hellwig 2007-05-08  1072  			if (error != -ENOIOCTLCMD)
6272e2667965df Christoph Hellwig 2007-05-08  1073  				goto out_fput;
6272e2667965df Christoph Hellwig 2007-05-08  1074  		}
6272e2667965df Christoph Hellwig 2007-05-08  1075  
72c2d531920048 Al Viro           2013-09-22  1076  		if (!f.file->f_op->unlocked_ioctl)
6272e2667965df Christoph Hellwig 2007-05-08  1077  			goto do_ioctl;
6272e2667965df Christoph Hellwig 2007-05-08  1078  		break;
6272e2667965df Christoph Hellwig 2007-05-08  1079  	}
6272e2667965df Christoph Hellwig 2007-05-08  1080  
661f627da98c06 Arnd Bergmann     2009-11-05 @1081  	if (compat_ioctl_check_table(XFORM(cmd)))
6272e2667965df Christoph Hellwig 2007-05-08  1082  		goto found_handler;
6272e2667965df Christoph Hellwig 2007-05-08  1083  
66cf191f3eae45 Al Viro           2016-01-07 @1084  	error = do_ioctl_trans(cmd, arg, f.file);
07d106d0a33d60 Linus Torvalds    2012-01-05  1085  	if (error == -ENOIOCTLCMD)
07d106d0a33d60 Linus Torvalds    2012-01-05  1086  		error = -ENOTTY;
6272e2667965df Christoph Hellwig 2007-05-08  1087  
6272e2667965df Christoph Hellwig 2007-05-08  1088  	goto out_fput;
6272e2667965df Christoph Hellwig 2007-05-08  1089  
6272e2667965df Christoph Hellwig 2007-05-08  1090   found_handler:
789f0f89118a80 Arnd Bergmann     2009-11-05  1091  	arg = (unsigned long)compat_ptr(arg);
6272e2667965df Christoph Hellwig 2007-05-08  1092   do_ioctl:
2903ff019b346a Al Viro           2012-08-28  1093  	error = do_vfs_ioctl(f.file, fd, cmd, arg);
6272e2667965df Christoph Hellwig 2007-05-08  1094   out_fput:
2903ff019b346a Al Viro           2012-08-28  1095  	fdput(f);
6272e2667965df Christoph Hellwig 2007-05-08  1096   out:
6272e2667965df Christoph Hellwig 2007-05-08  1097  	return error;
6272e2667965df Christoph Hellwig 2007-05-08  1098  }
6272e2667965df Christoph Hellwig 2007-05-08  1099  

:::::: The code at line 1084 was first introduced by commit
:::::: 66cf191f3eae4582a83cb4251b75b43bee95a999 compat_ioctl: don't pass fd around when not needed

:::::: TO: Al Viro <viro@zeniv.linux.org.uk>
:::::: CC: Al Viro <viro@zeniv.linux.org.uk>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [xfs-linux:xfs-5.5-merge 70/72] fs/compat_ioctl.c:1084:25: error: 'cmd' undeclared here (not in a function); did you mean 'cma'?
Date: Tue, 29 Oct 2019 05:22:48 +0800	[thread overview]
Message-ID: <201910290545.EnIGT2Co%lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git xfs-5.5-merge
head:   da1faf13deb0109fb40ad2f4e93e680b34898b18
commit: d5e20bfa0b77b44cff86afe65fda85e3eb6b3582 [70/72] fs: add generic UNRESVSP and ZERO_RANGE ioctl handlers
config: s390-debug_defconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 7.4.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 d5e20bfa0b77b44cff86afe65fda85e3eb6b3582
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=s390 

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

All errors (new ones prefixed by >>):

   fs/compat_ioctl.c: In function '__do_compat_sys_ioctl':
   fs/compat_ioctl.c:1056:2: error: case label not within a switch statement
     case FICLONE:
     ^~~~
   fs/compat_ioctl.c:1057:2: error: case label not within a switch statement
     case FICLONERANGE:
     ^~~~
   fs/compat_ioctl.c:1058:2: error: case label not within a switch statement
     case FIDEDUPERANGE:
     ^~~~
   fs/compat_ioctl.c:1059:2: error: case label not within a switch statement
     case FS_IOC_FIEMAP:
     ^~~~
   fs/compat_ioctl.c:1062:2: error: case label not within a switch statement
     case FIBMAP:
     ^~~~
   fs/compat_ioctl.c:1063:2: error: case label not within a switch statement
     case FIGETBSZ:
     ^~~~
   fs/compat_ioctl.c:1064:2: error: case label not within a switch statement
     case FIONREAD:
     ^~~~
   fs/compat_ioctl.c:1066:4: error: break statement not within loop or switch
       break;
       ^~~~~
   fs/compat_ioctl.c:1069:2: error: 'default' label not within a switch statement
     default:
     ^~~~~~~
   fs/compat_ioctl.c:1078:3: error: break statement not within loop or switch
      break;
      ^~~~~
   fs/compat_ioctl.c:1077:4: error: label 'do_ioctl' used but not defined
       goto do_ioctl;
       ^~~~
   fs/compat_ioctl.c:1073:5: error: label 'out_fput' used but not defined
        goto out_fput;
        ^~~~
   fs/compat_ioctl.c:1005:3: error: label 'out' used but not defined
      goto out;
      ^~~~
   fs/compat_ioctl.c:1079:2: warning: no return statement in function returning non-void [-Wreturn-type]
     }
     ^
   fs/compat_ioctl.c: At top level:
   fs/compat_ioctl.c:1081:2: error: expected identifier or '(' before 'if'
     if (compat_ioctl_check_table(XFORM(cmd)))
     ^~
   fs/compat_ioctl.c:1084:2: warning: data definition has no type or storage class
     error = do_ioctl_trans(cmd, arg, f.file);
     ^~~~~
   fs/compat_ioctl.c:1084:2: error: type defaults to 'int' in declaration of 'error' [-Werror=implicit-int]
>> fs/compat_ioctl.c:1084:25: error: 'cmd' undeclared here (not in a function); did you mean 'cma'?
     error = do_ioctl_trans(cmd, arg, f.file);
                            ^~~
                            cma
   fs/compat_ioctl.c:1084:30: error: 'arg' undeclared here (not in a function)
     error = do_ioctl_trans(cmd, arg, f.file);
                                 ^~~
   fs/compat_ioctl.c:1084:35: error: 'f' undeclared here (not in a function); did you mean 'fd'?
     error = do_ioctl_trans(cmd, arg, f.file);
                                      ^
                                      fd
   fs/compat_ioctl.c:1085:2: error: expected identifier or '(' before 'if'
     if (error == -ENOIOCTLCMD)
     ^~
   fs/compat_ioctl.c:1088:2: error: expected identifier or '(' before 'goto'
     goto out_fput;
     ^~~~
   fs/compat_ioctl.c:1090:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     found_handler:
                  ^
   fs/compat_ioctl.c:1092:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     do_ioctl:
             ^
   fs/compat_ioctl.c:1094:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     out_fput:
             ^
   fs/compat_ioctl.c:1096:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
     out:
        ^
   fs/compat_ioctl.c:1098:1: error: expected identifier or '(' before '}' token
    }
    ^
   fs/compat_ioctl.c:976:12: warning: 'compat_ioctl_check_table' defined but not used [-Wunused-function]
    static int compat_ioctl_check_table(unsigned int xcmd)
               ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +1084 fs/compat_ioctl.c

3e63cbb1efca7d Ankit Jain        2009-06-19  1055  
d79bdd52d8be70 Darrick J. Wong   2015-12-19  1056  	case FICLONE:
d79bdd52d8be70 Darrick J. Wong   2015-12-19  1057  	case FICLONERANGE:
54dbc151723756 Darrick J. Wong   2015-12-19  1058  	case FIDEDUPERANGE:
ceac204e1da942 Josef Bacik       2017-09-29  1059  	case FS_IOC_FIEMAP:
d79bdd52d8be70 Darrick J. Wong   2015-12-19  1060  		goto do_ioctl;
d79bdd52d8be70 Darrick J. Wong   2015-12-19  1061  
6272e2667965df Christoph Hellwig 2007-05-08  1062  	case FIBMAP:
6272e2667965df Christoph Hellwig 2007-05-08  1063  	case FIGETBSZ:
6272e2667965df Christoph Hellwig 2007-05-08  1064  	case FIONREAD:
496ad9aa8ef448 Al Viro           2013-01-23  1065  		if (S_ISREG(file_inode(f.file)->i_mode))
6272e2667965df Christoph Hellwig 2007-05-08  1066  			break;
6272e2667965df Christoph Hellwig 2007-05-08  1067  		/*FALL THROUGH*/
6272e2667965df Christoph Hellwig 2007-05-08  1068  
6272e2667965df Christoph Hellwig 2007-05-08  1069  	default:
72c2d531920048 Al Viro           2013-09-22  1070  		if (f.file->f_op->compat_ioctl) {
2903ff019b346a Al Viro           2012-08-28  1071  			error = f.file->f_op->compat_ioctl(f.file, cmd, arg);
6272e2667965df Christoph Hellwig 2007-05-08  1072  			if (error != -ENOIOCTLCMD)
6272e2667965df Christoph Hellwig 2007-05-08  1073  				goto out_fput;
6272e2667965df Christoph Hellwig 2007-05-08  1074  		}
6272e2667965df Christoph Hellwig 2007-05-08  1075  
72c2d531920048 Al Viro           2013-09-22  1076  		if (!f.file->f_op->unlocked_ioctl)
6272e2667965df Christoph Hellwig 2007-05-08  1077  			goto do_ioctl;
6272e2667965df Christoph Hellwig 2007-05-08  1078  		break;
6272e2667965df Christoph Hellwig 2007-05-08  1079  	}
6272e2667965df Christoph Hellwig 2007-05-08  1080  
661f627da98c06 Arnd Bergmann     2009-11-05 @1081  	if (compat_ioctl_check_table(XFORM(cmd)))
6272e2667965df Christoph Hellwig 2007-05-08  1082  		goto found_handler;
6272e2667965df Christoph Hellwig 2007-05-08  1083  
66cf191f3eae45 Al Viro           2016-01-07 @1084  	error = do_ioctl_trans(cmd, arg, f.file);
07d106d0a33d60 Linus Torvalds    2012-01-05  1085  	if (error == -ENOIOCTLCMD)
07d106d0a33d60 Linus Torvalds    2012-01-05  1086  		error = -ENOTTY;
6272e2667965df Christoph Hellwig 2007-05-08  1087  
6272e2667965df Christoph Hellwig 2007-05-08  1088  	goto out_fput;
6272e2667965df Christoph Hellwig 2007-05-08  1089  
6272e2667965df Christoph Hellwig 2007-05-08  1090   found_handler:
789f0f89118a80 Arnd Bergmann     2009-11-05  1091  	arg = (unsigned long)compat_ptr(arg);
6272e2667965df Christoph Hellwig 2007-05-08  1092   do_ioctl:
2903ff019b346a Al Viro           2012-08-28  1093  	error = do_vfs_ioctl(f.file, fd, cmd, arg);
6272e2667965df Christoph Hellwig 2007-05-08  1094   out_fput:
2903ff019b346a Al Viro           2012-08-28  1095  	fdput(f);
6272e2667965df Christoph Hellwig 2007-05-08  1096   out:
6272e2667965df Christoph Hellwig 2007-05-08  1097  	return error;
6272e2667965df Christoph Hellwig 2007-05-08  1098  }
6272e2667965df Christoph Hellwig 2007-05-08  1099  

:::::: The code at line 1084 was first introduced by commit
:::::: 66cf191f3eae4582a83cb4251b75b43bee95a999 compat_ioctl: don't pass fd around when not needed

:::::: TO: Al Viro <viro@zeniv.linux.org.uk>
:::::: CC: Al Viro <viro@zeniv.linux.org.uk>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

             reply	other threads:[~2019-10-28 21:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 21:22 kbuild test robot [this message]
2019-10-28 21:22 ` [xfs-linux:xfs-5.5-merge 70/72] fs/compat_ioctl.c:1084:25: error: 'cmd' undeclared here (not in a function); did you mean 'cma'? kbuild test robot

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=201910290545.EnIGT2Co%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-xfs@vger.kernel.org \
    /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.