Subject: Re: linux-next: build failure after merge of the xfs tree

From: "Darrick J. Wong" <[email-masked]>
Date: Mon, 28 Oct 2019 16:18:06 -0700

On Tue, Oct 29, 2019 at 10:11:51AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the xfs tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:

<groan> Yeah, that's the same thing reported by the kbuild robot an hour
ago.  FWIW I pushed a fixed branch but I guess it's too late for today,
oh well....

...the root cause of course was the stray '}' in one of the commits,
that I didn't catch because compat ioctls are hard. :(

Sorry about the mess.

--D

> fs/compat_ioctl.c: In function '__do_compat_sys_ioctl':
> fs/compat_ioctl.c:1056:2: error: case label not within a switch statement
>  1056 |  case FICLONE:
>       |  ^~~~
> fs/compat_ioctl.c:1057:2: error: case label not within a switch statement
>  1057 |  case FICLONERANGE:
>       |  ^~~~
> fs/compat_ioctl.c:1058:2: error: case label not within a switch statement
>  1058 |  case FIDEDUPERANGE:
>       |  ^~~~
> fs/compat_ioctl.c:1059:2: error: case label not within a switch statement
>  1059 |  case FS_IOC_FIEMAP:
>       |  ^~~~
> fs/compat_ioctl.c:1062:2: error: case label not within a switch statement
>  1062 |  case FIBMAP:
>       |  ^~~~
> fs/compat_ioctl.c:1063:2: error: case label not within a switch statement
>  1063 |  case FIGETBSZ:
>       |  ^~~~
> fs/compat_ioctl.c:1064:2: error: case label not within a switch statement
>  1064 |  case FIONREAD:
>       |  ^~~~
> fs/compat_ioctl.c:1066:4: error: break statement not within loop or switch
>  1066 |    break;
>       |    ^~~~~
> fs/compat_ioctl.c:1069:2: error: 'default' label not within a switch statement
>  1069 |  default:
>       |  ^~~~~~~
> fs/compat_ioctl.c:1078:3: error: break statement not within loop or switch
>  1078 |   break;
>       |   ^~~~~
> fs/compat_ioctl.c:1077:4: error: label 'do_ioctl' used but not defined
>  1077 |    goto do_ioctl;
>       |    ^~~~
> fs/compat_ioctl.c:1073:5: error: label 'out_fput' used but not defined
>  1073 |     goto out_fput;
>       |     ^~~~
> fs/compat_ioctl.c:1005:3: error: label 'out' used but not defined
>  1005 |   goto out;
>       |   ^~~~
> fs/compat_ioctl.c:1079:2: warning: no return statement in function returning non-void [-Wreturn-type]
>  1079 |  }
>       |  ^
> fs/compat_ioctl.c: At top level:
> fs/compat_ioctl.c:1081:2: error: expected identifier or '(' before 'if'
>  1081 |  if (compat_ioctl_check_table(XFORM(cmd)))
>       |  ^~
> fs/compat_ioctl.c:1084:2: warning: data definition has no type or storage class
>  1084 |  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)
>  1084 |  error = do_ioctl_trans(cmd, arg, f.file);
>       |                         ^~~
> fs/compat_ioctl.c:1084:30: error: 'arg' undeclared here (not in a function)
>  1084 |  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'?
>  1084 |  error = do_ioctl_trans(cmd, arg, f.file);
>       |                                   ^
>       |                                   fd
> fs/compat_ioctl.c:1085:2: error: expected identifier or '(' before 'if'
>  1085 |  if (error == -ENOIOCTLCMD)
>       |  ^~
> fs/compat_ioctl.c:1088:2: error: expected identifier or '(' before 'goto'
>  1088 |  goto out_fput;
>       |  ^~~~
> fs/compat_ioctl.c:1090:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
>  1090 |  found_handler:
>       |               ^
> fs/compat_ioctl.c:1092:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
>  1092 |  do_ioctl:
>       |          ^
> fs/compat_ioctl.c:1094:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
>  1094 |  out_fput:
>       |          ^
> fs/compat_ioctl.c:1096:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
>  1096 |  out:
>       |     ^
> fs/compat_ioctl.c:1098:1: error: expected identifier or '(' before '}' token
>  1098 | }
>       | ^
> fs/compat_ioctl.c:976:12: warning: 'compat_ioctl_check_table' defined but not used [-Wunused-function]
>   976 | static int compat_ioctl_check_table(unsigned int xcmd)
>       |            ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   d5e20bfa0b77 ("fs: add generic UNRESVSP and ZERO_RANGE ioctl handlers")
> 
> I have used the xfs tree from next-20191028 for today.
> 
> -- 
> Cheers,
> Stephen Rothwell