[djwong-xfs:other-stuff-for-5.15 21/23] arch/sh/include/asm/pgtable.h:39:25: warning: left shift of negative value

From: kernel test robot
Date: Wed Aug 04 2021 - 02:57:21 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git other-stuff-for-5.15
head: 1aa974ba9fad4f0ada9281690c0771dc74d26718
commit: 2c286bab5e5a4d47e58d84c7e4bb244ae0a1c0a7 [21/23] xfs: automatic resource cleanup of for_each_perag*
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 10.3.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/djwong/xfs-linux.git/commit/?id=2c286bab5e5a4d47e58d84c7e4bb244ae0a1c0a7
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs other-stuff-for-5.15
git checkout 2c286bab5e5a4d47e58d84c7e4bb244ae0a1c0a7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=sh

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from fs/xfs/kmem.h:11,
from fs/xfs/xfs_linux.h:24,
from fs/xfs/xfs.h:22,
from fs/xfs/xfs_trace.c:6:
arch/sh/include/asm/pgtable.h: In function 'neff_sign_extend':
>> arch/sh/include/asm/pgtable.h:39:25: warning: left shift of negative value [-Wshift-negative-value]
39 | #define NEFF_MASK (-1LL << NEFF)
| ^~
arch/sh/include/asm/pgtable.h:44:46: note: in expansion of macro 'NEFF_MASK'
44 | return (extended & NEFF_SIGN) ? (extended | NEFF_MASK) : extended;
| ^~~~~~~~~

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC


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

Attachment: .config.gz
Description: application/gzip