[mark:treewide/gnu99 2/2] arch/sh/include/asm/pgtable.h:39:31: error: left shift of negative value
From: kernel test robot
Date: Thu Jan 13 2022 - 17:04:09 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git treewide/gnu99
head: 4c56f3c557cbc276326c329e05f64a53398affec
commit: 4c56f3c557cbc276326c329e05f64a53398affec [2/2] treewide: use -std=gnu99
config: sh-randconfig-r026-20220113 (https://download.01.org/0day-ci/archive/20220114/202201140534.ii9mlcnU-lkp@xxxxxxxxx/config)
compiler: sh4-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://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=4c56f3c557cbc276326c329e05f64a53398affec
git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark treewide/gnu99
git checkout 4c56f3c557cbc276326c329e05f64a53398affec
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
cc1: error: arch/sh/include/mach-hp6xx: No such file or directory [-Werror=missing-include-dirs]
In file included from include/linux/pgtable.h:6,
from arch/sh/include/asm/io.h:21,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from arch/sh/include/asm/hardirq.h:9,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from arch/sh/cchips/hd6446x/hd64461.c:11:
arch/sh/include/asm/pgtable.h: In function 'neff_sign_extend':
>> arch/sh/include/asm/pgtable.h:39:31: error: left shift of negative value [-Werror=shift-negative-value]
39 | #define NEFF_MASK (-1LL << NEFF)
| ^~
arch/sh/include/asm/pgtable.h:44:53: note: in expansion of macro 'NEFF_MASK'
44 | return (extended & NEFF_SIGN) ? (extended | NEFF_MASK) : extended;
| ^~~~~~~~~
arch/sh/cchips/hd6446x/hd64461.c: At top level:
arch/sh/cchips/hd6446x/hd64461.c:75:12: error: no previous prototype for 'setup_hd64461' [-Werror=missing-prototypes]
75 | int __init setup_hd64461(void)
| ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +39 arch/sh/include/asm/pgtable.h
^1da177e4c3f41 include/asm-sh/pgtable.h Linus Torvalds 2005-04-16 32
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 33 /*
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 34 * Effective and physical address definitions, to aid with sign
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 35 * extension.
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 36 */
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 37 #define NEFF 32
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 38 #define NEFF_SIGN (1LL << (NEFF - 1))
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 @39 #define NEFF_MASK (-1LL << NEFF)
36bcd39dbca824 include/asm-sh/pgtable.h Paul Mundt 2007-11-10 40
:::::: The code at line 39 was first introduced by commit
:::::: 36bcd39dbca824daffe16d607ae574b6edc7d31a sh: Split out 29-bit and 32-bit physical mode definitions.
:::::: TO: Paul Mundt <lethal@xxxxxxxxxxxx>
:::::: CC: Paul Mundt <lethal@xxxxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx