Re: arch/sparc/mm/srmmu.c:300:9: error: variable 'pud' set but not used

From: Mike Rapoport
Date: Wed May 20 2020 - 09:20:19 EST


On Wed, May 20, 2020 at 08:57:33AM +0800, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 642b151f45dd54809ea00ecd3976a56c1ec9b53d
> commit: 7235db268a2777bc380b99b7db49ff7b19c8fb76 sparc32: use pgtable-nopud instead of 4level-fixup
> config: sparc-defconfig (attached as .config)
> compiler: sparc-linux-gcc (GCC) 9.3.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 7235db268a2777bc380b99b7db49ff7b19c8fb76
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
>
> All errors (new ones prefixed by >>, old ones prefixed by <<):
>
> arch/sparc/mm/srmmu.c: In function 'srmmu_nocache_init':
> >> arch/sparc/mm/srmmu.c:300:9: error: variable 'pud' set but not used [-Werror=unused-but-set-variable]
> 300 | pud_t *pud;
> | ^~~

Here's the fix vs v5.7-rc6-mmots-2020-05-19-21-52: