[djwong-xfs:repair-symlink-swapext 321/325] fs/xfs/libxfs/xfs_symlink_remote.c:26:1: warning: no previous prototype for function 'xfs_symlink_blocks'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-symlink-swapext
head: 851df07d9599471df909c4ff0e3cf33f4b9619f0
commit: 515b3743bd3bfc67a91b56942181662cf55293ad [321/325] xfs: move xfs_symlink_remote.c declarations to xfs_symlink_remote.h
config: riscv-randconfig-r042-20211216 (https://download.01.org/0day-ci/archive/20211216/202112161445.FSm8Pr8b-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/comm...
git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
git fetch --no-tags djwong-xfs repair-symlink-swapext
git checkout 515b3743bd3bfc67a91b56942181662cf55293ad
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash fs/xfs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/xfs/libxfs/xfs_symlink_remote.c:26:1: warning: no previous prototype for function 'xfs_symlink_blocks' [-Wmissing-prototypes]
xfs_symlink_blocks(
^
fs/xfs/libxfs/xfs_symlink_remote.c:25:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
>> fs/xfs/libxfs/xfs_symlink_remote.c:36:1: warning: no previous prototype for function 'xfs_symlink_hdr_set' [-Wmissing-prototypes]
xfs_symlink_hdr_set(
^
fs/xfs/libxfs/xfs_symlink_remote.c:35:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
>> fs/xfs/libxfs/xfs_symlink_remote.c:66:1: warning: no previous prototype for function 'xfs_symlink_hdr_ok' [-Wmissing-prototypes]
xfs_symlink_hdr_ok(
^
fs/xfs/libxfs/xfs_symlink_remote.c:65:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool
^
static
>> fs/xfs/libxfs/xfs_symlink_remote.c:165:1: warning: no previous prototype for function 'xfs_symlink_local_to_remote' [-Wmissing-prototypes]
xfs_symlink_local_to_remote(
^
fs/xfs/libxfs/xfs_symlink_remote.c:164:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
>> fs/xfs/libxfs/xfs_symlink_remote.c:204:1: warning: no previous prototype for function 'xfs_symlink_shortform_verify' [-Wmissing-prototypes]
xfs_symlink_shortform_verify(
^
fs/xfs/libxfs/xfs_symlink_remote.c:203:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
xfs_failaddr_t
^
static
5 warnings generated.
vim +/xfs_symlink_blocks +26 fs/xfs/libxfs/xfs_symlink_remote.c
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 19
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 20
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 21 /*
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 22 * Each contiguous block has a header, so it is not just a simple pathlen
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 23 * to FSB conversion.
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 24 */
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 25 int
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 @26 xfs_symlink_blocks(
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 27 struct xfs_mount *mp,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 28 int pathlen)
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 29 {
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 30 int buflen = XFS_SYMLINK_BUF_SPACE(mp, mp->m_sb.sb_blocksize);
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 31
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 32 return (pathlen + buflen - 1) / buflen;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 33 }
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 34
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 35 int
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 @36 xfs_symlink_hdr_set(
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 37 struct xfs_mount *mp,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 38 xfs_ino_t ino,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 39 uint32_t offset,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 40 uint32_t size,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 41 struct xfs_buf *bp)
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 42 {
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 43 struct xfs_dsymlink_hdr *dsl = bp->b_addr;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 44
38c26bfd90e199 fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2021-08-18 45 if (!xfs_has_crc(mp))
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 46 return 0;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 47
a45086e27dfa21 fs/xfs/libxfs/xfs_symlink_remote.c Brian Foster 2015-10-12 48 memset(dsl, 0, sizeof(struct xfs_dsymlink_hdr));
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 49 dsl->sl_magic = cpu_to_be32(XFS_SYMLINK_MAGIC);
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 50 dsl->sl_offset = cpu_to_be32(offset);
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 51 dsl->sl_bytes = cpu_to_be32(size);
ce748eaa65f2e9 fs/xfs/libxfs/xfs_symlink_remote.c Eric Sandeen 2015-07-29 52 uuid_copy(&dsl->sl_uuid, &mp->m_sb.sb_meta_uuid);
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 53 dsl->sl_owner = cpu_to_be64(ino);
9343ee76909e3f fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2021-08-18 54 dsl->sl_blkno = cpu_to_be64(xfs_buf_daddr(bp));
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 55 bp->b_ops = &xfs_symlink_buf_ops;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 56
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 57 return sizeof(struct xfs_dsymlink_hdr);
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 58 }
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 59
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 60 /*
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 61 * Checking of the symlink header is split into two parts. the verifier does
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 62 * CRC, location and bounds checking, the unpacking function checks the path
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 63 * parameters and owner.
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 64 */
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 65 bool
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 @66 xfs_symlink_hdr_ok(
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 67 xfs_ino_t ino,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 68 uint32_t offset,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 69 uint32_t size,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 70 struct xfs_buf *bp)
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 71 {
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 72 struct xfs_dsymlink_hdr *dsl = bp->b_addr;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 73
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 74 if (offset != be32_to_cpu(dsl->sl_offset))
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 75 return false;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 76 if (size != be32_to_cpu(dsl->sl_bytes))
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 77 return false;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 78 if (ino != be64_to_cpu(dsl->sl_owner))
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 79 return false;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 80
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 81 /* ok */
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 82 return true;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 83 }
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 84
a6a781a58befcb fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 85 static xfs_failaddr_t
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 86 xfs_symlink_verify(
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 87 struct xfs_buf *bp)
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 88 {
dbd329f1e44ed4 fs/xfs/libxfs/xfs_symlink_remote.c Christoph Hellwig 2019-06-28 89 struct xfs_mount *mp = bp->b_mount;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 90 struct xfs_dsymlink_hdr *dsl = bp->b_addr;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 91
38c26bfd90e199 fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2021-08-18 92 if (!xfs_has_crc(mp))
a6a781a58befcb fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 93 return __this_address;
39708c20ab5133 fs/xfs/libxfs/xfs_symlink_remote.c Brian Foster 2019-02-07 94 if (!xfs_verify_magic(bp, dsl->sl_magic))
a6a781a58befcb fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 95 return __this_address;
ce748eaa65f2e9 fs/xfs/libxfs/xfs_symlink_remote.c Eric Sandeen 2015-07-29 96 if (!uuid_equal(&dsl->sl_uuid, &mp->m_sb.sb_meta_uuid))
a6a781a58befcb fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 97 return __this_address;
9343ee76909e3f fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2021-08-18 98 if (xfs_buf_daddr(bp) != be64_to_cpu(dsl->sl_blkno))
a6a781a58befcb fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 99 return __this_address;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 100 if (be32_to_cpu(dsl->sl_offset) +
6eb0b8df9f74f3 fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2017-07-07 101 be32_to_cpu(dsl->sl_bytes) >= XFS_SYMLINK_MAXLEN)
a6a781a58befcb fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 102 return __this_address;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 103 if (dsl->sl_owner == 0)
a6a781a58befcb fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 104 return __this_address;
a45086e27dfa21 fs/xfs/libxfs/xfs_symlink_remote.c Brian Foster 2015-10-12 105 if (!xfs_log_check_lsn(mp, be64_to_cpu(dsl->sl_lsn)))
a6a781a58befcb fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 106 return __this_address;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 107
a6a781a58befcb fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 108 return NULL;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 109 }
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 110
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 111 static void
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 112 xfs_symlink_read_verify(
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 113 struct xfs_buf *bp)
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 114 {
dbd329f1e44ed4 fs/xfs/libxfs/xfs_symlink_remote.c Christoph Hellwig 2019-06-28 115 struct xfs_mount *mp = bp->b_mount;
bc1a09b8e334bf fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 116 xfs_failaddr_t fa;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 117
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 118 /* no verification of non-crc buffers */
38c26bfd90e199 fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2021-08-18 119 if (!xfs_has_crc(mp))
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 120 return;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 121
ce5028cfe3ca48 fs/xfs/xfs_symlink_remote.c Eric Sandeen 2014-02-27 122 if (!xfs_buf_verify_cksum(bp, XFS_SYMLINK_CRC_OFF))
bc1a09b8e334bf fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 123 xfs_verifier_error(bp, -EFSBADCRC, __this_address);
bc1a09b8e334bf fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 124 else {
bc1a09b8e334bf fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 125 fa = xfs_symlink_verify(bp);
bc1a09b8e334bf fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 126 if (fa)
bc1a09b8e334bf fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 127 xfs_verifier_error(bp, -EFSCORRUPTED, fa);
bc1a09b8e334bf fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 128 }
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 129 }
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 130
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 131 static void
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 132 xfs_symlink_write_verify(
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 133 struct xfs_buf *bp)
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 134 {
dbd329f1e44ed4 fs/xfs/libxfs/xfs_symlink_remote.c Christoph Hellwig 2019-06-28 135 struct xfs_mount *mp = bp->b_mount;
fb1755a645972e fs/xfs/libxfs/xfs_symlink_remote.c Carlos Maiolino 2018-01-24 136 struct xfs_buf_log_item *bip = bp->b_log_item;
bc1a09b8e334bf fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 137 xfs_failaddr_t fa;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 138
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 139 /* no verification of non-crc buffers */
38c26bfd90e199 fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2021-08-18 140 if (!xfs_has_crc(mp))
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 141 return;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 142
bc1a09b8e334bf fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 143 fa = xfs_symlink_verify(bp);
bc1a09b8e334bf fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 144 if (fa) {
bc1a09b8e334bf fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 145 xfs_verifier_error(bp, -EFSCORRUPTED, fa);
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 146 return;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 147 }
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 148
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 149 if (bip) {
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 150 struct xfs_dsymlink_hdr *dsl = bp->b_addr;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 151 dsl->sl_lsn = cpu_to_be64(bip->bli_item.li_lsn);
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 152 }
f1dbcd7e38c80c fs/xfs/xfs_symlink_remote.c Eric Sandeen 2014-02-27 153 xfs_buf_update_cksum(bp, XFS_SYMLINK_CRC_OFF);
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 154 }
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 155
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 156 const struct xfs_buf_ops xfs_symlink_buf_ops = {
233135b763db7c fs/xfs/libxfs/xfs_symlink_remote.c Eric Sandeen 2016-01-04 157 .name = "xfs_symlink",
39708c20ab5133 fs/xfs/libxfs/xfs_symlink_remote.c Brian Foster 2019-02-07 158 .magic = { 0, cpu_to_be32(XFS_SYMLINK_MAGIC) },
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 159 .verify_read = xfs_symlink_read_verify,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 160 .verify_write = xfs_symlink_write_verify,
b55725974c9d3a fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 161 .verify_struct = xfs_symlink_verify,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 162 };
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 163
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 164 void
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 @165 xfs_symlink_local_to_remote(
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 166 struct xfs_trans *tp,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 167 struct xfs_buf *bp,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 168 struct xfs_inode *ip,
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 169 struct xfs_ifork *ifp)
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 170 {
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 171 struct xfs_mount *mp = ip->i_mount;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 172 char *buf;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 173
fe22d552b82d7c fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2015-01-22 174 xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SYMLINK_BUF);
fe22d552b82d7c fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2015-01-22 175
38c26bfd90e199 fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2021-08-18 176 if (!xfs_has_crc(mp)) {
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 177 bp->b_ops = NULL;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 178 memcpy(bp->b_addr, ifp->if_u1.if_data, ifp->if_bytes);
b7cdc66be54b64 fs/xfs/libxfs/xfs_symlink_remote.c Brian Foster 2015-10-12 179 xfs_trans_log_buf(tp, bp, 0, ifp->if_bytes - 1);
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 180 return;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 181 }
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 182
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 183 /*
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 184 * As this symlink fits in an inode literal area, it must also fit in
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 185 * the smallest buffer the filesystem supports.
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 186 */
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 187 ASSERT(BBTOB(bp->b_length) >=
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 188 ifp->if_bytes + sizeof(struct xfs_dsymlink_hdr));
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 189
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 190 bp->b_ops = &xfs_symlink_buf_ops;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 191
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 192 buf = bp->b_addr;
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 193 buf += xfs_symlink_hdr_set(mp, ip->i_ino, 0, ifp->if_bytes, bp);
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 194 memcpy(buf, ifp->if_u1.if_data, ifp->if_bytes);
b7cdc66be54b64 fs/xfs/libxfs/xfs_symlink_remote.c Brian Foster 2015-10-12 195 xfs_trans_log_buf(tp, bp, 0, sizeof(struct xfs_dsymlink_hdr) +
b7cdc66be54b64 fs/xfs/libxfs/xfs_symlink_remote.c Brian Foster 2015-10-12 196 ifp->if_bytes - 1);
1fb7e48db68100 fs/xfs/xfs_symlink_remote.c Dave Chinner 2013-08-12 197 }
0795e004fd4f27 fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 198
43feeea88c9cb2 fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2018-12-12 199 /*
43feeea88c9cb2 fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2018-12-12 200 * Verify the in-memory consistency of an inline symlink data fork. This
43feeea88c9cb2 fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2018-12-12 201 * does not do on-disk format checks.
43feeea88c9cb2 fs/xfs/libxfs/xfs_symlink_remote.c Dave Chinner 2018-12-12 202 */
0795e004fd4f27 fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 203 xfs_failaddr_t
0795e004fd4f27 fs/xfs/libxfs/xfs_symlink_remote.c Darrick J. Wong 2018-01-08 @204 xfs_symlink_shortform_verify(
:::::: The code at line 26 was first introduced by commit
:::::: 1fb7e48db6810093012873a652062648ace6b5bb xfs: split out the remote symlink handling
:::::: TO: Dave Chinner <dchinner(a)redhat.com>
:::::: CC: Ben Myers <bpm(a)sgi.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[jirislaby:devel 8/33] include/linux/compiler.h:61:23: warning: 'xmit_buf' is deprecated
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: d61595c5423534810c1a3c0d4a88dd2fd81d750c
commit: 8825023d7d2eb9e5dc298ad1996a0c753b2c4580 [8/33] tty: add kfifo to tty_port
config: s390-randconfig-r044-20211215 (https://download.01.org/0day-ci/archive/20211216/202112160239.cdlehqr0-lk...)
compiler: s390-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/jirislaby/linux.git/commi...
git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
git fetch --no-tags jirislaby devel
git checkout 8825023d7d2eb9e5dc298ad1996a0c753b2c4580
# 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=s390 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/tty/tty_port.c: In function 'tty_port_alloc_xmit_buf':
drivers/tty/tty_port.c:228:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
228 | if (port->xmit_buf == NULL)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:228:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
228 | if (port->xmit_buf == NULL)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/tty.h:5,
from drivers/tty/tty_port.c:8:
>> include/linux/compiler.h:61:23: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
61 | static struct ftrace_branch_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/tty/tty_port.c:228:9: note: in expansion of macro 'if'
228 | if (port->xmit_buf == NULL)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:229:17: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
229 | port->xmit_buf = (unsigned char *)get_zeroed_page(GFP_KERNEL);
| ^~~~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:231:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
231 | if (port->xmit_buf == NULL)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:231:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
231 | if (port->xmit_buf == NULL)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/tty.h:5,
from drivers/tty/tty_port.c:8:
>> include/linux/compiler.h:61:23: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
61 | static struct ftrace_branch_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/tty/tty_port.c:231:9: note: in expansion of macro 'if'
231 | if (port->xmit_buf == NULL)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c: In function 'tty_port_free_xmit_buf':
drivers/tty/tty_port.c:240:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
240 | if (port->xmit_buf != NULL) {
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:240:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
240 | if (port->xmit_buf != NULL) {
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/tty.h:5,
from drivers/tty/tty_port.c:8:
>> include/linux/compiler.h:61:23: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
61 | static struct ftrace_branch_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/tty/tty_port.c:240:9: note: in expansion of macro 'if'
240 | if (port->xmit_buf != NULL) {
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:241:17: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
241 | free_page((unsigned long)port->xmit_buf);
| ^~~~~~~~~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:242:17: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
242 | port->xmit_buf = NULL;
| ^~~~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c: In function 'tty_port_destructor':
drivers/tty/tty_port.c:270:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
270 | if (port->xmit_buf)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:270:9: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
270 | if (port->xmit_buf)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
In file included from include/linux/build_bug.h:5,
from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/linux/tty.h:5,
from drivers/tty/tty_port.c:8:
>> include/linux/compiler.h:61:23: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
61 | static struct ftrace_branch_data \
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:69: note: in expansion of macro '__trace_if_value'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
drivers/tty/tty_port.c:270:9: note: in expansion of macro 'if'
270 | if (port->xmit_buf)
| ^~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
drivers/tty/tty_port.c:271:17: warning: 'xmit_buf' is deprecated [-Wdeprecated-declarations]
271 | free_page((unsigned long)port->xmit_buf);
| ^~~~~~~~~
In file included from include/linux/tty.h:12,
from drivers/tty/tty_port.c:8:
include/linux/tty_port.h:115:34: note: declared here
115 | unsigned char *xmit_buf __attribute__((deprecated));
| ^~~~~~~~
vim +/xmit_buf +61 include/linux/compiler.h
a15fd609ad53a6 Linus Torvalds 2019-03-20 59
a15fd609ad53a6 Linus Torvalds 2019-03-20 60 #define __trace_if_value(cond) ({ \
2bcd521a684cc9 Steven Rostedt 2008-11-21 @61 static struct ftrace_branch_data \
e04462fb82f8dd Miguel Ojeda 2018-09-03 62 __aligned(4) \
33def8498fdde1 Joe Perches 2020-10-21 63 __section("_ftrace_branch") \
a15fd609ad53a6 Linus Torvalds 2019-03-20 64 __if_trace = { \
2bcd521a684cc9 Steven Rostedt 2008-11-21 65 .func = __func__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 66 .file = __FILE__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 67 .line = __LINE__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 68 }; \
a15fd609ad53a6 Linus Torvalds 2019-03-20 69 (cond) ? \
a15fd609ad53a6 Linus Torvalds 2019-03-20 70 (__if_trace.miss_hit[1]++,1) : \
a15fd609ad53a6 Linus Torvalds 2019-03-20 71 (__if_trace.miss_hit[0]++,0); \
a15fd609ad53a6 Linus Torvalds 2019-03-20 72 })
a15fd609ad53a6 Linus Torvalds 2019-03-20 73
:::::: The code at line 61 was first introduced by commit
:::::: 2bcd521a684cc94befbe2ce7d5b613c841b0d304 trace: profile all if conditionals
:::::: TO: Steven Rostedt <srostedt(a)redhat.com>
:::::: CC: Ingo Molnar <mingo(a)elte.hu>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 2/2] pinctrl: bcm: add driver for BCM4908 pinmux
by kernel test robot
Hi "Rafał,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linusw-pinctrl/devel]
[also build test WARNING on robh/for-next linus/master v5.16-rc5 next-20211215]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Rafa-Mi-ecki/dt-bindings-pinctrl...
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20211216/202112161405.FBvHqiWr-lk...)
compiler: riscv64-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://github.com/0day-ci/linux/commit/52ad0e1851a5d242cde2829eca853a736...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rafa-Mi-ecki/dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl/20211216-044855
git checkout 52ad0e1851a5d242cde2829eca853a7369807c42
# 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=riscv SHELL=/bin/bash drivers/pinctrl/bcm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/pinctrl/bcm/pinctrl-bcm4908.c: In function 'bcm4908_pinctrl_probe':
>> drivers/pinctrl/bcm/pinctrl-bcm4908.c:542:53: warning: passing argument 3 of 'pinmux_generic_add_function' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
542 | function->groups,
| ~~~~~~~~^~~~~~~~
In file included from drivers/pinctrl/bcm/pinctrl-bcm4908.c:18:
drivers/pinctrl/bcm/../pinmux.h:153:46: note: expected 'const char **' but argument is of type 'const char * const*'
153 | const char **groups,
| ~~~~~~~~~~~~~^~~~~~
vim +542 drivers/pinctrl/bcm/pinctrl-bcm4908.c
468
469 static int bcm4908_pinctrl_probe(struct platform_device *pdev)
470 {
471 struct device *dev = &pdev->dev;
472 struct bcm4908_pinctrl *bcm4908_pinctrl;
473 struct pinctrl_desc *pctldesc;
474 struct pinctrl_pin_desc *pins;
475 int i;
476
477 bcm4908_pinctrl = devm_kzalloc(dev, sizeof(*bcm4908_pinctrl), GFP_KERNEL);
478 if (!bcm4908_pinctrl)
479 return -ENOMEM;
480 pctldesc = &bcm4908_pinctrl->pctldesc;
481 platform_set_drvdata(pdev, bcm4908_pinctrl);
482
483 /* Set basic properties */
484
485 bcm4908_pinctrl->dev = dev;
486
487 bcm4908_pinctrl->base = devm_platform_ioremap_resource(pdev, 0);
488 if (IS_ERR(bcm4908_pinctrl->base)) {
489 dev_err(dev, "Failed to map pinctrl regs\n");
490 return PTR_ERR(bcm4908_pinctrl->base);
491 }
492
493 memcpy(pctldesc, &bcm4908_pinctrl_desc, sizeof(*pctldesc));
494
495 /* Set pinctrl properties */
496
497 pins = devm_kcalloc(dev, BCM4908_NUM_PINS,
498 sizeof(struct pinctrl_pin_desc), GFP_KERNEL);
499 if (!pins)
500 return -ENOMEM;
501 for (i = 0; i < BCM4908_NUM_PINS; i++) {
502 pins[i].number = i;
503 pins[i].name = devm_kasprintf(dev, GFP_KERNEL, "pin%d", i);
504 if (!pins[i].name)
505 return -ENOMEM;
506 }
507 pctldesc->pins = pins;
508 pctldesc->npins = BCM4908_NUM_PINS;
509
510 /* Register */
511
512 bcm4908_pinctrl->pctldev = devm_pinctrl_register(dev, pctldesc, bcm4908_pinctrl);
513 if (IS_ERR(bcm4908_pinctrl->pctldev)) {
514 dev_err(dev, "Failed to register pinctrl\n");
515 return PTR_ERR(bcm4908_pinctrl->pctldev);
516 }
517
518 /* Groups */
519
520 for (i = 0; i < ARRAY_SIZE(bcm4908_pinctrl_grps); i++) {
521 const struct bcm4908_pinctrl_grp *group = &bcm4908_pinctrl_grps[i];
522 int *pins;
523 int j;
524
525 pins = devm_kcalloc(dev, group->num_pins, sizeof(*pins), GFP_KERNEL);
526 if (!pins)
527 return -ENOMEM;
528 for (j = 0; j < group->num_pins; j++)
529 pins[j] = group->pins[j].number;
530
531 pinctrl_generic_add_group(bcm4908_pinctrl->pctldev, group->name,
532 pins, group->num_pins, (void *)group);
533 }
534
535 /* Functions */
536
537 for (i = 0; i < ARRAY_SIZE(bcm4908_pinctrl_functions); i++) {
538 const struct bcm4908_pinctrl_function *function = &bcm4908_pinctrl_functions[i];
539
540 pinmux_generic_add_function(bcm4908_pinctrl->pctldev,
541 function->name,
> 542 function->groups,
543 function->num_groups, NULL);
544 }
545
546 return 0;
547 }
548
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[intel-lts:5.10/yocto 19765/19803] arch/x86/kernel/keylocker.c:31:7: error: implicit declaration of function 'acpi_sleep_state_supported'
by kernel test robot
Hi Chang,
First bad commit (maybe != root cause):
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: c1454bb2993a11fdcd48794cdd65569c3b33a5b0
commit: a3595cf89d33d08bb53ff3e31160e3f1fb45a1e5 [19765/19803] x86/cpu: Enable Key Locker and add a chicken bit
config: x86_64-buildonly-randconfig-r005-20211214 (https://download.01.org/0day-ci/archive/20211216/202112161208.ocGnA7IL-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/linux-intel-lts/commit/a3595cf89d33d08bb53ff3e31...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/yocto
git checkout a3595cf89d33d08bb53ff3e31160e3f1fb45a1e5
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/kernel/keylocker.c: In function 'check_keylocker_readiness':
>> arch/x86/kernel/keylocker.c:31:7: error: implicit declaration of function 'acpi_sleep_state_supported' [-Werror=implicit-function-declaration]
31 | (acpi_sleep_state_supported(ACPI_STATE_S3) ||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/acpi_sleep_state_supported +31 arch/x86/kernel/keylocker.c
f8928662d77653 Chang S. Bae 2019-10-23 16
60adaad4f7cfbd Chang S. Bae 2019-10-23 17 bool check_keylocker_readiness(void)
60adaad4f7cfbd Chang S. Bae 2019-10-23 18 {
60adaad4f7cfbd Chang S. Bae 2019-10-23 19 u32 eax, ebx, ecx, edx;
60adaad4f7cfbd Chang S. Bae 2019-10-23 20
60adaad4f7cfbd Chang S. Bae 2019-10-23 21 cpuid_count(KL_CPUID, 0, &eax, &ebx, &ecx, &edx);
60adaad4f7cfbd Chang S. Bae 2019-10-23 22 /* BIOS may not enable it on some systems. */
60adaad4f7cfbd Chang S. Bae 2019-10-23 23 if (!(ebx & KL_CPUID_EBX_AESKLE)) {
60adaad4f7cfbd Chang S. Bae 2019-10-23 24 pr_debug("x86/keylocker: not fully enabled\n");
60adaad4f7cfbd Chang S. Bae 2019-10-23 25 return false;
60adaad4f7cfbd Chang S. Bae 2019-10-23 26 }
60adaad4f7cfbd Chang S. Bae 2019-10-23 27
f8928662d77653 Chang S. Bae 2019-10-23 28 iwkeybackup_available = (ebx & KL_CPUID_EBX_BACKUP);
f8928662d77653 Chang S. Bae 2019-10-23 29 /* IWKey backup is essential with S3/4 states */
f8928662d77653 Chang S. Bae 2019-10-23 30 if (!iwkeybackup_available &&
f8928662d77653 Chang S. Bae 2019-10-23 @31 (acpi_sleep_state_supported(ACPI_STATE_S3) ||
f8928662d77653 Chang S. Bae 2019-10-23 32 acpi_sleep_state_supported(ACPI_STATE_S4))) {
f8928662d77653 Chang S. Bae 2019-10-23 33 pr_debug("x86/keylocker: no key backup support with possible S3/4\n");
f8928662d77653 Chang S. Bae 2019-10-23 34 return false;
f8928662d77653 Chang S. Bae 2019-10-23 35 }
60adaad4f7cfbd Chang S. Bae 2019-10-23 36 return true;
60adaad4f7cfbd Chang S. Bae 2019-10-23 37 }
60adaad4f7cfbd Chang S. Bae 2019-10-23 38
:::::: The code at line 31 was first introduced by commit
:::::: f8928662d77653e9fdbd10c84f4be00641cba84f x86/power: Restore Key Locker's internal key from Sleep or Hibernate state
:::::: TO: Chang S. Bae <chang.seok.bae(a)intel.com>
:::::: CC: nanli2x <nanx.li(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[intel-lts:5.10/preempt-rt 11/15] drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:608:21: sparse: sparse: Using plain integer as NULL pointer
by kernel test robot
Hi Ranjan,
First bad commit (maybe != root cause):
tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head: 2aa7b06beff50959f21350fba872ba5b71380f11
commit: a31b0999302eab96320ef33799d98da09b917a37 [11/15] Merge tag 'lts-v5.10.78-yocto-211124T221321Z' into test-rt
config: i386-randconfig-s002-20211214 (https://download.01.org/0day-ci/archive/20211216/202112161100.2frQUouB-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/intel/linux-intel-lts/commit/a31b0999302eab96320ef3379...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/preempt-rt
git checkout a31b0999302eab96320ef33799d98da09b917a37
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/i915/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:608:21: sparse: sparse: Using plain integer as NULL pointer
--
drivers/gpu/drm/i915/gem/i915_gem_context.c: note: in included file (through drivers/gpu/drm/i915/gt/intel_gt_requests.h, drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c):
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:406:9: sparse: sparse: preprocessor token offsetof redefined
drivers/gpu/drm/i915/gem/i915_gem_context.c: note: in included file (through include/uapi/linux/posix_types.h, include/uapi/linux/types.h, include/linux/types.h, ...):
include/linux/stddef.h:17:9: sparse: this was the original definition
>> drivers/gpu/drm/i915/gem/i915_gem_context.c:1411:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct i915_gem_engines *e @@ got struct i915_gem_engines [noderef] __rcu *engines @@
drivers/gpu/drm/i915/gem/i915_gem_context.c:1411:26: sparse: expected struct i915_gem_engines *e
drivers/gpu/drm/i915/gem/i915_gem_context.c:1411:26: sparse: got struct i915_gem_engines [noderef] __rcu *engines
drivers/gpu/drm/i915/gem/i915_gem_context.c:1626:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct i915_address_space *vm @@ got struct i915_address_space [noderef] __rcu *vm @@
drivers/gpu/drm/i915/gem/i915_gem_context.c:1626:34: sparse: expected struct i915_address_space *vm
drivers/gpu/drm/i915/gem/i915_gem_context.c:1626:34: sparse: got struct i915_address_space [noderef] __rcu *vm
drivers/gpu/drm/i915/gem/i915_gem_context.c: note: in included file:
drivers/gpu/drm/i915/gem/selftests/mock_context.c:43:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct i915_address_space [noderef] __rcu *vm @@ got struct i915_address_space * @@
drivers/gpu/drm/i915/gem/selftests/mock_context.c:43:25: sparse: expected struct i915_address_space [noderef] __rcu *vm
drivers/gpu/drm/i915/gem/selftests/mock_context.c:43:25: sparse: got struct i915_address_space *
drivers/gpu/drm/i915/gem/selftests/mock_context.c:60:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct i915_address_space *vm @@ got struct i915_address_space [noderef] __rcu *vm @@
drivers/gpu/drm/i915/gem/selftests/mock_context.c:60:34: sparse: expected struct i915_address_space *vm
drivers/gpu/drm/i915/gem/selftests/mock_context.c:60:34: sparse: got struct i915_address_space [noderef] __rcu *vm
--
drivers/gpu/drm/i915/gt/iov/intel_iov.c: note: in included file:
>> drivers/gpu/drm/i915/gt/iov/./selftests/iov_live_selftest_ggtt.c:541:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *gsm @@ got void [noderef] __iomem * @@
drivers/gpu/drm/i915/gt/iov/./selftests/iov_live_selftest_ggtt.c:541:13: sparse: expected void *gsm
drivers/gpu/drm/i915/gt/iov/./selftests/iov_live_selftest_ggtt.c:541:13: sparse: got void [noderef] __iomem *
>> drivers/gpu/drm/i915/gt/iov/./selftests/iov_live_selftest_ggtt.c:591:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned long long [noderef] [usertype] __iomem *gsm @@ got void * @@
drivers/gpu/drm/i915/gt/iov/./selftests/iov_live_selftest_ggtt.c:591:13: sparse: expected unsigned long long [noderef] [usertype] __iomem *gsm
drivers/gpu/drm/i915/gt/iov/./selftests/iov_live_selftest_ggtt.c:591:13: sparse: got void *
vim +608 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 548
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 549 static int
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 550 eb_add_vma(struct i915_execbuffer *eb,
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 551 unsigned int *current_batch,
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 552 unsigned int i,
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 553 struct i915_vma *vma)
2889caa9232109a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2017-06-16 554 {
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 555 struct drm_i915_private *i915 = eb->i915;
c7c6e46f913bb3a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2017-08-16 556 struct drm_i915_gem_exec_object2 *entry = &eb->exec[i];
7d6236bb13352c2 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Chris Wilson 2020-03-03 557 struct eb_vma *ev = &eb->vma[i];
2889caa9232109a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2017-06-16 558
93159e12353c2a4 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Chris Wilson 2020-03-23 559 ev->vma = vma;
7d6236bb13352c2 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Chris Wilson 2020-03-03 560 ev->exec = entry;
7d6236bb13352c2 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Chris Wilson 2020-03-03 561 ev->flags = entry->flags;
7d6236bb13352c2 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Chris Wilson 2020-03-03 562
4d470f7359c4bf2 drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2017-06-29 563 if (eb->lut_size > 0) {
7d6236bb13352c2 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Chris Wilson 2020-03-03 564 ev->handle = entry->handle;
7d6236bb13352c2 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Chris Wilson 2020-03-03 565 hlist_add_head(&ev->node,
2889caa9232109a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2017-06-16 566 &eb->buckets[hash_32(entry->handle,
2889caa9232109a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2017-06-16 567 eb->lut_size)]);
4ff4b44cbb70c26 drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2017-06-16 568 }
59bfa1248e22d65 drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2016-08-04 569
2889caa9232109a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2017-06-16 570 if (entry->relocation_count)
7d6236bb13352c2 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Chris Wilson 2020-03-03 571 list_add_tail(&ev->reloc_link, &eb->relocs);
2889caa9232109a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2017-06-16 572
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 573 /*
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 574 * SNA is doing fancy tricks with compressing batch buffers, which leads
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 575 * to negative relocation deltas. Usually that works out ok since the
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 576 * relocate address is still positive, except when the batch is placed
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 577 * very low in the GTT. Ensure this doesn't happen.
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 578 *
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 579 * Note that actual hangs have only been observed on gen7, but for
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 580 * paranoia do it everywhere.
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 581 */
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 582 if (is_batch_buffer(eb, i)) {
827db9d8bb4a013 drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-21 583 if (entry->relocation_count &&
7d6236bb13352c2 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Chris Wilson 2020-03-03 584 !(ev->flags & EXEC_OBJECT_PINNED))
7d6236bb13352c2 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Chris Wilson 2020-03-03 585 ev->flags |= __EXEC_OBJECT_NEEDS_BIAS;
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 586 if (eb->reloc_cache.has_fence)
7d6236bb13352c2 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Chris Wilson 2020-03-03 587 ev->flags |= EXEC_OBJECT_NEEDS_FENCE;
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 588
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 589 eb->batches[*current_batch] = ev;
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 590
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 591 if (unlikely(ev->flags & EXEC_OBJECT_WRITE)) {
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 592 drm_dbg(&i915->drm,
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 593 "Attempting to use self-modifying batch buffer\n");
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 594 return -EINVAL;
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 595 }
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 596
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 597 if (range_overflows_t(u64,
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 598 eb->batch_start_offset,
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 599 eb->args->batch_len,
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 600 ev->vma->size)) {
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 601 drm_dbg(&i915->drm, "Attempting to use out-of-bounds batch\n");
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 602 return -EINVAL;
746c8f143afad7a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2018-06-10 603 }
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 604
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 605 if (eb->args->batch_len == 0)
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 606 eb->batch_len[*current_batch] = ev->vma->size -
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 607 eb->batch_start_offset;
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 @608 if (unlikely(eb->batch_len == 0)) { /* impossible! */
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 609 drm_dbg(&i915->drm, "Invalid batch length\n");
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 610 return -EINVAL;
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 611 }
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 612
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 613 ++*current_batch;
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 614 }
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 615
95eed6488ef2ab6 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Matthew Brost 2021-08-20 616 return 0;
2889caa9232109a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2017-06-16 617 }
2889caa9232109a drivers/gpu/drm/i915/i915_gem_execbuffer.c Chris Wilson 2017-06-16 618
:::::: The code at line 608 was first introduced by commit
:::::: 95eed6488ef2ab6d7947630f596a1764cbfa31bc drm/i915: Multi-BB execbuf
:::::: TO: Matthew Brost <matthew.brost(a)intel.com>
:::::: CC: nanli2x <nanx.li(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
drivers/pinctrl/bcm/pinctrl-bcm2835.c:412:14: warning: variable 'group' is used uninitialized whenever 'for' loop exits because its condition is false
by kernel test robot
Hi Jason,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5472f14a37421d1bca3dddf33cabd3bd6dbefbbc
commit: 29d45a642d4ea8de7e89b57f856046df7c3b219f pinctrl: bcm2835: Replace BUG with BUG_ON
date: 5 months ago
config: mips-randconfig-c004-20211214 (https://download.01.org/0day-ci/archive/20211214/202112142208.QW0tVv0m-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 29d45a642d4ea8de7e89b57f856046df7c3b219f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/pinctrl/bcm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pinctrl/bcm/pinctrl-bcm2835.c:412:14: warning: variable 'group' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
for (i = 0; i < BCM2835_NUM_IRQS; i++) {
^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/bcm/pinctrl-bcm2835.c:423:10: note: uninitialized use occurs here
switch (group) {
^~~~~
drivers/pinctrl/bcm/pinctrl-bcm2835.c:412:14: note: remove the condition if it is always true
for (i = 0; i < BCM2835_NUM_IRQS; i++) {
^~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/bcm/pinctrl-bcm2835.c:409:11: note: initialize the variable 'group' to silence this warning
int group;
^
= 0
1 warning generated.
vim +412 drivers/pinctrl/bcm/pinctrl-bcm2835.c
00445b5d5866c7b drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 402
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 403 static void bcm2835_gpio_irq_handler(struct irq_desc *desc)
00445b5d5866c7b drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 404 {
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 405 struct gpio_chip *chip = irq_desc_get_handler_data(desc);
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 406 struct bcm2835_pinctrl *pc = gpiochip_get_data(chip);
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 407 struct irq_chip *host_chip = irq_desc_get_chip(desc);
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 408 int irq = irq_desc_get_irq(desc);
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 409 int group;
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 410 int i;
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 411
73345a18d464b1b drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2019-08-12 @412 for (i = 0; i < BCM2835_NUM_IRQS; i++) {
73345a18d464b1b drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2019-08-12 413 if (chip->irq.parents[i] == irq) {
0d885e9da176ad3 drivers/pinctrl/bcm/pinctrl-bcm2835.c Thierry Reding 2017-07-20 414 group = i;
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 415 break;
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 416 }
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 417 }
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 418 /* This should not happen, every IRQ has a bank */
29d45a642d4ea8d drivers/pinctrl/bcm/pinctrl-bcm2835.c Jason Wang 2021-06-24 419 BUG_ON(i == BCM2835_NUM_IRQS);
00445b5d5866c7b drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 420
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 421 chained_irq_enter(host_chip, desc);
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 422
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 423 switch (group) {
00445b5d5866c7b drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 424 case 0: /* IRQ0 covers GPIOs 0-27 */
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 425 bcm2835_gpio_irq_handle_bank(pc, 0, 0x0fffffff);
00445b5d5866c7b drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 426 break;
00445b5d5866c7b drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 427 case 1: /* IRQ1 covers GPIOs 28-45 */
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 428 bcm2835_gpio_irq_handle_bank(pc, 0, 0xf0000000);
00445b5d5866c7b drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 429 bcm2835_gpio_irq_handle_bank(pc, 1, 0x00003fff);
00445b5d5866c7b drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 430 break;
b1d84a3d0a26c58 drivers/pinctrl/bcm/pinctrl-bcm2835.c Stefan Wahren 2020-02-08 431 case 2: /* IRQ2 covers GPIOs 46-57 */
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 432 bcm2835_gpio_irq_handle_bank(pc, 1, 0x003fc000);
00445b5d5866c7b drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 433 break;
00445b5d5866c7b drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 434 }
00445b5d5866c7b drivers/pinctrl/bcm/pinctrl-bcm2835.c Phil Elwell 2015-02-24 435
85ae9e512f437cd drivers/pinctrl/bcm/pinctrl-bcm2835.c Linus Walleij 2016-11-14 436 chained_irq_exit(host_chip, desc);
e1b2dc70cd5b00e drivers/pinctrl/pinctrl-bcm2835.c Simon Arlott 2012-09-27 437 }
e1b2dc70cd5b00e drivers/pinctrl/pinctrl-bcm2835.c Simon Arlott 2012-09-27 438
:::::: The code at line 412 was first introduced by commit
:::::: 73345a18d464b1b945b29f54f630ace6873344e2 pinctrl: bcm2835: Pass irqchip when adding gpiochip
:::::: TO: Linus Walleij <linus.walleij(a)linaro.org>
:::::: CC: Linus Walleij <linus.walleij(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[intel-lts:5.10/preempt-rt 10957/20232] drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1355:20: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head: 2aa7b06beff50959f21350fba872ba5b71380f11
commit: 4a13d96daeb2f402d35b53c718b83609e65d4b3d [10957/20232] v4l: subdev: Add [GS]_ROUTING ioctls and operations
config: sparc64-randconfig-s031-20211214 (https://download.01.org/0day-ci/archive/20211216/202112161111.Gk7477fx-lk...)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/intel/linux-intel-lts/commit/4a13d96daeb2f402d35b53c71...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/preempt-rt
git checkout 4a13d96daeb2f402d35b53c718b83609e65d4b3d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 SHELL=/bin/bash drivers/media/v4l2-core/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1355:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct v4l2_subdev_route *routes @@ got void [noderef] __user * @@
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1355:20: sparse: expected struct v4l2_subdev_route *routes
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1355:20: sparse: got void [noderef] __user *
>> drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1357:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *addr @@ got struct v4l2_subdev_route *routes @@
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1357:26: sparse: expected void const [noderef] __user *addr
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1357:26: sparse: got struct v4l2_subdev_route *routes
>> drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1593:55: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct v4l2_subdev_routing *kp @@ got void [noderef] __user *[addressable] new_p64 @@
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1593:55: sparse: expected struct v4l2_subdev_routing *kp
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1593:55: sparse: got void [noderef] __user *[addressable] new_p64
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1764:55: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct v4l2_subdev_routing *kp @@ got void [noderef] __user *[addressable] new_p64 @@
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1764:55: sparse: expected struct v4l2_subdev_routing *kp
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1764:55: sparse: got void [noderef] __user *[addressable] new_p64
vim +1355 drivers/media/v4l2-core/v4l2-compat-ioctl32.c
1342
1343 static int get_v4l2_subdev_routing(struct v4l2_subdev_routing *kp,
1344 struct v4l2_subdev_routing32 __user *up)
1345 {
1346 compat_caddr_t p;
1347
1348 if (!access_ok(up, sizeof(*up)) ||
1349 get_user(p, &up->routes) ||
1350 get_user(kp->num_routes, &up->num_routes) ||
1351 !access_ok(up->reserved, sizeof(*up->reserved)) ||
1352 kp->num_routes > U32_MAX / sizeof(*kp->routes))
1353 return -EFAULT;
1354
> 1355 kp->routes = compat_ptr(p);
1356
> 1357 if (!access_ok(kp->routes,
1358 kp->num_routes * (u32)sizeof(*kp->routes)))
1359 return -EFAULT;
1360
1361 return 0;
1362 }
1363
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week