drivers/pci/controller/dwc/pcie-spear13xx.c:252:34: warning: unused variable 'spear13xx_pcie_of_match'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1a4431a5db2bf800c647ee0ed87f2727b8d6c29c
commit: ea29b20a828511de3348334e529a3d046a180416 init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
date: 3 days ago
config: s390-randconfig-r003-20210316 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 50c7504a93fdb90c26870db8c8ea7add895c7725)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-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 ea29b20a828511de3348334e529a3d046a180416
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
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 >>):
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
^
In file included from drivers/pci/controller/dwc/pcie-spear13xx.c:17:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/pci/controller/dwc/pcie-spear13xx.c:17:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/pci/controller/dwc/pcie-spear13xx.c:17:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/pci/controller/dwc/pcie-spear13xx.c:17:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/pci/controller/dwc/pcie-spear13xx.c:17:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/pci/controller/dwc/pcie-spear13xx.c:252:34: warning: unused variable 'spear13xx_pcie_of_match' [-Wunused-const-variable]
static const struct of_device_id spear13xx_pcie_of_match[] = {
^
21 warnings generated.
--
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:12:
In file included from include/linux/netdevice.h:37:
In file included from include/net/net_namespace.h:39:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:12:
In file included from include/linux/netdevice.h:37:
In file included from include/net/net_namespace.h:39:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:12:
In file included from include/linux/netdevice.h:37:
In file included from include/net/net_namespace.h:39:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:12:
In file included from include/linux/netdevice.h:37:
In file included from include/net/net_namespace.h:39:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:683:41: warning: implicit conversion from 'unsigned long' to 'int' changes value from 18446744073709551584 to -32 [-Wconstant-conversion]
mvpp2_pools[MVPP2_BM_SHORT].pkt_size = MVPP2_BM_SHORT_PKT_SIZE;
~ ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2/mvpp2.h:948:33: note: expanded from macro 'MVPP2_BM_SHORT_PKT_SIZE'
#define MVPP2_BM_SHORT_PKT_SIZE MVPP2_RX_MAX_PKT_SIZE(MVPP2_BM_SHORT_FRAME_SIZE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/marvell/mvpp2/mvpp2.h:844:37: note: expanded from macro 'MVPP2_RX_MAX_PKT_SIZE'
((total_size) - MVPP2_SKB_HEADROOM - MVPP2_SKB_SHINFO_SIZE)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
21 warnings generated.
vim +/spear13xx_pcie_of_match +252 drivers/pci/controller/dwc/pcie-spear13xx.c
51b66a6ce12570 drivers/pci/host/pcie-spear13xx.c Pratyush Anand 2014-02-11 251
51b66a6ce12570 drivers/pci/host/pcie-spear13xx.c Pratyush Anand 2014-02-11 @252 static const struct of_device_id spear13xx_pcie_of_match[] = {
51b66a6ce12570 drivers/pci/host/pcie-spear13xx.c Pratyush Anand 2014-02-11 253 { .compatible = "st,spear1340-pcie", },
51b66a6ce12570 drivers/pci/host/pcie-spear13xx.c Pratyush Anand 2014-02-11 254 {},
51b66a6ce12570 drivers/pci/host/pcie-spear13xx.c Pratyush Anand 2014-02-11 255 };
51b66a6ce12570 drivers/pci/host/pcie-spear13xx.c Pratyush Anand 2014-02-11 256
:::::: The code at line 252 was first introduced by commit
:::::: 51b66a6ce12570e5ee1a249c811f7f2d74814a43 PCI: spear: Add PCIe driver for ST Microelectronics SPEAr13xx
:::::: TO: Pratyush Anand <pratyush.anand(a)st.com>
:::::: CC: Viresh Kumar <viresh.kumar(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[brauner:cache_files 1/1] fs/cachefiles/bind.c:119:2: warning: variable 'root' is used uninitialized whenever 'if' condition is true
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git cache_files
head: c9c53507520b2eb523a0ac7102a89bf3b960e4be
commit: c9c53507520b2eb523a0ac7102a89bf3b960e4be [1/1] cachefiles: do not yet allow on idmapped mounts
config: powerpc64-randconfig-r005-20210316 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 50c7504a93fdb90c26870db8c8ea7add895c7725)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/commit/...
git remote add brauner https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
git fetch --no-tags brauner cache_files
git checkout c9c53507520b2eb523a0ac7102a89bf3b960e4be
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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/cachefiles/bind.c:119:2: warning: variable 'root' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (mnt_user_ns(path.mnt) != &init_user_ns)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/cachefiles/bind.c:247:7: note: uninitialized use occurs here
dput(root);
^~~~
fs/cachefiles/bind.c:119:2: note: remove the 'if' if its condition is always false
if (mnt_user_ns(path.mnt) != &init_user_ns)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
fs/cachefiles/bind.c:86:44: note: initialize the variable 'root' to silence this warning
struct dentry *graveyard, *cachedir, *root;
^
= NULL
1 warning generated.
vim +119 fs/cachefiles/bind.c
77
78 /*
79 * add a cache
80 */
81 static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)
82 {
83 struct cachefiles_object *fsdef;
84 struct path path;
85 struct kstatfs stats;
86 struct dentry *graveyard, *cachedir, *root;
87 const struct cred *saved_cred;
88 int ret;
89
90 _enter("");
91
92 /* we want to work under the module's security ID */
93 ret = cachefiles_get_security_ID(cache);
94 if (ret < 0)
95 return ret;
96
97 cachefiles_begin_secure(cache, &saved_cred);
98
99 /* allocate the root index object */
100 ret = -ENOMEM;
101
102 fsdef = kmem_cache_alloc(cachefiles_object_jar, GFP_KERNEL);
103 if (!fsdef)
104 goto error_root_object;
105
106 ASSERTCMP(fsdef->backer, ==, NULL);
107
108 atomic_set(&fsdef->usage, 1);
109 fsdef->type = FSCACHE_COOKIE_TYPE_INDEX;
110
111 _debug("- fsdef %p", fsdef);
112
113 /* look up the directory at the root of the cache */
114 ret = kern_path(cache->rootdirname, LOOKUP_DIRECTORY, &path);
115 if (ret < 0)
116 goto error_open_root;
117
118 ret = -EINVAL;
> 119 if (mnt_user_ns(path.mnt) != &init_user_ns)
120 goto error_unsupported;
121
122 cache->mnt = path.mnt;
123 root = path.dentry;
124
125 /* check parameters */
126 ret = -EOPNOTSUPP;
127 if (d_is_negative(root) ||
128 !d_backing_inode(root)->i_op->lookup ||
129 !d_backing_inode(root)->i_op->mkdir ||
130 !(d_backing_inode(root)->i_opflags & IOP_XATTR) ||
131 !root->d_sb->s_op->statfs ||
132 !root->d_sb->s_op->sync_fs)
133 goto error_unsupported;
134
135 ret = -EROFS;
136 if (sb_rdonly(root->d_sb))
137 goto error_unsupported;
138
139 /* determine the security of the on-disk cache as this governs
140 * security ID of files we create */
141 ret = cachefiles_determine_cache_security(cache, root, &saved_cred);
142 if (ret < 0)
143 goto error_unsupported;
144
145 /* get the cache size and blocksize */
146 ret = vfs_statfs(&path, &stats);
147 if (ret < 0)
148 goto error_unsupported;
149
150 ret = -ERANGE;
151 if (stats.f_bsize <= 0)
152 goto error_unsupported;
153
154 ret = -EOPNOTSUPP;
155 if (stats.f_bsize > PAGE_SIZE)
156 goto error_unsupported;
157
158 cache->bsize = stats.f_bsize;
159 cache->bshift = 0;
160 if (stats.f_bsize < PAGE_SIZE)
161 cache->bshift = PAGE_SHIFT - ilog2(stats.f_bsize);
162
163 _debug("blksize %u (shift %u)",
164 cache->bsize, cache->bshift);
165
166 _debug("size %llu, avail %llu",
167 (unsigned long long) stats.f_blocks,
168 (unsigned long long) stats.f_bavail);
169
170 /* set up caching limits */
171 do_div(stats.f_files, 100);
172 cache->fstop = stats.f_files * cache->fstop_percent;
173 cache->fcull = stats.f_files * cache->fcull_percent;
174 cache->frun = stats.f_files * cache->frun_percent;
175
176 _debug("limits {%llu,%llu,%llu} files",
177 (unsigned long long) cache->frun,
178 (unsigned long long) cache->fcull,
179 (unsigned long long) cache->fstop);
180
181 stats.f_blocks >>= cache->bshift;
182 do_div(stats.f_blocks, 100);
183 cache->bstop = stats.f_blocks * cache->bstop_percent;
184 cache->bcull = stats.f_blocks * cache->bcull_percent;
185 cache->brun = stats.f_blocks * cache->brun_percent;
186
187 _debug("limits {%llu,%llu,%llu} blocks",
188 (unsigned long long) cache->brun,
189 (unsigned long long) cache->bcull,
190 (unsigned long long) cache->bstop);
191
192 /* get the cache directory and check its type */
193 cachedir = cachefiles_get_directory(cache, root, "cache");
194 if (IS_ERR(cachedir)) {
195 ret = PTR_ERR(cachedir);
196 goto error_unsupported;
197 }
198
199 fsdef->dentry = cachedir;
200 fsdef->fscache.cookie = NULL;
201
202 ret = cachefiles_check_object_type(fsdef);
203 if (ret < 0)
204 goto error_unsupported;
205
206 /* get the graveyard directory */
207 graveyard = cachefiles_get_directory(cache, root, "graveyard");
208 if (IS_ERR(graveyard)) {
209 ret = PTR_ERR(graveyard);
210 goto error_unsupported;
211 }
212
213 cache->graveyard = graveyard;
214
215 /* publish the cache */
216 fscache_init_cache(&cache->cache,
217 &cachefiles_cache_ops,
218 "%s",
219 fsdef->dentry->d_sb->s_id);
220
221 fscache_object_init(&fsdef->fscache, &fscache_fsdef_index,
222 &cache->cache);
223
224 ret = fscache_add_cache(&cache->cache, &fsdef->fscache, cache->tag);
225 if (ret < 0)
226 goto error_add_cache;
227
228 /* done */
229 set_bit(CACHEFILES_READY, &cache->flags);
230 dput(root);
231
232 pr_info("File cache on %s registered\n", cache->cache.identifier);
233
234 /* check how much space the cache has */
235 cachefiles_has_space(cache, 0, 0);
236 cachefiles_end_secure(cache, saved_cred);
237 return 0;
238
239 error_add_cache:
240 dput(cache->graveyard);
241 cache->graveyard = NULL;
242 error_unsupported:
243 mntput(cache->mnt);
244 cache->mnt = NULL;
245 dput(fsdef->dentry);
246 fsdef->dentry = NULL;
247 dput(root);
248 error_open_root:
249 kmem_cache_free(cachefiles_object_jar, fsdef);
250 error_root_object:
251 cachefiles_end_secure(cache, saved_cred);
252 pr_err("Failed to register: %d\n", ret);
253 return ret;
254 }
255
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[weiny2:tip-pks-v4.6-5.12-rc 25/32] arch/x86/mm/fault.c:1220:6: error: redefinition of 'handle_pks'
by kernel test robot
tree: https://github.com/weiny2/linux-kernel.git tip-pks-v4.6-5.12-rc
head: 0a042414603935649c022b18cc1fdef0e7f2d3f3
commit: 25071b452a26dedd517b374ed5baf42970361e0a [25/32] <WARN SUP_PKEYS change>: kmap: Add stray access protection for device pages
config: x86_64-randconfig-m001-20210316 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/weiny2/linux-kernel/commit/25071b452a26dedd517b374ed5b...
git remote add weiny2 https://github.com/weiny2/linux-kernel.git
git fetch --no-tags weiny2 tip-pks-v4.6-5.12-rc
git checkout 25071b452a26dedd517b374ed5baf42970361e0a
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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/mm/fault.c:1220:6: error: redefinition of 'handle_pks'
1220 | bool handle_pks(struct pt_regs *regs, unsigned long error_code,
| ^~~~~~~~~~
In file included from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:58,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/x86/mm/fault.c:7:
arch/x86/include/asm/processor.h:898:20: note: previous definition of 'handle_pks' was here
898 | static inline bool handle_pks(struct pt_regs *regs, unsigned long error_code,
| ^~~~~~~~~~
arch/x86/mm/fault.c: In function 'handle_pks':
arch/x86/mm/fault.c:1241:14: error: implicit declaration of function 'extended_pt_regs' [-Werror=implicit-function-declaration]
1241 | ept_regs = extended_pt_regs(regs);
| ^~~~~~~~~~~~~~~~
arch/x86/mm/fault.c:1241:12: warning: assignment to 'struct extended_pt_regs *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
1241 | ept_regs = extended_pt_regs(regs);
| ^
arch/x86/mm/fault.c:1242:27: error: dereferencing pointer to incomplete type 'struct extended_pt_regs'
1242 | update_pkey_val(ept_regs->thread_pkrs, pkey, 0);
| ^~
cc1: some warnings being treated as errors
vim +/handle_pks +1220 arch/x86/mm/fault.c
1218
1219 #ifdef CONFIG_ARCH_HAS_SUPERVISOR_PKEYS
> 1220 bool handle_pks(struct pt_regs *regs, unsigned long error_code,
1221 unsigned long address)
1222 {
1223 if (error_code & X86_PF_PK) {
1224 struct extended_pt_regs *ept_regs;
1225 struct page *page;
1226 int pkey;
1227
1228 page = virt_to_page(address);
1229
1230 if (!page || !page_is_globally_mapped(page))
1231 return false;
1232
1233 if (pks_mode == PKS_MODE_STRICT)
1234 return false;
1235
1236 WARN_ONCE(pks_mode == PKS_MODE_RELAXED,
1237 "PKS fault on globally mapped device page 0x%lu pfn %lu",
1238 address, page_to_pfn(page));
1239
1240 pkey = dev_get_dev_pkey();
1241 ept_regs = extended_pt_regs(regs);
1242 update_pkey_val(ept_regs->thread_pkrs, pkey, 0);
1243 return true;
1244 }
1245
1246 return false;
1247 }
1248 #endif
1249
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[weiny2:tip-pks-v4.6-5.12-rc 25/32] arch/x86/mm/fault.c:1220:6: error: redefinition of 'handle_pks'
by kernel test robot
tree: https://github.com/weiny2/linux-kernel.git tip-pks-v4.6-5.12-rc
head: 0a042414603935649c022b18cc1fdef0e7f2d3f3
commit: 25071b452a26dedd517b374ed5baf42970361e0a [25/32] <WARN SUP_PKEYS change>: kmap: Add stray access protection for device pages
config: x86_64-randconfig-a006-20210316 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 50c7504a93fdb90c26870db8c8ea7add895c7725)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/weiny2/linux-kernel/commit/25071b452a26dedd517b374ed5b...
git remote add weiny2 https://github.com/weiny2/linux-kernel.git
git fetch --no-tags weiny2 tip-pks-v4.6-5.12-rc
git checkout 25071b452a26dedd517b374ed5baf42970361e0a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
In file included from arch/x86/mm/fault.c:20:
include/linux/efi.h:1093:34: warning: passing 1-byte aligned argument to 4-byte aligned parameter 2 of 'get_var' may result in an unaligned pointer access [-Walign-mismatch]
status = get_var(L"SecureBoot", &EFI_GLOBAL_VARIABLE_GUID, NULL, &size,
^
include/linux/efi.h:1101:24: warning: passing 1-byte aligned argument to 4-byte aligned parameter 2 of 'get_var' may result in an unaligned pointer access [-Walign-mismatch]
get_var(L"SetupMode", &EFI_GLOBAL_VARIABLE_GUID, NULL, &size, &setupmode);
^
>> arch/x86/mm/fault.c:1220:6: error: redefinition of 'handle_pks'
bool handle_pks(struct pt_regs *regs, unsigned long error_code,
^
arch/x86/include/asm/processor.h:898:20: note: previous definition is here
static inline bool handle_pks(struct pt_regs *regs, unsigned long error_code,
^
arch/x86/mm/fault.c:1241:14: error: implicit declaration of function 'extended_pt_regs' [-Werror,-Wimplicit-function-declaration]
ept_regs = extended_pt_regs(regs);
^
arch/x86/mm/fault.c:1241:12: warning: incompatible integer to pointer conversion assigning to 'struct extended_pt_regs *' from 'int' [-Wint-conversion]
ept_regs = extended_pt_regs(regs);
^ ~~~~~~~~~~~~~~~~~~~~~~
arch/x86/mm/fault.c:1242:27: error: incomplete definition of type 'struct extended_pt_regs'
update_pkey_val(ept_regs->thread_pkrs, pkey, 0);
~~~~~~~~^
arch/x86/mm/fault.c:1224:10: note: forward declaration of 'struct extended_pt_regs'
struct extended_pt_regs *ept_regs;
^
3 warnings and 3 errors generated.
vim +/handle_pks +1220 arch/x86/mm/fault.c
1218
1219 #ifdef CONFIG_ARCH_HAS_SUPERVISOR_PKEYS
> 1220 bool handle_pks(struct pt_regs *regs, unsigned long error_code,
1221 unsigned long address)
1222 {
1223 if (error_code & X86_PF_PK) {
1224 struct extended_pt_regs *ept_regs;
1225 struct page *page;
1226 int pkey;
1227
1228 page = virt_to_page(address);
1229
1230 if (!page || !page_is_globally_mapped(page))
1231 return false;
1232
1233 if (pks_mode == PKS_MODE_STRICT)
1234 return false;
1235
1236 WARN_ONCE(pks_mode == PKS_MODE_RELAXED,
1237 "PKS fault on globally mapped device page 0x%lu pfn %lu",
1238 address, page_to_pfn(page));
1239
1240 pkey = dev_get_dev_pkey();
1241 ept_regs = extended_pt_regs(regs);
1242 update_pkey_val(ept_regs->thread_pkrs, pkey, 0);
1243 return true;
1244 }
1245
1246 return false;
1247 }
1248 #endif
1249
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
drivers/usb/host/ohci-hcd.c:1318 ohci_hcd_mod_init() warn: ignoring unreachable code.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1a4431a5db2bf800c647ee0ed87f2727b8d6c29c
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
config: arm-randconfig-m031-20210316 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/usb/host/ohci-hcd.c:1318 ohci_hcd_mod_init() warn: ignoring unreachable code.
vim +1318 drivers/usb/host/ohci-hcd.c
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 1313
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1314 return retval;
^^^^^^^^^^^^^
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1315
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1316 /* Error path */
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 1317 #ifdef TMIO_OHCI_DRIVER
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 @1318 platform_driver_unregister(&TMIO_OHCI_DRIVER);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unreachable
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 1319 error_tmio:
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 1320 #endif
3ee38d8bf46b36 Ben Dooks 2008-06-08 1321 #ifdef SM501_OHCI_DRIVER
78c73414f4f674 Dmitry Eremin-Solenikov 2008-10-08 1322 platform_driver_unregister(&SM501_OHCI_DRIVER);
3ee38d8bf46b36 Ben Dooks 2008-06-08 1323 error_sm501:
3ee38d8bf46b36 Ben Dooks 2008-06-08 1324 #endif
de44743b033942 Benjamin Herrenschmidt 2007-01-15 1325 #ifdef SA1111_DRIVER
de44743b033942 Benjamin Herrenschmidt 2007-01-15 1326 sa1111_driver_unregister(&SA1111_DRIVER);
de44743b033942 Benjamin Herrenschmidt 2007-01-15 1327 error_sa1111:
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1328 #endif
495a678fc62e85 Sylvain Munaut 2006-12-13 1329 #ifdef OF_PLATFORM_DRIVER
d35fb6417655eb Grant Likely 2011-02-22 1330 platform_driver_unregister(&OF_PLATFORM_DRIVER);
de44743b033942 Benjamin Herrenschmidt 2007-01-15 1331 error_of_platform:
495a678fc62e85 Sylvain Munaut 2006-12-13 1332 #endif
6a6c957eba2081 Geoff Levand 2007-01-15 1333 #ifdef PS3_SYSTEM_BUS_DRIVER
7a4eb7fd50d4df Geoff Levand 2007-06-05 1334 ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
6a6c957eba2081 Geoff Levand 2007-01-15 1335 error_ps3:
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1336 #endif
684c19e0d95f46 Tony Jones 2007-09-11 1337 debugfs_remove(ohci_debug_root);
684c19e0d95f46 Tony Jones 2007-09-11 1338 ohci_debug_root = NULL;
684c19e0d95f46 Tony Jones 2007-09-11 1339
9beeee6584b9aa Alan Stern 2008-10-02 1340 clear_bit(USB_OHCI_LOADED, &usb_hcds_loaded);
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1341 return retval;
5e16fabe5dbcff Sylvain Munaut 2006-12-13 1342 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_599' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_llc_msg)
by kernel test robot
Hi Will,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1a4431a5db2bf800c647ee0ed87f2727b8d6c29c
commit: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
date: 8 months ago
config: arm-randconfig-r036-20210316 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.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/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 eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 >>):
In file included from <command-line>:
net/smc/smc_llc.c: In function 'smc_llc_add_pending_send':
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_599' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_llc_msg)
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_llc.c:348:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
348 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_600' declared with attribute error: must adapt SMC_WR_TX_SIZE to sizeof(struct smc_llc_msg); if not all smc_wr upper layer protocols use the same message size any more, must start to set link->wr_tx_sges[i].length on each individual smc_wr_tx_send()
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_llc.c:351:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
351 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
--
In file included from <command-line>:
In function 'smc_cdc_add_pending_send',
inlined from 'smc_cdc_msg_send' at net/smc/smc_cdc.c:101:2:
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_577' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_cdc_msg)
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_cdc.c:78:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
78 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_578' declared with attribute error: must adapt SMC_WR_TX_SIZE to sizeof(struct smc_cdc_msg); if not all smc_wr upper layer protocols use the same message size any more, must start to set link->wr_tx_sges[i].length on each individual smc_wr_tx_send()
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_cdc.c:81:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
81 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
--
In file included from <command-line>:
drivers/scsi/qla2xxx/qla_os.c: In function 'qla2x00_module_init':
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_518' declared with attribute error: BUILD_BUG_ON failed: sizeof(cmd_a64_entry_t) != 64
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7825:2: note: in expansion of macro 'BUILD_BUG_ON'
7825 | BUILD_BUG_ON(sizeof(cmd_a64_entry_t) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_519' declared with attribute error: BUILD_BUG_ON failed: sizeof(cmd_entry_t) != 64
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7826:2: note: in expansion of macro 'BUILD_BUG_ON'
7826 | BUILD_BUG_ON(sizeof(cmd_entry_t) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_523' declared with attribute error: BUILD_BUG_ON failed: sizeof(mrk_entry_t) != 64
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7830:2: note: in expansion of macro 'BUILD_BUG_ON'
7830 | BUILD_BUG_ON(sizeof(mrk_entry_t) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_524' declared with attribute error: BUILD_BUG_ON failed: sizeof(ms_iocb_entry_t) != 64
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7831:2: note: in expansion of macro 'BUILD_BUG_ON'
7831 | BUILD_BUG_ON(sizeof(ms_iocb_entry_t) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_525' declared with attribute error: BUILD_BUG_ON failed: sizeof(request_t) != 64
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7832:2: note: in expansion of macro 'BUILD_BUG_ON'
7832 | BUILD_BUG_ON(sizeof(request_t) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_544' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct ctio_crc2_to_fw) != 64
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7851:2: note: in expansion of macro 'BUILD_BUG_ON'
7851 | BUILD_BUG_ON(sizeof(struct ctio_crc2_to_fw) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_547' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct device_reg_2xxx) != 256
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7854:2: note: in expansion of macro 'BUILD_BUG_ON'
7854 | BUILD_BUG_ON(sizeof(struct device_reg_2xxx) != 256);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_553' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct imm_ntfy_from_isp) != 64
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7860:2: note: in expansion of macro 'BUILD_BUG_ON'
7860 | BUILD_BUG_ON(sizeof(struct imm_ntfy_from_isp) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_557' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct mbx_entry) != 64
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7864:2: note: in expansion of macro 'BUILD_BUG_ON'
7864 | BUILD_BUG_ON(sizeof(struct mbx_entry) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_563' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct pt_ls4_rx_unsol) != 64
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7870:2: note: in expansion of macro 'BUILD_BUG_ON'
7870 | BUILD_BUG_ON(sizeof(struct pt_ls4_rx_unsol) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_565' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct qla2100_fw_dump) != 123634
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7872:2: note: in expansion of macro 'BUILD_BUG_ON'
7872 | BUILD_BUG_ON(sizeof(struct qla2100_fw_dump) != 123634);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_587' declared with attribute error: BUILD_BUG_ON failed: sizeof(struct sts_entry_24xx) != 64
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7894:2: note: in expansion of macro 'BUILD_BUG_ON'
7894 | BUILD_BUG_ON(sizeof(struct sts_entry_24xx) != 64);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:338:38: error: call to '__compiletime_assert_601' declared with attribute error: BUILD_BUG_ON failed: sizeof(target_id_t) != 2
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:319:4: note: in definition of macro '__compiletime_assert'
319 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:338:2: note: in expansion of macro '_compiletime_assert'
338 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/qla2xxx/qla_os.c:7908:2: note: in expansion of macro 'BUILD_BUG_ON'
7908 | BUILD_BUG_ON(sizeof(target_id_t) != 2);
| ^~~~~~~~~~~~
..
vim +/__compiletime_assert_599 +338 include/linux/compiler_types.h
324
325 #define _compiletime_assert(condition, msg, prefix, suffix) \
326 __compiletime_assert(condition, msg, prefix, suffix)
327
328 /**
329 * compiletime_assert - break build and emit msg if condition is false
330 * @condition: a compile-time constant condition to check
331 * @msg: a message to emit if condition is false
332 *
333 * In tradition of POSIX assert, this macro will break the build if the
334 * supplied condition is *false*, emitting the supplied error message if the
335 * compiler has support to do so.
336 */
337 #define compiletime_assert(condition, msg) \
> 338 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
339
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[tip:x86/cpu 2/3] arch/x86/kernel/alternative.c:96:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+10' is out of bounds.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/cpu
head: 301cddc21a157a3072d789a3097857202e550a24
commit: a89dfde3dc3c2dbf56910af75e2d8b11ec5308f6 [2/3] x86: Remove dynamic NOP selection
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> arch/x86/kernel/alternative.c:96:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+10' is out of bounds. [pointerOutOfBounds]
x86nops + 1 + 2 + 3 + 4,
^
arch/x86/kernel/alternative.c:97:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+15' is out of bounds. [pointerOutOfBounds]
x86nops + 1 + 2 + 3 + 4 + 5,
^
arch/x86/kernel/alternative.c:98:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+21' is out of bounds. [pointerOutOfBounds]
x86nops + 1 + 2 + 3 + 4 + 5 + 6,
^
arch/x86/kernel/alternative.c:99:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+28' is out of bounds. [pointerOutOfBounds]
x86nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
^
>> arch/x86/kernel/ftrace.c:304:7: warning: union member 'ftrace_op_code_union::code' is never used. [unusedStructMember]
char code[OP_REF_SIZE];
^
vim +96 arch/x86/kernel/alternative.c
88
89 const unsigned char * const x86_nops[ASM_NOP_MAX+1] =
90 {
91 NULL,
92 x86nops,
93 x86nops + 1,
94 x86nops + 1 + 2,
95 x86nops + 1 + 2 + 3,
> 96 x86nops + 1 + 2 + 3 + 4,
97 x86nops + 1 + 2 + 3 + 4 + 5,
98 x86nops + 1 + 2 + 3 + 4 + 5 + 6,
99 x86nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
100 };
101
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH] gcov: fail build on gcov_info size mismatch
by kernel test robot
Hi Peter,
I love your patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on linus/master hnaz-linux-mm/master v5.12-rc2 next-20210311]
[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/Peter-Oberparleiter/gcov-fail-bu...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a74e6a014c9d4d4161061f770c9b4f98372ac778
config: nds32-randconfig-s032-20210311 (attached as .config)
compiler: nds32le-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
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://github.com/0day-ci/linux/commit/01c5ab69a25e3cdfeff9cccf0f1fae26b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Peter-Oberparleiter/gcov-fail-build-on-gcov_info-size-mismatch/20210311-211208
git checkout 01c5ab69a25e3cdfeff9cccf0f1fae26b583cc39
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=nds32
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 >>):
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
>> kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
kernel/gcov/geninfosize.sh: 13: [: =: unexpected operator
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[hch-misc:vgaarb-cleanups 8/8] include/linux/vgaarb.h:86:2: error: void function 'vga_client_unregister' should not return a value
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git vgaarb-cleanups
head: 1b5803735663928e9ddb2ca5ad9d4602d5ac18d0
commit: 1b5803735663928e9ddb2ca5ad9d4602d5ac18d0 [8/8] vgaarb: replace vga_set_legacy_decoding with a flag to vga_client_{,un}register
config: powerpc-randconfig-r031-20210316 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 50c7504a93fdb90c26870db8c8ea7add895c7725)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc vgaarb-cleanups
git checkout 1b5803735663928e9ddb2ca5ad9d4602d5ac18d0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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 >>):
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:59:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/drm_crtc_helper.c:36:
In file included from include/drm/drm_atomic.h:31:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:5:
In file included from include/linux/kgdb.h:19:
In file included from include/linux/kprobes.h:29:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:63:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/drm_crtc_helper.c:36:
In file included from include/drm/drm_atomic.h:31:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:5:
In file included from include/linux/kgdb.h:19:
In file included from include/linux/kprobes.h:29:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:67:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/drm_crtc_helper.c:36:
In file included from include/drm/drm_atomic.h:31:
In file included from include/drm/drm_crtc.h:31:
In file included from include/linux/fb.h:5:
In file included from include/linux/kgdb.h:19:
In file included from include/linux/kprobes.h:29:
In file included from include/linux/ftrace.h:10:
In file included from include/linux/trace_recursion.h:5:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:71:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/drm_crtc_helper.c:45:
In file included from include/drm/drm_fb_helper.h:39:
>> include/linux/vgaarb.h:86:2: error: void function 'vga_client_unregister' should not return a value [-Wreturn-type]
return 0;
^ ~
6 warnings and 1 error generated.
--
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/drm_irq.c:56:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:114:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/drm_irq.c:56:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:118:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/drm_irq.c:56:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:122:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/drm_irq.c:56:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:126:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/drm_irq.c:56:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:130:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/drm_irq.c:58:
>> include/linux/vgaarb.h:86:2: error: void function 'vga_client_unregister' should not return a value [-Wreturn-type]
return 0;
^ ~
>> drivers/gpu/drm/drm_irq.c:143:47: error: too many arguments provided to function-like macro invocation
vga_client_unregister(to_pci_dev(dev->dev, 0));
^
include/linux/pci.h:522:9: note: macro 'to_pci_dev' defined here
#define to_pci_dev(n) container_of(n, struct pci_dev, dev)
^
>> drivers/gpu/drm/drm_irq.c:143:26: error: use of undeclared identifier 'to_pci_dev'
vga_client_unregister(to_pci_dev(dev->dev, 0));
^
drivers/gpu/drm/drm_irq.c:206:46: error: too many arguments provided to function-like macro invocation
vga_client_unregister(to_pci_dev(dev->dev, 0));
^
include/linux/pci.h:522:9: note: macro 'to_pci_dev' defined here
#define to_pci_dev(n) container_of(n, struct pci_dev, dev)
^
drivers/gpu/drm/drm_irq.c:206:25: error: use of undeclared identifier 'to_pci_dev'
vga_client_unregister(to_pci_dev(dev->dev, 0));
^
6 warnings and 5 errors generated.
--
In file included from drivers/gpu/drm/vkms/vkms_drv.c:14:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:138:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/vkms/vkms_drv.c:14:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:142:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/vkms/vkms_drv.c:14:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:146:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/vkms/vkms_drv.c:14:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:150:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/vkms/vkms_drv.c:14:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:154:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/vkms/vkms_drv.c:14:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:158:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/gpu/drm/vkms/vkms_drv.c:20:
In file included from include/drm/drm_fb_helper.h:39:
>> include/linux/vgaarb.h:86:2: error: void function 'vga_client_unregister' should not return a value [-Wreturn-type]
return 0;
^ ~
drivers/gpu/drm/vkms/vkms_drv.c:155:9: warning: shift count >= width of type [-Wshift-count-overflow]
DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
7 warnings and 1 error generated.
vim +/vga_client_unregister +86 include/linux/vgaarb.h
48
49 #ifdef CONFIG_VGA_ARB
50 int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible);
51 void vga_put(struct pci_dev *pdev, unsigned int rsrc);
52 struct pci_dev *vga_default_device(void);
53 void vga_set_default_device(struct pci_dev *pdev);
54 int vga_remove_vgacon(struct pci_dev *pdev);
55 int vga_client_register(struct pci_dev *pdev, unsigned int flags,
56 unsigned int (*set_decode)(struct pci_dev *pdev, bool state));
57 void vga_client_unregister(struct pci_dev *pdev, unsigned int flags);
58 #else /* CONFIG_VGA_ARB */
59 static inline int vga_get(struct pci_dev *pdev, unsigned int rsrc,
60 int interruptible)
61 {
62 return 0;
63 }
64 static inline void vga_put(struct pci_dev *pdev, unsigned int rsrc)
65 {
66 }
67 static inline struct pci_dev *vga_default_device(void)
68 {
69 return NULL;
70 }
71 static inline void vga_set_default_device(struct pci_dev *pdev)
72 {
73 }
74 static inline int vga_remove_vgacon(struct pci_dev *pdev)
75 {
76 return 0;
77 }
78 static inline int vga_client_register(struct pci_dev *pdev, unsigned int flags,
79 unsigned int (*set_decode)(struct pci_dev *pdev, bool state))
80 {
81 return 0;
82 }
83 static inline void vga_client_unregister(struct pci_dev *pdev,
84 unsigned int flags)
85 {
> 86 return 0;
87 }
88 #endif /* CONFIG_VGA_ARB */
89
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[hch-misc:vgaarb-cleanups 8/8] drivers/gpu/vga/vgaarb.c:851:2: warning: comparison of distinct pointer types ('unsigned long and 'typeof (flags) (aka 'unsigned int
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git vgaarb-cleanups
head: 1b5803735663928e9ddb2ca5ad9d4602d5ac18d0
commit: 1b5803735663928e9ddb2ca5ad9d4602d5ac18d0 [8/8] vgaarb: replace vga_set_legacy_decoding with a flag to vga_client_{,un}register
config: x86_64-randconfig-r035-20210316 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 50c7504a93fdb90c26870db8c8ea7add895c7725)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc vgaarb-cleanups
git checkout 1b5803735663928e9ddb2ca5ad9d4602d5ac18d0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/gpu/vga/vgaarb.c:849:16: error: redefinition of 'flags' with a different type: 'unsigned long' vs 'unsigned int'
unsigned long flags;
^
drivers/gpu/vga/vgaarb.c:844:60: note: previous definition is here
int vga_client_register(struct pci_dev *pdev, unsigned int flags,
^
>> drivers/gpu/vga/vgaarb.c:851:2: warning: comparison of distinct pointer types ('unsigned long *' and 'typeof (flags) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
spin_lock_irqsave(&vga_lock, flags);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h:384:2: note: expanded from macro 'spin_lock_irqsave'
raw_spin_lock_irqsave(spinlock_check(lock), flags); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h:251:3: note: expanded from macro 'raw_spin_lock_irqsave'
typecheck(unsigned long, flags); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/typecheck.h:12:18: note: expanded from macro 'typecheck'
(void)(&__dummy == &__dummy2); \
~~~~~~~~ ^ ~~~~~~~~~
drivers/gpu/vga/vgaarb.c:872:16: error: redefinition of 'flags' with a different type: 'unsigned long' vs 'unsigned int'
unsigned long flags;
^
drivers/gpu/vga/vgaarb.c:869:63: note: previous definition is here
void vga_client_unregister(struct pci_dev *pdev, unsigned int flags)
^
drivers/gpu/vga/vgaarb.c:874:2: warning: comparison of distinct pointer types ('unsigned long *' and 'typeof (flags) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
spin_lock_irqsave(&vga_lock, flags);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h:384:2: note: expanded from macro 'spin_lock_irqsave'
raw_spin_lock_irqsave(spinlock_check(lock), flags); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spinlock.h:251:3: note: expanded from macro 'raw_spin_lock_irqsave'
typecheck(unsigned long, flags); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/typecheck.h:12:18: note: expanded from macro 'typecheck'
(void)(&__dummy == &__dummy2); \
~~~~~~~~ ^ ~~~~~~~~~
2 warnings and 2 errors generated.
vim +851 drivers/gpu/vga/vgaarb.c
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 818
b754b35b089ddf Daniel Vetter 2016-08-12 819 /**
b754b35b089ddf Daniel Vetter 2016-08-12 820 * vga_client_register - register or unregister a VGA arbitration client
b754b35b089ddf Daniel Vetter 2016-08-12 821 * @pdev: pci device of the VGA client
1b580373566392 Christoph Hellwig 2021-03-16 822 * @flags: VGAARB_*
585b7655450bfe Christoph Hellwig 2021-03-15 823 * @set_decode: vga decode change callback
b754b35b089ddf Daniel Vetter 2016-08-12 824 *
b754b35b089ddf Daniel Vetter 2016-08-12 825 * Clients have two callback mechanisms they can use.
b754b35b089ddf Daniel Vetter 2016-08-12 826 *
585b7655450bfe Christoph Hellwig 2021-03-15 827 * @set_decode callback: If a client can disable its GPU VGA resource, it
b754b35b089ddf Daniel Vetter 2016-08-12 828 * will get a callback from this to set the encode/decode state.
b754b35b089ddf Daniel Vetter 2016-08-12 829 *
b754b35b089ddf Daniel Vetter 2016-08-12 830 * Rationale: we cannot disable VGA decode resources unconditionally some single
b754b35b089ddf Daniel Vetter 2016-08-12 831 * GPU laptops seem to require ACPI or BIOS access to the VGA registers to
b754b35b089ddf Daniel Vetter 2016-08-12 832 * control things like backlights etc. Hopefully newer multi-GPU laptops do
b754b35b089ddf Daniel Vetter 2016-08-12 833 * something saner, and desktops won't have any special ACPI for this. The
b754b35b089ddf Daniel Vetter 2016-08-12 834 * driver will get a callback when VGA arbitration is first used by userspace
b754b35b089ddf Daniel Vetter 2016-08-12 835 * since some older X servers have issues.
b754b35b089ddf Daniel Vetter 2016-08-12 836 *
b754b35b089ddf Daniel Vetter 2016-08-12 837 * This function does not check whether a client for @pdev has been registered
b754b35b089ddf Daniel Vetter 2016-08-12 838 * already.
b754b35b089ddf Daniel Vetter 2016-08-12 839 *
2fc64c446180ec Christoph Hellwig 2021-03-15 840 * To unregister just call vga_client_unregister().
b754b35b089ddf Daniel Vetter 2016-08-12 841 *
b754b35b089ddf Daniel Vetter 2016-08-12 842 * Returns: 0 on success, -1 on failure
b754b35b089ddf Daniel Vetter 2016-08-12 843 */
1b580373566392 Christoph Hellwig 2021-03-16 844 int vga_client_register(struct pci_dev *pdev, unsigned int flags,
585b7655450bfe Christoph Hellwig 2021-03-15 845 unsigned int (*set_decode)(struct pci_dev *pdev, bool decode))
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 846 {
934f992c763ae1 Chris Wilson 2011-01-20 847 int ret = -ENODEV;
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 848 struct vga_device *vgadev;
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 849 unsigned long flags;
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 850
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 @851 spin_lock_irqsave(&vga_lock, flags);
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 852 vgadev = vgadev_find(pdev);
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 853 if (!vgadev)
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 854 goto bail;
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 855
585b7655450bfe Christoph Hellwig 2021-03-15 856 vgadev->set_decode = set_decode;
1b580373566392 Christoph Hellwig 2021-03-16 857 if (flags & VGAARB_DISABLE_LEGACY_DECODING)
1b580373566392 Christoph Hellwig 2021-03-16 858 vga_update_device_decodes(vgadev,
1b580373566392 Christoph Hellwig 2021-03-16 859 set_decode(pdev, false) & VGA_RSRC_LEGACY_MASK);
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 860 ret = 0;
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 861
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 862 bail:
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 863 spin_unlock_irqrestore(&vga_lock, flags);
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 864 return ret;
deb2d2ecd43dfc Benjamin Herrenschmidt 2009-08-11 865
:::::: The code at line 851 was first introduced by commit
:::::: deb2d2ecd43dfc51efe71eed7128fda514da96c6 PCI/GPU: implement VGA arbitration on Linux
:::::: TO: Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
:::::: CC: Jesse Barnes <jbarnes(a)virtuousgeek.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months