[android-common:android-4.4-p 1/1] drivers/cpufreq/cpufreq_times.c:259:40: sparse: sparse: incorrect type in argument 2 (different base types)
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-4.4-p
head: 766d0c0c6c388ec3833caf9c47e9f3f50230cdc3
commit: 766d0c0c6c388ec3833caf9c47e9f3f50230cdc3 [1/1] ANDROID: cpufreq: times: add /proc/uid_concurrent_{active,policy}_time
config: i386-randconfig-s002-20200710 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-37-gc9676a3b-dirty
git checkout 766d0c0c6c388ec3833caf9c47e9f3f50230cdc3
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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/cpufreq/cpufreq_times.c:30:1: sparse: sparse: symbol 'uid_hash_table' was not declared. Should it be static?
>> drivers/cpufreq/cpufreq_times.c:259:40: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected char delimiter @@ got char * @@
>> drivers/cpufreq/cpufreq_times.c:259:40: sparse: expected char delimiter
>> drivers/cpufreq/cpufreq_times.c:259:40: sparse: got char *
drivers/cpufreq/cpufreq_times.c:265:48: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected char delimiter @@ got char * @@
drivers/cpufreq/cpufreq_times.c:265:48: sparse: expected char delimiter
drivers/cpufreq/cpufreq_times.c:265:48: sparse: got char *
drivers/cpufreq/cpufreq_times.c:283:40: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected char delimiter @@ got char * @@
drivers/cpufreq/cpufreq_times.c:283:40: sparse: expected char delimiter
drivers/cpufreq/cpufreq_times.c:283:40: sparse: got char *
drivers/cpufreq/cpufreq_times.c:309:64: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected char delimiter @@ got char * @@
drivers/cpufreq/cpufreq_times.c:309:64: sparse: expected char delimiter
drivers/cpufreq/cpufreq_times.c:309:64: sparse: got char *
drivers/cpufreq/cpufreq_times.c:313:56: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected char delimiter @@ got char * @@
drivers/cpufreq/cpufreq_times.c:313:56: sparse: expected char delimiter
drivers/cpufreq/cpufreq_times.c:313:56: sparse: got char *
drivers/cpufreq/cpufreq_times.c:320:48: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected char delimiter @@ got char * @@
drivers/cpufreq/cpufreq_times.c:320:48: sparse: expected char delimiter
drivers/cpufreq/cpufreq_times.c:320:48: sparse: got char *
drivers/cpufreq/cpufreq_times.c:406:35: sparse: sparse: implicit cast to nocast type
drivers/cpufreq/cpufreq_times.c:409:59: sparse: sparse: implicit cast to nocast type
drivers/cpufreq/cpufreq_times.c:439:44: sparse: sparse: implicit cast from nocast type
drivers/cpufreq/cpufreq_times.c:445:52: sparse: sparse: implicit cast from nocast type
drivers/cpufreq/cpufreq_times.c:459:22: sparse: sparse: implicit cast from nocast type
drivers/cpufreq/cpufreq_times.c:479:22: sparse: sparse: implicit cast from nocast type
>> drivers/cpufreq/cpufreq_times.c:259:40: sparse: sparse: non size-preserving pointer to integer cast
drivers/cpufreq/cpufreq_times.c:265:48: sparse: sparse: non size-preserving pointer to integer cast
drivers/cpufreq/cpufreq_times.c:283:40: sparse: sparse: non size-preserving pointer to integer cast
drivers/cpufreq/cpufreq_times.c:309:64: sparse: sparse: non size-preserving pointer to integer cast
drivers/cpufreq/cpufreq_times.c:313:56: sparse: sparse: non size-preserving pointer to integer cast
drivers/cpufreq/cpufreq_times.c:320:48: sparse: sparse: non size-preserving pointer to integer cast
In file included from drivers/cpufreq/cpufreq_times.c:22:0:
include/linux/sched.h:1211:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
^~~~~
drivers/cpufreq/cpufreq_times.c: In function 'concurrent_time_seq_show':
drivers/cpufreq/cpufreq_times.c:259:26: warning: passing argument 2 of 'seq_put_decimal_ull' makes integer from pointer without a cast [-Wint-conversion]
seq_put_decimal_ull(m, "", (u64)uid_entry->uid);
^~
In file included from drivers/cpufreq/cpufreq_times.c:23:0:
include/linux/seq_file.h:120:6: note: expected 'char' but argument is of type 'char *'
void seq_put_decimal_ull(struct seq_file *m, char delimiter,
^~~~~~~~~~~~~~~~~~~
drivers/cpufreq/cpufreq_times.c:265:27: warning: passing argument 2 of 'seq_put_decimal_ull' makes integer from pointer without a cast [-Wint-conversion]
seq_put_decimal_ull(m, " ", time);
^~~
In file included from drivers/cpufreq/cpufreq_times.c:23:0:
include/linux/seq_file.h:120:6: note: expected 'char' but argument is of type 'char *'
void seq_put_decimal_ull(struct seq_file *m, char delimiter,
^~~~~~~~~~~~~~~~~~~
drivers/cpufreq/cpufreq_times.c: In function 'concurrent_active_time_seq_show':
drivers/cpufreq/cpufreq_times.c:283:26: warning: passing argument 2 of 'seq_put_decimal_ull' makes integer from pointer without a cast [-Wint-conversion]
seq_put_decimal_ull(m, "cpus: ", num_possible_cpus());
^~~~~~~~
In file included from drivers/cpufreq/cpufreq_times.c:23:0:
include/linux/seq_file.h:120:6: note: expected 'char' but argument is of type 'char *'
void seq_put_decimal_ull(struct seq_file *m, char delimiter,
^~~~~~~~~~~~~~~~~~~
drivers/cpufreq/cpufreq_times.c: In function 'concurrent_policy_time_seq_show':
drivers/cpufreq/cpufreq_times.c:309:29: warning: passing argument 2 of 'seq_put_decimal_ull' makes integer from pointer without a cast [-Wint-conversion]
seq_put_decimal_ull(m, ": ", cnt);
^~~~
In file included from drivers/cpufreq/cpufreq_times.c:23:0:
include/linux/seq_file.h:120:6: note: expected 'char' but argument is of type 'char *'
void seq_put_decimal_ull(struct seq_file *m, char delimiter,
^~~~~~~~~~~~~~~~~~~
drivers/cpufreq/cpufreq_times.c:313:28: warning: passing argument 2 of 'seq_put_decimal_ull' makes integer from pointer without a cast [-Wint-conversion]
seq_put_decimal_ull(m, "policy", i);
^~~~~~~~
In file included from drivers/cpufreq/cpufreq_times.c:23:0:
include/linux/seq_file.h:120:6: note: expected 'char' but argument is of type 'char *'
void seq_put_decimal_ull(struct seq_file *m, char delimiter,
^~~~~~~~~~~~~~~~~~~
drivers/cpufreq/cpufreq_times.c:320:27: warning: passing argument 2 of 'seq_put_decimal_ull' makes integer from pointer without a cast [-Wint-conversion]
seq_put_decimal_ull(m, ": ", cnt);
^~~~
In file included from drivers/cpufreq/cpufreq_times.c:23:0:
include/linux/seq_file.h:120:6: note: expected 'char' but argument is of type 'char *'
void seq_put_decimal_ull(struct seq_file *m, char delimiter,
^~~~~~~~~~~~~~~~~~~
vim +259 drivers/cpufreq/cpufreq_times.c
247
248 static int concurrent_time_seq_show(struct seq_file *m, void *v,
249 atomic64_t *(*get_times)(struct concurrent_times *))
250 {
251 struct uid_entry *uid_entry;
252 int i, num_possible_cpus = num_possible_cpus();
253
254 rcu_read_lock();
255
256 hlist_for_each_entry_rcu(uid_entry, (struct hlist_head *)v, hash) {
257 atomic64_t *times = get_times(uid_entry->concurrent_times);
258
> 259 seq_put_decimal_ull(m, "", (u64)uid_entry->uid);
260 seq_putc(m, ':');
261
262 for (i = 0; i < num_possible_cpus; ++i) {
263 u64 time = cputime_to_clock_t(atomic64_read(×[i]));
264
265 seq_put_decimal_ull(m, " ", time);
266 }
267 seq_putc(m, '\n');
268 }
269
270 rcu_read_unlock();
271
272 return 0;
273 }
274
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[chrome-os:chromeos-5.4 15/93] include/linux/string.h:294:30: error: '__builtin_strncpy' specified bound 24 equals destination size
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: fbd5b376aef3491b453cfdefd1faa1f2f5ccc240
commit: d7438be1154b21bdd4472a1cfd86395334764b89 [15/93] UPSTREAM: drm/i915/gem: Don't leak non-persistent requests on changing engines
config: i386-randconfig-r035-20200710 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout d7438be1154b21bdd4472a1cfd86395334764b89
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/include/asm/page_32.h:35,
from arch/x86/include/asm/page.h:14,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/io-mapping.h:10,
from drivers/gpu/drm/i915/gt/intel_gtt.h:19,
from drivers/gpu/drm/i915/gt/gen6_ppgtt.h:9,
from drivers/gpu/drm/i915/gem/i915_gem_context.c:72:
In function 'strncpy',
inlined from 'mock_context' at drivers/gpu/drm/i915/gem/selftests/mock_context.c:40:3:
>> include/linux/string.h:294:30: error: '__builtin_strncpy' specified bound 24 equals destination size [-Werror=stringop-truncation]
294 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/string.h:304:9: note: in expansion of macro '__underlying_strncpy'
304 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/__builtin_strncpy +294 include/linux/string.h
b008ae4cc74d3a Daniel Axtens 2020-06-03 272
b008ae4cc74d3a Daniel Axtens 2020-06-03 273 #ifdef CONFIG_KASAN
b008ae4cc74d3a Daniel Axtens 2020-06-03 274 extern void *__underlying_memchr(const void *p, int c, __kernel_size_t size) __RENAME(memchr);
b008ae4cc74d3a Daniel Axtens 2020-06-03 275 extern int __underlying_memcmp(const void *p, const void *q, __kernel_size_t size) __RENAME(memcmp);
b008ae4cc74d3a Daniel Axtens 2020-06-03 276 extern void *__underlying_memcpy(void *p, const void *q, __kernel_size_t size) __RENAME(memcpy);
b008ae4cc74d3a Daniel Axtens 2020-06-03 277 extern void *__underlying_memmove(void *p, const void *q, __kernel_size_t size) __RENAME(memmove);
b008ae4cc74d3a Daniel Axtens 2020-06-03 278 extern void *__underlying_memset(void *p, int c, __kernel_size_t size) __RENAME(memset);
b008ae4cc74d3a Daniel Axtens 2020-06-03 279 extern char *__underlying_strcat(char *p, const char *q) __RENAME(strcat);
b008ae4cc74d3a Daniel Axtens 2020-06-03 280 extern char *__underlying_strcpy(char *p, const char *q) __RENAME(strcpy);
b008ae4cc74d3a Daniel Axtens 2020-06-03 281 extern __kernel_size_t __underlying_strlen(const char *p) __RENAME(strlen);
b008ae4cc74d3a Daniel Axtens 2020-06-03 282 extern char *__underlying_strncat(char *p, const char *q, __kernel_size_t count) __RENAME(strncat);
b008ae4cc74d3a Daniel Axtens 2020-06-03 283 extern char *__underlying_strncpy(char *p, const char *q, __kernel_size_t size) __RENAME(strncpy);
b008ae4cc74d3a Daniel Axtens 2020-06-03 284 #else
b008ae4cc74d3a Daniel Axtens 2020-06-03 285 #define __underlying_memchr __builtin_memchr
b008ae4cc74d3a Daniel Axtens 2020-06-03 286 #define __underlying_memcmp __builtin_memcmp
b008ae4cc74d3a Daniel Axtens 2020-06-03 287 #define __underlying_memcpy __builtin_memcpy
b008ae4cc74d3a Daniel Axtens 2020-06-03 288 #define __underlying_memmove __builtin_memmove
b008ae4cc74d3a Daniel Axtens 2020-06-03 289 #define __underlying_memset __builtin_memset
b008ae4cc74d3a Daniel Axtens 2020-06-03 290 #define __underlying_strcat __builtin_strcat
b008ae4cc74d3a Daniel Axtens 2020-06-03 291 #define __underlying_strcpy __builtin_strcpy
b008ae4cc74d3a Daniel Axtens 2020-06-03 292 #define __underlying_strlen __builtin_strlen
b008ae4cc74d3a Daniel Axtens 2020-06-03 293 #define __underlying_strncat __builtin_strncat
b008ae4cc74d3a Daniel Axtens 2020-06-03 @294 #define __underlying_strncpy __builtin_strncpy
b008ae4cc74d3a Daniel Axtens 2020-06-03 295 #endif
b008ae4cc74d3a Daniel Axtens 2020-06-03 296
:::::: The code at line 294 was first introduced by commit
:::::: b008ae4cc74d3ab43074099746f6c32d353e01aa string.h: fix incompatibility between FORTIFY_SOURCE and KASAN
:::::: TO: Daniel Axtens <dja(a)axtens.net>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[hch-misc:dma-bypass.5 7/9] drivers/infiniband/core/device.c:1186:17: error: 'struct device' has no member named 'dma_ops'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git dma-bypass.5
head: 80ac26860d23173c1c10beeaf76f3f0cf23942f1
commit: 8e1e62260cf3e8f1255de8c5f65c633b5e54bb5c [7/9] dma-mapping: make support for dma ops optional
config: i386-randconfig-a013-20200711 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 8e1e62260cf3e8f1255de8c5f65c633b5e54bb5c
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>):
drivers/infiniband/core/device.c: In function 'setup_dma_device':
>> drivers/infiniband/core/device.c:1186:17: error: 'struct device' has no member named 'dma_ops'
1186 | if (device->dev.dma_ops) {
| ^
vim +1186 drivers/infiniband/core/device.c
0df91bb67334ee Jason Gunthorpe 2019-02-06 1180
548cb4fbe80d68 Parav Pandit 2018-10-17 1181 static void setup_dma_device(struct ib_device *device)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1182 {
99db9494035f5b Bart Van Assche 2017-01-20 1183 struct device *parent = device->dev.parent;
99db9494035f5b Bart Van Assche 2017-01-20 1184
0957c29f78af7d Bart Van Assche 2017-03-07 1185 WARN_ON_ONCE(device->dma_device);
0957c29f78af7d Bart Van Assche 2017-03-07 @1186 if (device->dev.dma_ops) {
0957c29f78af7d Bart Van Assche 2017-03-07 1187 /*
0957c29f78af7d Bart Van Assche 2017-03-07 1188 * The caller provided custom DMA operations. Copy the
0957c29f78af7d Bart Van Assche 2017-03-07 1189 * DMA-related fields that are used by e.g. dma_alloc_coherent()
0957c29f78af7d Bart Van Assche 2017-03-07 1190 * into device->dev.
0957c29f78af7d Bart Van Assche 2017-03-07 1191 */
0957c29f78af7d Bart Van Assche 2017-03-07 1192 device->dma_device = &device->dev;
02ee9da3478736 Bart Van Assche 2018-01-03 1193 if (!device->dev.dma_mask) {
02ee9da3478736 Bart Van Assche 2018-01-03 1194 if (parent)
99db9494035f5b Bart Van Assche 2017-01-20 1195 device->dev.dma_mask = parent->dma_mask;
02ee9da3478736 Bart Van Assche 2018-01-03 1196 else
02ee9da3478736 Bart Van Assche 2018-01-03 1197 WARN_ON_ONCE(true);
02ee9da3478736 Bart Van Assche 2018-01-03 1198 }
02ee9da3478736 Bart Van Assche 2018-01-03 1199 if (!device->dev.coherent_dma_mask) {
02ee9da3478736 Bart Van Assche 2018-01-03 1200 if (parent)
0957c29f78af7d Bart Van Assche 2017-03-07 1201 device->dev.coherent_dma_mask =
0957c29f78af7d Bart Van Assche 2017-03-07 1202 parent->coherent_dma_mask;
02ee9da3478736 Bart Van Assche 2018-01-03 1203 else
02ee9da3478736 Bart Van Assche 2018-01-03 1204 WARN_ON_ONCE(true);
02ee9da3478736 Bart Van Assche 2018-01-03 1205 }
0957c29f78af7d Bart Van Assche 2017-03-07 1206 } else {
0957c29f78af7d Bart Van Assche 2017-03-07 1207 /*
0957c29f78af7d Bart Van Assche 2017-03-07 1208 * The caller did not provide custom DMA operations. Use the
0957c29f78af7d Bart Van Assche 2017-03-07 1209 * DMA mapping operations of the parent device.
0957c29f78af7d Bart Van Assche 2017-03-07 1210 */
02ee9da3478736 Bart Van Assche 2018-01-03 1211 WARN_ON_ONCE(!parent);
0957c29f78af7d Bart Van Assche 2017-03-07 1212 device->dma_device = parent;
0957c29f78af7d Bart Van Assche 2017-03-07 1213 }
d10bcf947a3ea2 Shiraz Saleem 2019-04-02 1214
c9121262d57b8a Bart Van Assche 2019-10-25 1215 if (!device->dev.dma_parms) {
c9121262d57b8a Bart Van Assche 2019-10-25 1216 if (parent) {
c9121262d57b8a Bart Van Assche 2019-10-25 1217 /*
c9121262d57b8a Bart Van Assche 2019-10-25 1218 * The caller did not provide DMA parameters, so
c9121262d57b8a Bart Van Assche 2019-10-25 1219 * 'parent' probably represents a PCI device. The PCI
c9121262d57b8a Bart Van Assche 2019-10-25 1220 * core sets the maximum segment size to 64
c9121262d57b8a Bart Van Assche 2019-10-25 1221 * KB. Increase this parameter to 2 GB.
c9121262d57b8a Bart Van Assche 2019-10-25 1222 */
c9121262d57b8a Bart Van Assche 2019-10-25 1223 device->dev.dma_parms = parent->dma_parms;
c9121262d57b8a Bart Van Assche 2019-10-25 1224 dma_set_max_seg_size(device->dma_device, SZ_2G);
c9121262d57b8a Bart Van Assche 2019-10-25 1225 } else {
c9121262d57b8a Bart Van Assche 2019-10-25 1226 WARN_ON_ONCE(true);
c9121262d57b8a Bart Van Assche 2019-10-25 1227 }
c9121262d57b8a Bart Van Assche 2019-10-25 1228 }
e349f858d29f30 Jason Gunthorpe 2018-09-25 1229 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1230
:::::: The code at line 1186 was first introduced by commit
:::::: 0957c29f78af7d890c4ac506eda8f76bfc5a137a IB/core: Restore I/O MMU, s390 and powerpc support
:::::: TO: Bart Van Assche <bart.vanassche(a)sandisk.com>
:::::: CC: Doug Ledford <dledford(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[mlankhorst:locking-rework 30/30] drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:1: error: conflicting types for 'i915_gem_shrink'
by kernel test robot
tree: git://people.freedesktop.org/~mlankhorst/linux locking-rework
head: df835d9d9fee30c2d4584242c64c8b32eae0d0a4
commit: df835d9d9fee30c2d4584242c64c8b32eae0d0a4 [30/30] how to implement eviction
config: x86_64-fedora-25 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout df835d9d9fee30c2d4584242c64c8b32eae0d0a4
# 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 >>):
>> drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:1: error: conflicting types for 'i915_gem_shrink'
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ^~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/i915_drv.h:77,
from drivers/gpu/drm/i915/display/intel_display_types.h:45,
from drivers/gpu/drm/i915/i915_trace.h:11,
from drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:16:
drivers/gpu/drm/i915/gem/i915_gem_shrinker.h:15:15: note: previous declaration of 'i915_gem_shrink' was here
15 | unsigned long i915_gem_shrink(struct drm_i915_private *i915,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c: In function 'i915_gem_shrink':
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:213:27: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
213 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c: In function 'i915_gem_shrinker_scan':
>> drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:304:26: error: passing argument 1 of 'i915_gem_shrink' from incompatible pointer type [-Werror=incompatible-pointer-types]
304 | freed = i915_gem_shrink(i915,
| ^~~~
| |
| struct drm_i915_private *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:41: note: expected 'struct i915_gem_ww_ctx *' but argument is of type 'struct drm_i915_private *'
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:305:7: warning: passing argument 2 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
305 | sc->nr_to_scan,
| ~~^~~~~~~~~~~~
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:95:28: note: expected 'struct drm_i915_private *' but argument is of type 'long unsigned int'
95 | struct drm_i915_private *i915,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:306:5: warning: passing argument 3 of 'i915_gem_shrink' makes integer from pointer without a cast [-Wint-conversion]
306 | &sc->nr_scanned,
| ^~~~~~~~~~~~~~~
| |
| long unsigned int *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:96:17: note: expected 'long unsigned int' but argument is of type 'long unsigned int *'
96 | unsigned long target,
| ~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/sched/signal.h:5,
from include/linux/oom.h:6,
from drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:7:
include/vdso/bits.h:7:19: warning: passing argument 4 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
7 | #define BIT(nr) (UL(1) << (nr))
| ^
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.h:20:27: note: in expansion of macro 'BIT'
20 | #define I915_SHRINK_BOUND BIT(1)
| ^~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:307:5: note: in expansion of macro 'I915_SHRINK_BOUND'
307 | I915_SHRINK_BOUND |
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:97:18: note: expected 'long unsigned int *' but argument is of type 'long unsigned int'
97 | unsigned long *nr_scanned,
| ~~~~~~~~~~~~~~~^~~~~~~~~~
>> drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:304:10: error: too few arguments to function 'i915_gem_shrink'
304 | freed = i915_gem_shrink(i915,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:1: note: declared here
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:313:29: error: passing argument 1 of 'i915_gem_shrink' from incompatible pointer type [-Werror=incompatible-pointer-types]
313 | freed += i915_gem_shrink(i915,
| ^~~~
| |
| struct drm_i915_private *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:41: note: expected 'struct i915_gem_ww_ctx *' but argument is of type 'struct drm_i915_private *'
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:314:23: warning: passing argument 2 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
314 | sc->nr_to_scan - sc->nr_scanned,
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:95:28: note: expected 'struct drm_i915_private *' but argument is of type 'long unsigned int'
95 | struct drm_i915_private *i915,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:315:8: warning: passing argument 3 of 'i915_gem_shrink' makes integer from pointer without a cast [-Wint-conversion]
315 | &sc->nr_scanned,
| ^~~~~~~~~~~~~~~
| |
| long unsigned int *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:96:17: note: expected 'long unsigned int' but argument is of type 'long unsigned int *'
96 | unsigned long target,
| ~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/sched/signal.h:5,
from include/linux/oom.h:6,
from drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:7:
include/vdso/bits.h:7:19: warning: passing argument 4 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
7 | #define BIT(nr) (UL(1) << (nr))
| ^
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.h:21:28: note: in expansion of macro 'BIT'
21 | #define I915_SHRINK_ACTIVE BIT(2)
| ^~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:316:8: note: in expansion of macro 'I915_SHRINK_ACTIVE'
316 | I915_SHRINK_ACTIVE |
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:97:18: note: expected 'long unsigned int *' but argument is of type 'long unsigned int'
97 | unsigned long *nr_scanned,
| ~~~~~~~~~~~~~~~^~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:313:13: error: too few arguments to function 'i915_gem_shrink'
313 | freed += i915_gem_shrink(i915,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:1: note: declared here
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c: In function 'i915_gem_shrinker_oom':
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:338:34: error: passing argument 1 of 'i915_gem_shrink' from incompatible pointer type [-Werror=incompatible-pointer-types]
338 | freed_pages += i915_gem_shrink(i915, -1UL, NULL,
| ^~~~
| |
| struct drm_i915_private *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:41: note: expected 'struct i915_gem_ww_ctx *' but argument is of type 'struct drm_i915_private *'
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:338:40: warning: passing argument 2 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
338 | freed_pages += i915_gem_shrink(i915, -1UL, NULL,
| ^~~~
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:95:28: note: expected 'struct drm_i915_private *' but argument is of type 'long unsigned int'
95 | struct drm_i915_private *i915,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/list.h:5,
from include/linux/rculist.h:10,
from include/linux/sched/signal.h:5,
from include/linux/oom.h:6,
from drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:7:
include/linux/stddef.h:8:14: warning: passing argument 3 of 'i915_gem_shrink' makes integer from pointer without a cast [-Wint-conversion]
8 | #define NULL ((void *)0)
| ^~~~~~~~~~~
| |
| void *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:338:46: note: in expansion of macro 'NULL'
338 | freed_pages += i915_gem_shrink(i915, -1UL, NULL,
| ^~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:96:17: note: expected 'long unsigned int' but argument is of type 'void *'
96 | unsigned long target,
| ~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/sched/signal.h:5,
from include/linux/oom.h:6,
vim +/i915_gem_shrink +94 drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
67
68 /**
69 * i915_gem_shrink - Shrink buffer object caches
70 * @i915: i915 device
71 * @target: amount of memory to make available, in pages
72 * @nr_scanned: optional output for number of pages scanned (incremental)
73 * @shrink: control flags for selecting cache types
74 *
75 * This function is the main interface to the shrinker. It will try to release
76 * up to @target pages of main memory backing storage from buffer objects.
77 * Selection of the specific caches can be done with @flags. This is e.g. useful
78 * when purgeable objects should be removed from caches preferentially.
79 *
80 * Note that it's not guaranteed that released amount is actually available as
81 * free system memory - the pages might still be in-used to due to other reasons
82 * (like cpu mmaps) or the mm core has reused them before we could grab them.
83 * Therefore code that needs to explicitly shrink buffer objects caches (e.g. to
84 * avoid deadlocks in memory reclaim) must fall back to i915_gem_shrink_all().
85 *
86 * Also note that any kind of pinning (both per-vma address space pins and
87 * backing storage pins at the buffer object level) result in the shrinker code
88 * having to skip the object.
89 *
90 * Returns:
91 * The number of pages of backing storage actually released.
92 */
93 unsigned long
> 94 i915_gem_shrink(struct i915_gem_ww_ctx *ww,
95 struct drm_i915_private *i915,
96 unsigned long target,
97 unsigned long *nr_scanned,
98 unsigned int shrink)
99 {
100 const struct {
101 struct list_head *list;
102 unsigned int bit;
103 } phases[] = {
104 { &i915->mm.purge_list, ~0u },
105 {
106 &i915->mm.shrink_list,
107 I915_SHRINK_BOUND | I915_SHRINK_UNBOUND
108 },
109 { NULL, 0 },
110 }, *phase;
111 intel_wakeref_t wakeref = 0;
112 unsigned long count = 0;
113 unsigned long scanned = 0;
114 int err;
115
116 /*
117 * When shrinking the active list, we should also consider active
118 * contexts. Active contexts are pinned until they are retired, and
119 * so can not be simply unbound to retire and unpin their pages. To
120 * shrink the contexts, we must wait until the gpu is idle and
121 * completed its switch to the kernel context. In short, we do
122 * not have a good mechanism for idling a specific context.
123 */
124
125 trace_i915_gem_shrink(i915, target, shrink);
126
127 /*
128 * Unbinding of objects will require HW access; Let us not wake the
129 * device just to recover a little memory. If absolutely necessary,
130 * we will force the wake during oom-notifier.
131 */
132 if (shrink & I915_SHRINK_BOUND) {
133 wakeref = intel_runtime_pm_get_if_in_use(&i915->runtime_pm);
134 if (!wakeref)
135 shrink &= ~I915_SHRINK_BOUND;
136 }
137
138 /*
139 * As we may completely rewrite the (un)bound list whilst unbinding
140 * (due to retiring requests) we have to strictly process only
141 * one element of the list at the time, and recheck the list
142 * on every iteration.
143 *
144 * In particular, we must hold a reference whilst removing the
145 * object as we may end up waiting for and/or retiring the objects.
146 * This might release the final reference (held by the active list)
147 * and result in the object being freed from under us. This is
148 * similar to the precautions the eviction code must take whilst
149 * removing objects.
150 *
151 * Also note that although these lists do not hold a reference to
152 * the object we can safely grab one here: The final object
153 * unreferencing and the bound_list are both protected by the
154 * dev->struct_mutex and so we won't ever be able to observe an
155 * object on the bound_list with a reference count equals 0.
156 */
157 for (phase = phases; phase->list; phase++) {
158 struct list_head still_in_list;
159 struct drm_i915_gem_object *obj;
160 unsigned long flags;
161
162 if ((shrink & phase->bit) == 0)
163 continue;
164
165 INIT_LIST_HEAD(&still_in_list);
166
167 /*
168 * We serialize our access to unreferenced objects through
169 * the use of the struct_mutex. While the objects are not
170 * yet freed (due to RCU then a workqueue) we still want
171 * to be able to shrink their pages, so they remain on
172 * the unbound/bound list until actually freed.
173 */
174 spin_lock_irqsave(&i915->mm.obj_lock, flags);
175 while (count < target &&
176 (obj = list_first_entry_or_null(phase->list,
177 typeof(*obj),
178 mm.link))) {
179 list_move_tail(&obj->mm.link, &still_in_list);
180
181 if (shrink & I915_SHRINK_VMAPS &&
182 !is_vmalloc_addr(obj->mm.mapping))
183 continue;
184
185 if (!(shrink & I915_SHRINK_ACTIVE) &&
186 i915_gem_object_is_framebuffer(obj))
187 continue;
188
189 if (!can_release_pages(obj))
190 continue;
191
192 if (!kref_get_unless_zero(&obj->base.refcount))
193 continue;
194
195 spin_unlock_irqrestore(&i915->mm.obj_lock, flags);
196
197 err = 0;
198 if (unsafe_drop_pages(obj, shrink)) {
199 /* May arrive from get_pages on another bo */
200 if (!ww) {
201 if (!i915_gem_object_trylock(obj))
202 goto skip;
203 } else {
204 err = i915_gem_object_lock(obj, ww);
205 if (err)
206 goto skip;
207 }
208
209 if (!i915_gem_object_has_pages(obj)) {
210 try_to_writeback(obj, shrink);
211 count += obj->base.size >> PAGE_SHIFT;
212 }
> 213 mutex_unlock(&obj->mm.lock);
214 }
215
216 scanned += obj->base.size >> PAGE_SHIFT;
217 skip:
218 i915_gem_object_put(obj);
219
220 spin_lock_irqsave(&i915->mm.obj_lock, flags);
221 if (err)
222 break;
223 }
224 list_splice_tail(&still_in_list, phase->list);
225 spin_unlock_irqrestore(&i915->mm.obj_lock, flags);
226 if (err)
227 return err;
228 }
229
230 if (shrink & I915_SHRINK_BOUND)
231 intel_runtime_pm_put(&i915->runtime_pm, wakeref);
232
233 if (nr_scanned)
234 *nr_scanned += scanned;
235 return count;
236 }
237
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: implicit declaration of function 'pgprot_writecombine'; did you mean
by kernel test robot
Hi Hans,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: aa0c9086b40c17a7ad94425b3b70dd1fdd7497bf
commit: e4f86e43716443e934d705952902d40de0fa9a05 drm: Add Grain Media GM12U320 driver v2
date: 12 months ago
config: m68k-randconfig-r002-20200710 (attached as .config)
compiler: m68k-linux-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
git checkout e4f86e43716443e934d705952902d40de0fa9a05
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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/file.h:9,
from include/linux/dma-buf.h:27,
from drivers/gpu/drm/drm_gem_shmem_helper.c:6:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/drm_gem_shmem_helper.c: In function 'drm_gem_shmem_vmap_locked':
>> drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: implicit declaration of function 'pgprot_writecombine'; did you mean 'dma_free_writecombine'? [-Werror=implicit-function-declaration]
260 | VM_MAP, pgprot_writecombine(PAGE_KERNEL));
| ^~~~~~~~~~~~~~~~~~~
| dma_free_writecombine
drivers/gpu/drm/drm_gem_shmem_helper.c:260:17: error: incompatible type for argument 4 of 'vmap'
260 | VM_MAP, pgprot_writecombine(PAGE_KERNEL));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from include/asm-generic/io.h:887,
from arch/m68k/include/asm/io.h:11,
from arch/m68k/include/asm/pgtable_no.h:14,
from arch/m68k/include/asm/pgtable.h:3,
from include/linux/mm.h:99,
from include/linux/scatterlist.h:8,
from include/linux/dma-buf.h:29,
from drivers/gpu/drm/drm_gem_shmem_helper.c:6:
include/linux/vmalloc.h:109:14: note: expected 'pgprot_t' {aka 'struct <anonymous>'} but argument is of type 'int'
109 | extern void *vmap(struct page **pages, unsigned int count,
| ^~~~
cc1: some warnings being treated as errors
vim +260 drivers/gpu/drm/drm_gem_shmem_helper.c
2194a63a818db7 Noralf Trønnes 2019-03-12 243
2194a63a818db7 Noralf Trønnes 2019-03-12 244 static void *drm_gem_shmem_vmap_locked(struct drm_gem_shmem_object *shmem)
2194a63a818db7 Noralf Trønnes 2019-03-12 245 {
2194a63a818db7 Noralf Trønnes 2019-03-12 246 struct drm_gem_object *obj = &shmem->base;
2194a63a818db7 Noralf Trønnes 2019-03-12 247 int ret;
2194a63a818db7 Noralf Trønnes 2019-03-12 248
2194a63a818db7 Noralf Trønnes 2019-03-12 249 if (shmem->vmap_use_count++ > 0)
2194a63a818db7 Noralf Trønnes 2019-03-12 250 return shmem->vaddr;
2194a63a818db7 Noralf Trønnes 2019-03-12 251
2194a63a818db7 Noralf Trønnes 2019-03-12 252 ret = drm_gem_shmem_get_pages(shmem);
2194a63a818db7 Noralf Trønnes 2019-03-12 253 if (ret)
2194a63a818db7 Noralf Trønnes 2019-03-12 254 goto err_zero_use;
2194a63a818db7 Noralf Trønnes 2019-03-12 255
2194a63a818db7 Noralf Trønnes 2019-03-12 256 if (obj->import_attach)
2194a63a818db7 Noralf Trønnes 2019-03-12 257 shmem->vaddr = dma_buf_vmap(obj->import_attach->dmabuf);
2194a63a818db7 Noralf Trønnes 2019-03-12 258 else
be7d9f05c53e6f Boris Brezillon 2019-05-29 259 shmem->vaddr = vmap(shmem->pages, obj->size >> PAGE_SHIFT,
be7d9f05c53e6f Boris Brezillon 2019-05-29 @260 VM_MAP, pgprot_writecombine(PAGE_KERNEL));
2194a63a818db7 Noralf Trønnes 2019-03-12 261
2194a63a818db7 Noralf Trønnes 2019-03-12 262 if (!shmem->vaddr) {
2194a63a818db7 Noralf Trønnes 2019-03-12 263 DRM_DEBUG_KMS("Failed to vmap pages\n");
2194a63a818db7 Noralf Trønnes 2019-03-12 264 ret = -ENOMEM;
2194a63a818db7 Noralf Trønnes 2019-03-12 265 goto err_put_pages;
2194a63a818db7 Noralf Trønnes 2019-03-12 266 }
2194a63a818db7 Noralf Trønnes 2019-03-12 267
2194a63a818db7 Noralf Trønnes 2019-03-12 268 return shmem->vaddr;
2194a63a818db7 Noralf Trønnes 2019-03-12 269
2194a63a818db7 Noralf Trønnes 2019-03-12 270 err_put_pages:
2194a63a818db7 Noralf Trønnes 2019-03-12 271 drm_gem_shmem_put_pages(shmem);
2194a63a818db7 Noralf Trønnes 2019-03-12 272 err_zero_use:
2194a63a818db7 Noralf Trønnes 2019-03-12 273 shmem->vmap_use_count = 0;
2194a63a818db7 Noralf Trønnes 2019-03-12 274
2194a63a818db7 Noralf Trønnes 2019-03-12 275 return ERR_PTR(ret);
2194a63a818db7 Noralf Trønnes 2019-03-12 276 }
2194a63a818db7 Noralf Trønnes 2019-03-12 277
:::::: The code at line 260 was first introduced by commit
:::::: be7d9f05c53e6fc88525f8e55cf2dae937761799 drm/gem_shmem: Use a writecombine mapping for ->vaddr
:::::: TO: Boris Brezillon <boris.brezillon(a)collabora.com>
:::::: CC: Rob Herring <robh(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH bpf-next 1/2] bpf, x86: Factor common x86 JIT code
by kernel test robot
Hi Tobias,
I love your patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Tobias-Klauser/bpf-x86-Factor-co...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-s022-20200710 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-37-gc9676a3b-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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 >>)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (e58948 becomes 48)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (e58948 becomes 8948)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (ec8148 becomes 48)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (ec8148 becomes 8148)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (5541 becomes 41)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (5641 becomes 41)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (5741 becomes 41)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (d289 becomes 89)
>> arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (1c5639 becomes 39)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (1c5639 becomes 5639)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (2b76 becomes 76)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (858b becomes 8b)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (fffffddc becomes dc)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (20f883 becomes 83)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (20f883 becomes f883)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (2077 becomes 77)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (1c083 becomes 83)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (1c083 becomes c083)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (8589 becomes 89)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (fffffddc becomes dc)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (d6848b48 becomes 48)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (d6848b48 becomes 8b48)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (190 becomes 90)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (c08548 becomes 48)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (c08548 becomes 8548)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (a74 becomes 74)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (30408b48 becomes 48)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (30408b48 becomes 8b48)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (19c08348 becomes 48)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (19c08348 becomes 8348)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (e0ff becomes ff)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (858b becomes 8b)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (fffffddc becomes dc)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (20f883 becomes 83)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (20f883 becomes f883)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (e77 becomes 77)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (1c083 becomes 83)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (1c083 becomes c083)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (8589 becomes 89)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (fffffddc becomes dc)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (8966 becomes 66)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (c3c749 becomes 49)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (c3c749 becomes c749)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (d231 becomes 31)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (f3f749 becomes 49)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (f3f749 becomes f749)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (f3f741 becomes 41)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (f3f741 becomes f741)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (d38949 becomes 49)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (d38949 becomes 8949)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (c38949 becomes 49)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (c38949 becomes 8949)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (b70f45 becomes 45)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (b70f45 becomes f45)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (b70f becomes f)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (f41 becomes 41)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (b70f45 becomes 45)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (b70f45 becomes f45)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (b70f becomes f)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (c641 becomes 41)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (c74166 becomes 66)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (c74166 becomes 4166)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (c766 becomes 66)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (c741 becomes 41)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (1f0 becomes f0)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (5f41 becomes 41)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (5e41 becomes 41)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (5d41 becomes 41)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (f87d8348 becomes 48)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (f87d8348 becomes 8348)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (e58948 becomes 48)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (e58948 becomes 8948)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (8c48348 becomes 48)
arch/x86/net/bpf_jit.h:15:31: sparse: sparse: cast truncates bits from constant value (8c48348 becomes 8348)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (e2ff becomes ff)
arch/x86/net/bpf_jit.h:13:24: sparse: sparse: cast truncates bits from constant value (8f0f becomes f)
vim +13 arch/x86/net/bpf_jit.h
9
10 static inline u8 *emit_code(u8 *ptr, u32 bytes, unsigned int len)
11 {
12 if (len == 1)
> 13 *ptr = bytes;
14 else if (len == 2)
15 *(u16 *)ptr = bytes;
16 else {
17 *(u32 *)ptr = bytes;
18 barrier();
19 }
20 return ptr + len;
21 }
22
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[alexshi:58lru 16/21] arch/nios2/include/asm/irqflags.h:12:9: sparse: sparse: context imbalance in '__munlock_pagevec' - unexpected unlock
by kernel test robot
tree: https://github.com/alexshi/linux.git 58lru
head: d89fa86f842f0474cc8fb76e2896e84209d99746
commit: f9f7d0891bce8957b6c28239c6bc99e4b4b8357c [16/21] mm/lru: replace pgdat lru_lock with lruvec lock
config: nios2-randconfig-s031-20200710 (attached as .config)
compiler: nios2-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.2-37-gc9676a3b-dirty
git checkout f9f7d0891bce8957b6c28239c6bc99e4b4b8357c
# 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=nios2
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 >>)
>> arch/nios2/include/asm/irqflags.h:12:9: sparse: sparse: context imbalance in '__munlock_pagevec' - unexpected unlock
include/linux/mm.h:1972:21: sparse: sparse: context imbalance in '__munlock_pagevec_fill' - different lock contexts for basic block
vim +/__munlock_pagevec +12 arch/nios2/include/asm/irqflags.h
f27ffc751ca5d2 Ley Foon Tan 2014-11-06 9
f27ffc751ca5d2 Ley Foon Tan 2014-11-06 10 static inline unsigned long arch_local_save_flags(void)
f27ffc751ca5d2 Ley Foon Tan 2014-11-06 11 {
f27ffc751ca5d2 Ley Foon Tan 2014-11-06 @12 return RDCTL(CTL_STATUS);
f27ffc751ca5d2 Ley Foon Tan 2014-11-06 13 }
f27ffc751ca5d2 Ley Foon Tan 2014-11-06 14
:::::: The code at line 12 was first introduced by commit
:::::: f27ffc751ca5d216a347084996c70452a4e185a4 nios2: Interrupt handling
:::::: TO: Ley Foon Tan <lftan(a)altera.com>
:::::: CC: Ley Foon Tan <lftan(a)altera.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[mlankhorst:locking-rework 29/30] drivers/gpu/drm/i915/gem/i915_gem_object.c:56:22: error: 'struct <anonymous>' has no member named 'lock'; did you mean
by kernel test robot
tree: git://people.freedesktop.org/~mlankhorst/linux locking-rework
head: df835d9d9fee30c2d4584242c64c8b32eae0d0a4
commit: 1537cd41b6372ff0e16eebc7d867d6d6ad7aebde [29/30] remove obj->mm.lock
config: x86_64-fedora-25 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 1537cd41b6372ff0e16eebc7d867d6d6ad7aebde
# 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 >>):
In file included from include/linux/rhashtable-types.h:14,
from include/linux/ipc.h:7,
from include/uapi/linux/sem.h:5,
from include/linux/sem.h:5,
from include/linux/sched.h:15,
from include/linux/sched/mm.h:7,
from drivers/gpu/drm/i915/gem/i915_gem_object.c:25:
drivers/gpu/drm/i915/gem/i915_gem_object.c: In function 'i915_gem_object_init':
>> drivers/gpu/drm/i915/gem/i915_gem_object.c:56:22: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
56 | mutex_init(&obj->mm.lock);
| ^~~~
include/linux/mutex.h:108:16: note: in definition of macro 'mutex_init'
108 | __mutex_init((mutex), #mutex, &__key); \
| ^~~~~
drivers/gpu/drm/i915/gem/i915_gem_object.c:79:22: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
79 | &obj->mm.lock);
| ^~~~
| blocks
--
In file included from include/linux/spinlock_types.h:18,
from include/linux/spinlock.h:83,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/io-mapping.h:10,
from drivers/gpu/drm/i915/i915_drv.h:36,
from drivers/gpu/drm/i915/gem/i915_gem_pages.c:7:
drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function '__i915_gem_object_set_pages':
>> drivers/gpu/drm/i915/gem/i915_gem_pages.c:21:31: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
21 | lockdep_assert_held(&obj->mm.lock);
| ^~~~
include/linux/lockdep.h:545:46: note: in definition of macro 'lockdep_assert_held'
545 | #define lockdep_assert_held(l) do { (void)(l); } while (0)
| ^
In file included from include/linux/notifier.h:14,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/io-mapping.h:10,
from drivers/gpu/drm/i915/i915_drv.h:36,
from drivers/gpu/drm/i915/gem/i915_gem_pages.c:7:
drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function '__i915_gem_object_get_pages':
drivers/gpu/drm/i915/gem/i915_gem_pages.c:112:49: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
112 | err = mutex_lock_interruptible_nested(&obj->mm.lock, I915_MM_GET_PAGES);
| ^~~~
include/linux/mutex.h:174:83: note: in definition of macro 'mutex_lock_interruptible_nested'
174 | # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock)
| ^~~~
drivers/gpu/drm/i915/gem/i915_gem_pages.c:128:24: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
128 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
In file included from include/linux/spinlock_types.h:18,
from include/linux/spinlock.h:83,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/io-mapping.h:10,
from drivers/gpu/drm/i915/i915_drv.h:36,
from drivers/gpu/drm/i915/gem/i915_gem_pages.c:7:
drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function 'i915_gem_object_writeback':
drivers/gpu/drm/i915/gem/i915_gem_pages.c:143:31: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
143 | lockdep_assert_held(&obj->mm.lock);
| ^~~~
include/linux/lockdep.h:545:46: note: in definition of macro 'lockdep_assert_held'
545 | #define lockdep_assert_held(l) do { (void)(l); } while (0)
| ^
drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function '__i915_gem_object_put_pages':
drivers/gpu/drm/i915/gem/i915_gem_pages.c:203:22: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
203 | mutex_lock(&obj->mm.lock);
| ^~~~
| blocks
drivers/gpu/drm/i915/gem/i915_gem_pages.c:232:24: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
232 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
In file included from include/linux/notifier.h:14,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/io-mapping.h:10,
from drivers/gpu/drm/i915/i915_drv.h:36,
from drivers/gpu/drm/i915/gem/i915_gem_pages.c:7:
drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function 'i915_gem_object_pin_map':
drivers/gpu/drm/i915/gem/i915_gem_pages.c:328:49: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
328 | err = mutex_lock_interruptible_nested(&obj->mm.lock, I915_MM_GET_PAGES);
| ^~~~
include/linux/mutex.h:174:83: note: in definition of macro 'mutex_lock_interruptible_nested'
174 | # define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock)
| ^~~~
drivers/gpu/drm/i915/gem/i915_gem_pages.c:373:24: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
373 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
--
In file included from include/linux/notifier.h:14,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/fs.h:15,
from include/linux/highmem.h:5,
from drivers/gpu/drm/i915/gem/i915_gem_phys.c:7:
drivers/gpu/drm/i915/gem/i915_gem_phys.c: In function 'i915_gem_object_attach_phys':
>> drivers/gpu/drm/i915/gem/i915_gem_phys.c:177:29: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
177 | mutex_lock_nested(&obj->mm.lock, I915_MM_GET_PAGES);
| ^~~~
include/linux/mutex.h:173:55: note: in definition of macro 'mutex_lock_nested'
173 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock)
| ^~~~
drivers/gpu/drm/i915/gem/i915_gem_phys.c:220:24: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
220 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
--
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c: In function 'i915_gem_shrink':
>> drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:197:25: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
197 | mutex_lock(&obj->mm.lock);
| ^~~~
| blocks
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:202:27: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
202 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
--
drivers/gpu/drm/i915/gem/i915_gem_tiling.c: In function 'i915_gem_object_set_tiling':
>> drivers/gpu/drm/i915/gem/i915_gem_tiling.c:268:22: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
268 | mutex_lock(&obj->mm.lock);
| ^~~~
| blocks
drivers/gpu/drm/i915/gem/i915_gem_tiling.c:283:24: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
283 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
vim +56 drivers/gpu/drm/i915/gem/i915_gem_object.c
> 25 #include <linux/sched/mm.h>
26
27 #include "display/intel_frontbuffer.h"
28 #include "gt/intel_gt.h"
29 #include "i915_drv.h"
30 #include "i915_gem_clflush.h"
31 #include "i915_gem_context.h"
32 #include "i915_gem_mman.h"
33 #include "i915_gem_object.h"
34 #include "i915_globals.h"
35 #include "i915_trace.h"
36
37 static struct i915_global_object {
38 struct i915_global base;
39 struct kmem_cache *slab_objects;
40 } global;
41
42 struct drm_i915_gem_object *i915_gem_object_alloc(void)
43 {
44 return kmem_cache_zalloc(global.slab_objects, GFP_KERNEL);
45 }
46
47 void i915_gem_object_free(struct drm_i915_gem_object *obj)
48 {
49 return kmem_cache_free(global.slab_objects, obj);
50 }
51
52 void i915_gem_object_init(struct drm_i915_gem_object *obj,
53 const struct drm_i915_gem_object_ops *ops,
54 struct lock_class_key *key)
55 {
> 56 mutex_init(&obj->mm.lock);
57
58 spin_lock_init(&obj->vma.lock);
59 INIT_LIST_HEAD(&obj->vma.list);
60
61 INIT_LIST_HEAD(&obj->mm.link);
62
63 INIT_LIST_HEAD(&obj->lut_list);
64 spin_lock_init(&obj->lut_lock);
65
66 spin_lock_init(&obj->mmo.lock);
67 obj->mmo.offsets = RB_ROOT;
68
69 init_rcu_head(&obj->rcu);
70
71 obj->ops = ops;
72
73 obj->mm.madv = I915_MADV_WILLNEED;
74 INIT_RADIX_TREE(&obj->mm.get_page.radix, GFP_KERNEL | __GFP_NOWARN);
75 mutex_init(&obj->mm.get_page.lock);
76
77 if (IS_ENABLED(CONFIG_LOCKDEP) && i915_gem_object_is_shrinkable(obj))
78 i915_gem_shrinker_taints_mutex(to_i915(obj->base.dev),
79 &obj->mm.lock);
80 }
81
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[linux-next:master 6663/7247] arch/riscv/mm/init.c:520:13: warning: no previous prototype for function 'resource_init'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d31958b30ea3b7b6e522d6bf449427748ad45822
commit: 526fbaed33e8eac89634a676e5f8e3b41dfae66e [6663/7247] riscv: Register System RAM as iomem resources
config: riscv-randconfig-r005-20200710 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
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
git checkout 526fbaed33e8eac89634a676e5f8e3b41dfae66e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
>> arch/riscv/mm/init.c:520:13: warning: no previous prototype for function 'resource_init' [-Wmissing-prototypes]
void __init resource_init(void)
^
arch/riscv/mm/init.c:520:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init resource_init(void)
^
static
1 warning generated.
vim +/resource_init +520 arch/riscv/mm/init.c
519
> 520 void __init resource_init(void)
521 {
522 struct memblock_region *region;
523
524 for_each_memblock(memory, region) {
525 struct resource *res;
526
527 res = memblock_alloc(sizeof(struct resource), SMP_CACHE_BYTES);
528 if (!res)
529 panic("%s: Failed to allocate %zu bytes\n", __func__,
530 sizeof(struct resource));
531
532 if (memblock_is_nomap(region)) {
533 res->name = "reserved";
534 res->flags = IORESOURCE_MEM;
535 } else {
536 res->name = "System RAM";
537 res->flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY;
538 }
539 res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region));
540 res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1;
541
542 request_resource(&iomem_resource, res);
543 }
544 }
545
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months