[s390:features 40/44] drivers/gpu/drm/drm_lock.c:75:24: sparse: sparse: incorrect type in argument 1 (different modifiers)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
head: 9d42a4d3e27db3cabad82483ed876d4c8b8bed65
commit: 000174233b91340ca52a9eca905d029a9a2aefd9 [40/44] s390/atomic,cmpxchg: switch to use atomic-instrumented.h
config: s390-randconfig-s032-20210412 (attached as .config)
compiler: s390-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-280-g2cd6d34e-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?id...
git remote add s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
git fetch --no-tags s390 features
git checkout 000174233b91340ca52a9eca905d029a9a2aefd9
# 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=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/drm_lock.c:75:24: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected void *ptr @@ got unsigned int volatile *__ai_ptr @@
drivers/gpu/drm/drm_lock.c:75:24: sparse: expected void *ptr
drivers/gpu/drm/drm_lock.c:75:24: sparse: got unsigned int volatile *__ai_ptr
drivers/gpu/drm/drm_lock.c:118:24: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected void *ptr @@ got unsigned int volatile *__ai_ptr @@
drivers/gpu/drm/drm_lock.c:118:24: sparse: expected void *ptr
drivers/gpu/drm/drm_lock.c:118:24: sparse: got unsigned int volatile *__ai_ptr
drivers/gpu/drm/drm_lock.c:141:24: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected void *ptr @@ got unsigned int volatile *__ai_ptr @@
drivers/gpu/drm/drm_lock.c:141:24: sparse: expected void *ptr
drivers/gpu/drm/drm_lock.c:141:24: sparse: got unsigned int volatile *__ai_ptr
drivers/gpu/drm/drm_lock.c:319:40: sparse: sparse: incorrect type in argument 1 (different modifiers) @@ expected void *ptr @@ got unsigned int volatile *__ai_ptr @@
drivers/gpu/drm/drm_lock.c:319:40: sparse: expected void *ptr
drivers/gpu/drm/drm_lock.c:319:40: sparse: got unsigned int volatile *__ai_ptr
vim +75 drivers/gpu/drm/drm_lock.c
4ac5ec40ec7002 Daniel Vetter 2010-08-23 48
bd50d4a2168370 Benjamin Gaignard 2020-03-06 49 /*
1a75a222f5ca10 Daniel Vetter 2016-06-14 50 * Take the heavyweight lock.
1a75a222f5ca10 Daniel Vetter 2016-06-14 51 *
1a75a222f5ca10 Daniel Vetter 2016-06-14 52 * \param lock lock pointer.
1a75a222f5ca10 Daniel Vetter 2016-06-14 53 * \param context locking context.
1a75a222f5ca10 Daniel Vetter 2016-06-14 54 * \return one if the lock is held, or zero otherwise.
1a75a222f5ca10 Daniel Vetter 2016-06-14 55 *
1a75a222f5ca10 Daniel Vetter 2016-06-14 56 * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
1a75a222f5ca10 Daniel Vetter 2016-06-14 57 */
1a75a222f5ca10 Daniel Vetter 2016-06-14 58 static
1a75a222f5ca10 Daniel Vetter 2016-06-14 59 int drm_lock_take(struct drm_lock_data *lock_data,
1a75a222f5ca10 Daniel Vetter 2016-06-14 60 unsigned int context)
1a75a222f5ca10 Daniel Vetter 2016-06-14 61 {
1a75a222f5ca10 Daniel Vetter 2016-06-14 62 unsigned int old, new, prev;
1a75a222f5ca10 Daniel Vetter 2016-06-14 63 volatile unsigned int *lock = &lock_data->hw_lock->lock;
1a75a222f5ca10 Daniel Vetter 2016-06-14 64
1a75a222f5ca10 Daniel Vetter 2016-06-14 65 spin_lock_bh(&lock_data->spinlock);
1a75a222f5ca10 Daniel Vetter 2016-06-14 66 do {
1a75a222f5ca10 Daniel Vetter 2016-06-14 67 old = *lock;
1a75a222f5ca10 Daniel Vetter 2016-06-14 68 if (old & _DRM_LOCK_HELD)
1a75a222f5ca10 Daniel Vetter 2016-06-14 69 new = old | _DRM_LOCK_CONT;
1a75a222f5ca10 Daniel Vetter 2016-06-14 70 else {
1a75a222f5ca10 Daniel Vetter 2016-06-14 71 new = context | _DRM_LOCK_HELD |
1a75a222f5ca10 Daniel Vetter 2016-06-14 72 ((lock_data->user_waiters + lock_data->kernel_waiters > 1) ?
1a75a222f5ca10 Daniel Vetter 2016-06-14 73 _DRM_LOCK_CONT : 0);
1a75a222f5ca10 Daniel Vetter 2016-06-14 74 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 @75 prev = cmpxchg(lock, old, new);
1a75a222f5ca10 Daniel Vetter 2016-06-14 76 } while (prev != old);
1a75a222f5ca10 Daniel Vetter 2016-06-14 77 spin_unlock_bh(&lock_data->spinlock);
1a75a222f5ca10 Daniel Vetter 2016-06-14 78
1a75a222f5ca10 Daniel Vetter 2016-06-14 79 if (_DRM_LOCKING_CONTEXT(old) == context) {
1a75a222f5ca10 Daniel Vetter 2016-06-14 80 if (old & _DRM_LOCK_HELD) {
1a75a222f5ca10 Daniel Vetter 2016-06-14 81 if (context != DRM_KERNEL_CONTEXT) {
1a75a222f5ca10 Daniel Vetter 2016-06-14 82 DRM_ERROR("%d holds heavyweight lock\n",
1a75a222f5ca10 Daniel Vetter 2016-06-14 83 context);
1a75a222f5ca10 Daniel Vetter 2016-06-14 84 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 85 return 0;
1a75a222f5ca10 Daniel Vetter 2016-06-14 86 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 87 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 88
1a75a222f5ca10 Daniel Vetter 2016-06-14 89 if ((_DRM_LOCKING_CONTEXT(new)) == context && (new & _DRM_LOCK_HELD)) {
1a75a222f5ca10 Daniel Vetter 2016-06-14 90 /* Have lock */
1a75a222f5ca10 Daniel Vetter 2016-06-14 91 return 1;
1a75a222f5ca10 Daniel Vetter 2016-06-14 92 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 93 return 0;
1a75a222f5ca10 Daniel Vetter 2016-06-14 94 }
1a75a222f5ca10 Daniel Vetter 2016-06-14 95
:::::: The code at line 75 was first introduced by commit
:::::: 1a75a222f5ca1063249b5c92972d32dcc3c8966e drm: Hide hw.lock cleanup in filp->release better
:::::: TO: Daniel Vetter <daniel.vetter(a)ffwll.ch>
:::::: CC: Daniel Vetter <daniel.vetter(a)ffwll.ch>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[linux-next:master 12059/12188] kernel/gcov/clang.c:371:19: warning: incompatible integer to pointer conversion assigning to 'u64 *' (aka 'unsigned long long *') from 'int'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5df924d19629975d565da37eb7268c7bf4d491fe
commit: 3e09dd7690da513de18a1abdabaaf206fd9972e1 [12059/12188] gcov: use kvmalloc()
config: powerpc64-randconfig-r031-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 3e09dd7690da513de18a1abdabaaf206fd9972e1
# 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 >>):
kernel/gcov/clang.c:88:6: warning: no previous prototype for function 'llvm_gcov_init' [-Wmissing-prototypes]
void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
^
kernel/gcov/clang.c:88:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
^
static
kernel/gcov/clang.c:121:6: warning: no previous prototype for function 'llvm_gcda_start_file' [-Wmissing-prototypes]
void llvm_gcda_start_file(const char *orig_filename, u32 version, u32 checksum)
^
kernel/gcov/clang.c:121:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_start_file(const char *orig_filename, u32 version, u32 checksum)
^
static
kernel/gcov/clang.c:150:6: warning: no previous prototype for function 'llvm_gcda_emit_function' [-Wmissing-prototypes]
void llvm_gcda_emit_function(u32 ident, u32 func_checksum, u32 cfg_checksum)
^
kernel/gcov/clang.c:150:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_emit_function(u32 ident, u32 func_checksum, u32 cfg_checksum)
^
static
kernel/gcov/clang.c:166:6: warning: no previous prototype for function 'llvm_gcda_emit_arcs' [-Wmissing-prototypes]
void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters)
^
kernel/gcov/clang.c:166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_emit_arcs(u32 num_counters, u64 *counters)
^
static
kernel/gcov/clang.c:176:6: warning: no previous prototype for function 'llvm_gcda_summary_info' [-Wmissing-prototypes]
void llvm_gcda_summary_info(void)
^
kernel/gcov/clang.c:176:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_summary_info(void)
^
static
kernel/gcov/clang.c:181:6: warning: no previous prototype for function 'llvm_gcda_end_file' [-Wmissing-prototypes]
void llvm_gcda_end_file(void)
^
kernel/gcov/clang.c:181:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void llvm_gcda_end_file(void)
^
static
kernel/gcov/clang.c:371:21: error: implicit declaration of function 'vmalloc' [-Werror,-Wimplicit-function-declaration]
fn_dup->counters = vmalloc(cv_size);
^
>> kernel/gcov/clang.c:371:19: warning: incompatible integer to pointer conversion assigning to 'u64 *' (aka 'unsigned long long *') from 'int' [-Wint-conversion]
fn_dup->counters = vmalloc(cv_size);
^ ~~~~~~~~~~~~~~~~
7 warnings and 1 error generated.
vim +371 kernel/gcov/clang.c
e178a5beb36960 Greg Hackmann 2019-05-14 331
60bcf728ee7c60 Nick Desaulniers 2021-03-24 332 #if CONFIG_CLANG_VERSION < 110000
e178a5beb36960 Greg Hackmann 2019-05-14 333 static struct gcov_fn_info *gcov_fn_info_dup(struct gcov_fn_info *fn)
e178a5beb36960 Greg Hackmann 2019-05-14 334 {
e178a5beb36960 Greg Hackmann 2019-05-14 335 size_t cv_size; /* counter values size */
3e09dd7690da51 Johannes Berg 2021-04-12 336 struct gcov_fn_info *fn_dup = kmemdup(fn, sizeof(*fn), GFP_KERNEL);
3e09dd7690da51 Johannes Berg 2021-04-12 337
e178a5beb36960 Greg Hackmann 2019-05-14 338 if (!fn_dup)
e178a5beb36960 Greg Hackmann 2019-05-14 339 return NULL;
e178a5beb36960 Greg Hackmann 2019-05-14 340 INIT_LIST_HEAD(&fn_dup->head);
e178a5beb36960 Greg Hackmann 2019-05-14 341
e178a5beb36960 Greg Hackmann 2019-05-14 342 fn_dup->function_name = kstrdup(fn->function_name, GFP_KERNEL);
e178a5beb36960 Greg Hackmann 2019-05-14 343 if (!fn_dup->function_name)
e178a5beb36960 Greg Hackmann 2019-05-14 344 goto err_name;
e178a5beb36960 Greg Hackmann 2019-05-14 345
e178a5beb36960 Greg Hackmann 2019-05-14 346 cv_size = fn->num_counters * sizeof(fn->counters[0]);
3e09dd7690da51 Johannes Berg 2021-04-12 347 fn_dup->counters = kvmalloc(cv_size, GFP_KERNEL);
e178a5beb36960 Greg Hackmann 2019-05-14 348 if (!fn_dup->counters)
e178a5beb36960 Greg Hackmann 2019-05-14 349 goto err_counters;
e178a5beb36960 Greg Hackmann 2019-05-14 350 memcpy(fn_dup->counters, fn->counters, cv_size);
e178a5beb36960 Greg Hackmann 2019-05-14 351
e178a5beb36960 Greg Hackmann 2019-05-14 352 return fn_dup;
e178a5beb36960 Greg Hackmann 2019-05-14 353
e178a5beb36960 Greg Hackmann 2019-05-14 354 err_counters:
e178a5beb36960 Greg Hackmann 2019-05-14 355 kfree(fn_dup->function_name);
e178a5beb36960 Greg Hackmann 2019-05-14 356 err_name:
e178a5beb36960 Greg Hackmann 2019-05-14 357 kfree(fn_dup);
e178a5beb36960 Greg Hackmann 2019-05-14 358 return NULL;
e178a5beb36960 Greg Hackmann 2019-05-14 359 }
60bcf728ee7c60 Nick Desaulniers 2021-03-24 360 #else
60bcf728ee7c60 Nick Desaulniers 2021-03-24 361 static struct gcov_fn_info *gcov_fn_info_dup(struct gcov_fn_info *fn)
60bcf728ee7c60 Nick Desaulniers 2021-03-24 362 {
60bcf728ee7c60 Nick Desaulniers 2021-03-24 363 size_t cv_size; /* counter values size */
60bcf728ee7c60 Nick Desaulniers 2021-03-24 364 struct gcov_fn_info *fn_dup = kmemdup(fn, sizeof(*fn),
60bcf728ee7c60 Nick Desaulniers 2021-03-24 365 GFP_KERNEL);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 366 if (!fn_dup)
60bcf728ee7c60 Nick Desaulniers 2021-03-24 367 return NULL;
60bcf728ee7c60 Nick Desaulniers 2021-03-24 368 INIT_LIST_HEAD(&fn_dup->head);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 369
60bcf728ee7c60 Nick Desaulniers 2021-03-24 370 cv_size = fn->num_counters * sizeof(fn->counters[0]);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 @371 fn_dup->counters = vmalloc(cv_size);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 372 if (!fn_dup->counters) {
60bcf728ee7c60 Nick Desaulniers 2021-03-24 373 kfree(fn_dup);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 374 return NULL;
60bcf728ee7c60 Nick Desaulniers 2021-03-24 375 }
60bcf728ee7c60 Nick Desaulniers 2021-03-24 376
60bcf728ee7c60 Nick Desaulniers 2021-03-24 377 memcpy(fn_dup->counters, fn->counters, cv_size);
60bcf728ee7c60 Nick Desaulniers 2021-03-24 378
60bcf728ee7c60 Nick Desaulniers 2021-03-24 379 return fn_dup;
60bcf728ee7c60 Nick Desaulniers 2021-03-24 380 }
60bcf728ee7c60 Nick Desaulniers 2021-03-24 381 #endif
e178a5beb36960 Greg Hackmann 2019-05-14 382
:::::: The code at line 371 was first introduced by commit
:::::: 60bcf728ee7c60ac2a1f9a0eaceb3a7b3954cd2b gcov: fix clang-11+ support
:::::: TO: Nick Desaulniers <ndesaulniers(a)google.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[arm-integrator:kernel-in-vmalloc 4/4] arch/arm/mm/init.c:229:8: error: 'SECTION_SIZE' undeclared; did you mean 'SECTOR_SIZE'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git kernel-in-vmalloc
head: 36599cc528d95e8a38d54b86af874f1ab34943f2
commit: 36599cc528d95e8a38d54b86af874f1ab34943f2 [4/4] First stab
config: arm-allnoconfig (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/linusw/linux-integrator.g...
git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
git fetch --no-tags arm-integrator kernel-in-vmalloc
git checkout 36599cc528d95e8a38d54b86af874f1ab34943f2
# 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 error/warnings (new ones prefixed by >>):
arch/arm/mm/init.c:97:13: warning: no previous prototype for 'setup_dma_zone' [-Wmissing-prototypes]
97 | void __init setup_dma_zone(const struct machine_desc *mdesc)
| ^~~~~~~~~~~~~~
In file included from include/linux/kernel.h:13,
from arch/arm/mm/init.c:7:
arch/arm/mm/init.c: In function 'arm_memblock_init':
>> arch/arm/mm/init.c:229:8: error: 'SECTION_SIZE' undeclared (first use in this function); did you mean 'SECTOR_SIZE'?
229 | SECTION_SIZE));
| ^~~~~~~~~~~~
include/linux/math.h:14:46: note: in definition of macro '__round_mask'
14 | #define __round_mask(x, y) ((__typeof__(x))((y)-1))
| ^
arch/arm/mm/init.c:228:6: note: in expansion of macro 'round_up'
228 | round_up(KERNEL_END - KERNEL_START,
| ^~~~~~~~
arch/arm/mm/init.c:229:8: note: each undeclared identifier is reported only once for each function it appears in
229 | SECTION_SIZE));
| ^~~~~~~~~~~~
include/linux/math.h:14:46: note: in definition of macro '__round_mask'
14 | #define __round_mask(x, y) ((__typeof__(x))((y)-1))
| ^
arch/arm/mm/init.c:228:6: note: in expansion of macro 'round_up'
228 | round_up(KERNEL_END - KERNEL_START,
| ^~~~~~~~
arch/arm/mm/init.c: At top level:
arch/arm/mm/init.c:309:13: warning: no previous prototype for 'mem_init_print_arm_info' [-Wmissing-prototypes]
309 | void __init mem_init_print_arm_info(void)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm/mm/init.c:36:
arch/arm/include/asm/fixmap.h:39:35: warning: '__end_of_fixed_addresses' defined but not used [-Wunused-const-variable=]
39 | static const enum fixed_addresses __end_of_fixed_addresses =
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/arm/include/asm/memory.h:455,
from arch/arm/include/asm/page.h:160,
from arch/arm/include/asm/thread_info.h:14,
from include/linux/thread_info.h:56,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from mm/gup.c:5:
mm/gup.c: In function '__get_user_pages_locked':
>> mm/gup.c:1495:28: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
1495 | pages[i] = virt_to_page(start);
| ^~~~~
| |
| long unsigned int
include/asm-generic/memory_model.h:33:41: note: in definition of macro '__pfn_to_page'
33 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
mm/gup.c:1495:15: note: in expansion of macro 'virt_to_page'
1495 | pages[i] = virt_to_page(start);
| ^~~~~~~~~~~~
In file included from arch/arm/include/asm/page.h:160,
from arch/arm/include/asm/thread_info.h:14,
from include/linux/thread_info.h:56,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from mm/gup.c:5:
arch/arm/include/asm/memory.h:331:53: note: expected 'const void *' but argument is of type 'long unsigned int'
331 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ~~~~~~~~~~~~^~~~~
--
In file included from arch/arm/include/asm/memory.h:455,
from arch/arm/include/asm/page.h:160,
from arch/arm/include/asm/thread_info.h:14,
from include/linux/thread_info.h:56,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
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/mm.h:10,
from mm/nommu.c:20:
mm/nommu.c: In function 'free_page_series':
>> mm/nommu.c:512:36: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
512 | struct page *page = virt_to_page(from);
| ^~~~
| |
| long unsigned int
include/asm-generic/memory_model.h:33:41: note: in definition of macro '__pfn_to_page'
33 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
mm/nommu.c:512:23: note: in expansion of macro 'virt_to_page'
512 | struct page *page = virt_to_page(from);
| ^~~~~~~~~~~~
In file included from arch/arm/include/asm/page.h:160,
from arch/arm/include/asm/thread_info.h:14,
from include/linux/thread_info.h:56,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
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/mm.h:10,
from mm/nommu.c:20:
arch/arm/include/asm/memory.h:331:53: note: expected 'const void *' but argument is of type 'long unsigned int'
331 | static inline unsigned long virt_to_pfn(const void *kaddr)
| ~~~~~~~~~~~~^~~~~
mm/nommu.c: At top level:
mm/nommu.c:1658:15: warning: no previous prototype for 'arch_get_unmapped_area' [-Wmissing-prototypes]
1658 | unsigned long arch_get_unmapped_area(struct file *file, unsigned long addr,
| ^~~~~~~~~~~~~~~~~~~~~~
vim +229 arch/arm/mm/init.c
96
> 97 void __init setup_dma_zone(const struct machine_desc *mdesc)
98 {
99 #ifdef CONFIG_ZONE_DMA
100 if (mdesc->dma_zone_size) {
101 arm_dma_zone_size = mdesc->dma_zone_size;
102 arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1;
103 } else
104 arm_dma_limit = 0xffffffff;
105 arm_dma_pfn_limit = arm_dma_limit >> PAGE_SHIFT;
106 #endif
107 }
108
109 static void __init zone_sizes_init(unsigned long min, unsigned long max_low,
110 unsigned long max_high)
111 {
112 unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0 };
113
114 #ifdef CONFIG_ZONE_DMA
115 max_zone_pfn[ZONE_DMA] = min(arm_dma_pfn_limit, max_low);
116 #endif
117 max_zone_pfn[ZONE_NORMAL] = max_low;
118 #ifdef CONFIG_HIGHMEM
119 max_zone_pfn[ZONE_HIGHMEM] = max_high;
120 #endif
121 free_area_init(max_zone_pfn);
122 }
123
124 #ifdef CONFIG_HAVE_ARCH_PFN_VALID
125 int pfn_valid(unsigned long pfn)
126 {
127 phys_addr_t addr = __pfn_to_phys(pfn);
128
129 if (__phys_to_pfn(addr) != pfn)
130 return 0;
131
132 return memblock_is_map_memory(addr);
133 }
134 EXPORT_SYMBOL(pfn_valid);
135 #endif
136
137 static bool arm_memblock_steal_permitted = true;
138
139 phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
140 {
141 phys_addr_t phys;
142
143 BUG_ON(!arm_memblock_steal_permitted);
144
145 phys = memblock_phys_alloc(size, align);
146 if (!phys)
147 panic("Failed to steal %pa bytes at %pS\n",
148 &size, (void *)_RET_IP_);
149
150 memblock_free(phys, size);
151 memblock_remove(phys, size);
152
153 return phys;
154 }
155
156 static void __init arm_initrd_init(void)
157 {
158 #ifdef CONFIG_BLK_DEV_INITRD
159 phys_addr_t start;
160 unsigned long size;
161
162 initrd_start = initrd_end = 0;
163
164 if (!phys_initrd_size)
165 return;
166
167 /*
168 * Round the memory region to page boundaries as per free_initrd_mem()
169 * This allows us to detect whether the pages overlapping the initrd
170 * are in use, but more importantly, reserves the entire set of pages
171 * as we don't want these pages allocated for other purposes.
172 */
173 start = round_down(phys_initrd_start, PAGE_SIZE);
174 size = phys_initrd_size + (phys_initrd_start - start);
175 size = round_up(size, PAGE_SIZE);
176
177 if (!memblock_is_region_memory(start, size)) {
178 pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n",
179 (u64)start, size);
180 return;
181 }
182
183 if (memblock_is_region_reserved(start, size)) {
184 pr_err("INITRD: 0x%08llx+0x%08lx overlaps in-use memory region - disabling initrd\n",
185 (u64)start, size);
186 return;
187 }
188
189 memblock_reserve(start, size);
190
191 /* Now convert initrd to virtual addresses */
192 initrd_start = __phys_to_virt(phys_initrd_start);
193 initrd_end = initrd_start + phys_initrd_size;
194 #endif
195 }
196
197 #ifdef CONFIG_CPU_ICACHE_MISMATCH_WORKAROUND
198 void check_cpu_icache_size(int cpuid)
199 {
200 u32 size, ctr;
201
202 asm("mrc p15, 0, %0, c0, c0, 1" : "=r" (ctr));
203
204 size = 1 << ((ctr & 0xf) + 2);
205 if (cpuid != 0 && icache_size != size)
206 pr_info("CPU%u: detected I-Cache line size mismatch, workaround enabled\n",
207 cpuid);
208 if (icache_size > size)
209 icache_size = size;
210 }
211 #endif
212
213 void __init arm_memblock_init(const struct machine_desc *mdesc)
214 {
215 /*
216 * Register the kernel text, kernel data and initrd with memblock.
217 *
218 * When using kernel in vmalloc, we have to round up to the closest
219 * section size, or the temporary section mapping of the tail of the
220 * kernel will be overwritten by memblock allocations. This is not
221 * a problem with the linear kernel map, since the allocations can
222 * use the 1:1 map in that case.
223 */
224 if (!IS_ENABLED(CONFIG_ARM_KERNEL_IN_VMALLOC))
225 memblock_reserve(__pa(KERNEL_START), KERNEL_END - KERNEL_START);
226 else
227 memblock_reserve(__pa(KERNEL_START),
228 round_up(KERNEL_END - KERNEL_START,
> 229 SECTION_SIZE));
230
231 arm_initrd_init();
232
233 arm_mm_memblock_reserve();
234
235 /* reserve any platform specific memblock areas */
236 if (mdesc->reserve)
237 mdesc->reserve();
238
239 early_init_fdt_scan_reserved_mem();
240
241 /* reserve memory for DMA contiguous allocations */
242 dma_contiguous_reserve(arm_dma_limit);
243
244 arm_memblock_steal_permitted = false;
245 memblock_dump_all();
246 }
247
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH nf-next 3/3] netfilter: nftables_offload: special ethertype handling for VLAN
by kernel test robot
Hi Pablo,
I love your patch! Perhaps something to improve:
[auto build test WARNING on nf-next/master]
url: https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-nft_...
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: m68k-allmodconfig (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
# https://github.com/0day-ci/linux/commit/09978fe09a0a0b8a4dcdd065502b6bd73...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pablo-Neira-Ayuso/netfilter-nft_payload-fix-C-VLAN-offload-support/20210412-211319
git checkout 09978fe09a0a0b8a4dcdd065502b6bd73f1d3e5d
# 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 warnings (new ones prefixed by >>):
>> net/netfilter/nf_tables_offload.c:55:6: warning: no previous prototype for 'nft_flow_rule_transfer_vlan' [-Wmissing-prototypes]
55 | void nft_flow_rule_transfer_vlan(struct nft_offload_ctx *ctx,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/nft_flow_rule_transfer_vlan +55 net/netfilter/nf_tables_offload.c
54
> 55 void nft_flow_rule_transfer_vlan(struct nft_offload_ctx *ctx,
56 struct nft_flow_rule *flow)
57 {
58 struct nft_flow_match *match = &flow->match;
59 struct nft_offload_ethertype ethertype = {
60 .value = match->key.basic.n_proto,
61 .mask = match->mask.basic.n_proto,
62 };
63
64 if ((flow->match.dissector.used_keys &
65 (BIT(FLOW_DISSECTOR_KEY_VLAN) | BIT(FLOW_DISSECTOR_KEY_CVLAN))) ==
66 (BIT(FLOW_DISSECTOR_KEY_VLAN) | BIT(FLOW_DISSECTOR_KEY_CVLAN))) {
67 match->key.basic.n_proto = match->key.cvlan.vlan_tpid;
68 match->mask.basic.n_proto = match->mask.cvlan.vlan_tpid;
69 match->key.cvlan.vlan_tpid = match->key.vlan.vlan_tpid;
70 match->mask.cvlan.vlan_tpid = match->mask.vlan.vlan_tpid;
71 match->key.vlan.vlan_tpid = ethertype.value;
72 match->mask.vlan.vlan_tpid = ethertype.mask;
73 } else if (flow->match.dissector.used_keys & (BIT(FLOW_DISSECTOR_KEY_VLAN))) {
74 match->key.basic.n_proto = match->key.vlan.vlan_tpid;
75 match->mask.basic.n_proto = match->mask.vlan.vlan_tpid;
76 match->key.vlan.vlan_tpid = ethertype.value;
77 match->mask.vlan.vlan_tpid = ethertype.mask;
78 } else if (match->key.basic.n_proto == htons(ETH_P_8021Q) ||
79 match->key.basic.n_proto == htons(ETH_P_8021AD)) {
80 match->key.vlan.vlan_tpid = ethertype.value;
81 match->mask.vlan.vlan_tpid = ethertype.mask;
82 match->dissector.used_keys |= BIT(FLOW_DISSECTOR_KEY_VLAN);
83 match->key.basic.n_proto = 0;
84 match->mask.basic.n_proto = 0;
85 match->dissector.used_keys &= ~BIT(FLOW_DISSECTOR_KEY_BASIC);
86 }
87 }
88
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH] staging: media: omap4iss: Replace macro function by static inline function in file iss_csi2.c
by kernel test robot
Hi Aline,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Aline-Santana-Cordeiro/staging-m...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git f2f560e1bdc055a6a306e6b7823ba589794e6564
config: sh-allmodconfig (attached as .config)
compiler: sh4-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
# https://github.com/0day-ci/linux/commit/c8106c60a292b7a0fa55aeac1c0910719...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Aline-Santana-Cordeiro/staging-media-omap4iss-Replace-macro-function-by-static-inline-function-in-file-iss_csi2-c/20210412-213647
git checkout c8106c60a292b7a0fa55aeac1c0910719fc37dec
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/staging/media/omap4iss/iss_csi2.c:600:15: error: return type defaults to 'int' [-Werror=return-type]
600 | static inline csi2_print_register(iss, regs, name)
| ^~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/omap4iss/iss_csi2.c:600:15: error: function declaration isn't a prototype [-Werror=strict-prototypes]
drivers/staging/media/omap4iss/iss_csi2.c: In function 'csi2_print_register':
>> drivers/staging/media/omap4iss/iss_csi2.c:600:15: warning: old-style function definition [-Wold-style-definition]
>> drivers/staging/media/omap4iss/iss_csi2.c:600:15: warning: type of 'iss' defaults to 'int' [-Wmissing-parameter-type]
>> drivers/staging/media/omap4iss/iss_csi2.c:600:15: warning: type of 'regs' defaults to 'int' [-Wmissing-parameter-type]
>> drivers/staging/media/omap4iss/iss_csi2.c:600:15: warning: type of 'name' defaults to 'int' [-Wmissing-parameter-type]
In file included from include/linux/printk.h:409,
from include/linux/kernel.h:16,
from include/linux/delay.h:22,
from drivers/staging/media/omap4iss/iss_csi2.c:10:
>> drivers/staging/media/omap4iss/iss_csi2.c:602:31: error: stray '#' in program
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^
include/linux/dynamic_debug.h:91:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
91 | .format = (fmt), \
| ^~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/staging/media/omap4iss/iss_csi2.c:602:2: note: in expansion of macro 'dev_dbg'
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^~~~~~~
>> drivers/staging/media/omap4iss/iss_csi2.c:602:32: error: expected ')' before 'name'
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^~~~
include/linux/dynamic_debug.h:91:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
91 | .format = (fmt), \
| ^~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/staging/media/omap4iss/iss_csi2.c:602:2: note: in expansion of macro 'dev_dbg'
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^~~~~~~
include/linux/dynamic_debug.h:91:13: note: to match this '('
91 | .format = (fmt), \
| ^
include/linux/dynamic_debug.h:127:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
127 | DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
drivers/staging/media/omap4iss/iss_csi2.c:602:2: note: in expansion of macro 'dev_dbg'
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^~~~~~~
>> drivers/staging/media/omap4iss/iss_csi2.c:602:13: error: invalid type argument of '->' (have 'int')
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^~
include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
drivers/staging/media/omap4iss/iss_csi2.c:602:2: note: in expansion of macro 'dev_dbg'
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^~~~~~~
>> drivers/staging/media/omap4iss/iss_csi2.c:602:31: error: stray '#' in program
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^
include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/staging/media/omap4iss/iss_csi2.c:602:2: note: in expansion of macro 'dev_dbg'
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^~~~~~~
>> drivers/staging/media/omap4iss/iss_csi2.c:602:32: error: expected ')' before 'name'
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^~~~
include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/staging/media/omap4iss/iss_csi2.c:602:2: note: in expansion of macro 'dev_dbg'
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^~~~~~~
drivers/staging/media/omap4iss/iss_csi2.c:603:32: error: stray '##' in program
603 | iss_reg_read(iss, regs, CSI2_##name));
| ^~
include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
drivers/staging/media/omap4iss/iss_csi2.c:602:2: note: in expansion of macro 'dev_dbg'
602 | dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
| ^~~~~~~
drivers/staging/media/omap4iss/iss_csi2.c: In function 'csi2_print_status':
>> drivers/staging/media/omap4iss/iss_csi2.c:616:40: error: 'SYSCONFIG' undeclared (first use in this function); did you mean 'RSZ_SYSCONFIG'?
616 | csi2_print_register(iss, csi2->regs1, SYSCONFIG);
| ^~~~~~~~~
| RSZ_SYSCONFIG
drivers/staging/media/omap4iss/iss_csi2.c:616:40: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/staging/media/omap4iss/iss_csi2.c:617:40: error: 'SYSSTATUS' undeclared (first use in this function)
617 | csi2_print_register(iss, csi2->regs1, SYSSTATUS);
| ^~~~~~~~~
>> drivers/staging/media/omap4iss/iss_csi2.c:618:40: error: 'IRQENABLE' undeclared (first use in this function); did you mean 'IF_ENABLED'?
618 | csi2_print_register(iss, csi2->regs1, IRQENABLE);
| ^~~~~~~~~
| IF_ENABLED
>> drivers/staging/media/omap4iss/iss_csi2.c:619:40: error: 'IRQSTATUS' undeclared (first use in this function)
619 | csi2_print_register(iss, csi2->regs1, IRQSTATUS);
| ^~~~~~~~~
>> drivers/staging/media/omap4iss/iss_csi2.c:620:40: error: 'CTRL' undeclared (first use in this function)
620 | csi2_print_register(iss, csi2->regs1, CTRL);
| ^~~~
>> drivers/staging/media/omap4iss/iss_csi2.c:621:40: error: 'DBG_H' undeclared (first use in this function)
621 | csi2_print_register(iss, csi2->regs1, DBG_H);
| ^~~~~
>> drivers/staging/media/omap4iss/iss_csi2.c:622:40: error: 'COMPLEXIO_CFG' undeclared (first use in this function); did you mean 'CSI2_COMPLEXIO_CFG'?
622 | csi2_print_register(iss, csi2->regs1, COMPLEXIO_CFG);
| ^~~~~~~~~~~~~
| CSI2_COMPLEXIO_CFG
>> drivers/staging/media/omap4iss/iss_csi2.c:623:40: error: 'COMPLEXIO_IRQSTATUS' undeclared (first use in this function); did you mean 'CSI2_COMPLEXIO_IRQSTATUS'?
623 | csi2_print_register(iss, csi2->regs1, COMPLEXIO_IRQSTATUS);
| ^~~~~~~~~~~~~~~~~~~
| CSI2_COMPLEXIO_IRQSTATUS
>> drivers/staging/media/omap4iss/iss_csi2.c:624:40: error: 'SHORT_PACKET' undeclared (first use in this function); did you mean 'SHORT_PACKET_IRQ'?
624 | csi2_print_register(iss, csi2->regs1, SHORT_PACKET);
| ^~~~~~~~~~~~
| SHORT_PACKET_IRQ
>> drivers/staging/media/omap4iss/iss_csi2.c:625:40: error: 'COMPLEXIO_IRQENABLE' undeclared (first use in this function); did you mean 'CSI2_COMPLEXIO_IRQENABLE'?
625 | csi2_print_register(iss, csi2->regs1, COMPLEXIO_IRQENABLE);
| ^~~~~~~~~~~~~~~~~~~
| CSI2_COMPLEXIO_IRQENABLE
drivers/staging/media/omap4iss/iss_csi2.c:626:40: error: 'DBG_P' undeclared (first use in this function)
626 | csi2_print_register(iss, csi2->regs1, DBG_P);
| ^~~~~
drivers/staging/media/omap4iss/iss_csi2.c:627:40: error: 'TIMING' undeclared (first use in this function); did you mean 'TIME_INS'?
627 | csi2_print_register(iss, csi2->regs1, TIMING);
| ^~~~~~
| TIME_INS
drivers/staging/media/omap4iss/iss_csi2.c:628:40: error: implicit declaration of function 'CTX_CTRL1'; did you mean 'BTE_CTRL'? [-Werror=implicit-function-declaration]
628 | csi2_print_register(iss, csi2->regs1, CTX_CTRL1(0));
| ^~~~~~~~~
| BTE_CTRL
drivers/staging/media/omap4iss/iss_csi2.c:629:40: error: implicit declaration of function 'CTX_CTRL2'; did you mean 'BTE_CTRL'? [-Werror=implicit-function-declaration]
629 | csi2_print_register(iss, csi2->regs1, CTX_CTRL2(0));
| ^~~~~~~~~
| BTE_CTRL
drivers/staging/media/omap4iss/iss_csi2.c:630:40: error: implicit declaration of function 'CTX_DAT_OFST'; did you mean 'CSI2_CTX_DAT_OFST'? [-Werror=implicit-function-declaration]
630 | csi2_print_register(iss, csi2->regs1, CTX_DAT_OFST(0));
| ^~~~~~~~~~~~
| CSI2_CTX_DAT_OFST
drivers/staging/media/omap4iss/iss_csi2.c:631:40: error: implicit declaration of function 'CTX_PING_ADDR'; did you mean 'CSI2_CTX_PING_ADDR'? [-Werror=implicit-function-declaration]
631 | csi2_print_register(iss, csi2->regs1, CTX_PING_ADDR(0));
| ^~~~~~~~~~~~~
| CSI2_CTX_PING_ADDR
drivers/staging/media/omap4iss/iss_csi2.c:632:40: error: implicit declaration of function 'CTX_PONG_ADDR'; did you mean 'CSI2_CTX_PONG_ADDR'? [-Werror=implicit-function-declaration]
632 | csi2_print_register(iss, csi2->regs1, CTX_PONG_ADDR(0));
| ^~~~~~~~~~~~~
| CSI2_CTX_PONG_ADDR
drivers/staging/media/omap4iss/iss_csi2.c:633:40: error: implicit declaration of function 'CTX_IRQENABLE'; did you mean 'CSI2_IRQENABLE'? [-Werror=implicit-function-declaration]
633 | csi2_print_register(iss, csi2->regs1, CTX_IRQENABLE(0));
| ^~~~~~~~~~~~~
| CSI2_IRQENABLE
drivers/staging/media/omap4iss/iss_csi2.c:634:40: error: implicit declaration of function 'CTX_IRQSTATUS'; did you mean 'CSI2_IRQSTATUS'? [-Werror=implicit-function-declaration]
634 | csi2_print_register(iss, csi2->regs1, CTX_IRQSTATUS(0));
| ^~~~~~~~~~~~~
| CSI2_IRQSTATUS
drivers/staging/media/omap4iss/iss_csi2.c:635:40: error: implicit declaration of function 'CTX_CTRL3'; did you mean 'BTE_CTRL'? [-Werror=implicit-function-declaration]
635 | csi2_print_register(iss, csi2->regs1, CTX_CTRL3(0));
| ^~~~~~~~~
| BTE_CTRL
drivers/staging/media/omap4iss/iss_csi2.c: In function 'csi2_print_register':
drivers/staging/media/omap4iss/iss_csi2.c:604:1: error: control reaches end of non-void function [-Werror=return-type]
604 | }
| ^
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC
vim +600 drivers/staging/media/omap4iss/iss_csi2.c
596
597 /*
598 * csi2_print_status - Prints CSI2 debug information.
599 */
> 600 static inline csi2_print_register(iss, regs, name)
601 {
> 602 dev_dbg(iss->dev, "###CSI2 " #name "=0x%08x\n",
603 iss_reg_read(iss, regs, CSI2_##name));
604 }
605
606
607 static void csi2_print_status(struct iss_csi2_device *csi2)
608 {
609 struct iss_device *iss = csi2->iss;
610
611 if (!csi2->available)
612 return;
613
614 dev_dbg(iss->dev, "-------------CSI2 Register dump-------------\n");
615
> 616 csi2_print_register(iss, csi2->regs1, SYSCONFIG);
> 617 csi2_print_register(iss, csi2->regs1, SYSSTATUS);
> 618 csi2_print_register(iss, csi2->regs1, IRQENABLE);
> 619 csi2_print_register(iss, csi2->regs1, IRQSTATUS);
> 620 csi2_print_register(iss, csi2->regs1, CTRL);
> 621 csi2_print_register(iss, csi2->regs1, DBG_H);
> 622 csi2_print_register(iss, csi2->regs1, COMPLEXIO_CFG);
> 623 csi2_print_register(iss, csi2->regs1, COMPLEXIO_IRQSTATUS);
> 624 csi2_print_register(iss, csi2->regs1, SHORT_PACKET);
> 625 csi2_print_register(iss, csi2->regs1, COMPLEXIO_IRQENABLE);
> 626 csi2_print_register(iss, csi2->regs1, DBG_P);
> 627 csi2_print_register(iss, csi2->regs1, TIMING);
> 628 csi2_print_register(iss, csi2->regs1, CTX_CTRL1(0));
> 629 csi2_print_register(iss, csi2->regs1, CTX_CTRL2(0));
> 630 csi2_print_register(iss, csi2->regs1, CTX_DAT_OFST(0));
> 631 csi2_print_register(iss, csi2->regs1, CTX_PING_ADDR(0));
> 632 csi2_print_register(iss, csi2->regs1, CTX_PONG_ADDR(0));
> 633 csi2_print_register(iss, csi2->regs1, CTX_IRQENABLE(0));
> 634 csi2_print_register(iss, csi2->regs1, CTX_IRQSTATUS(0));
> 635 csi2_print_register(iss, csi2->regs1, CTX_CTRL3(0));
636
637 dev_dbg(iss->dev, "--------------------------------------------\n");
638 }
639
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: Subject: [PATCH] staging: media: meson: vdec: declare u32 as static const
by kernel test robot
Hi Mitali,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Mitali-Borkar/Subject-PATCH-stag...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git f2f560e1bdc055a6a306e6b7823ba589794e6564
config: ia64-allmodconfig (attached as .config)
compiler: ia64-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
# https://github.com/0day-ci/linux/commit/c9873622761b42d977b48804bb0b4b9a7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mitali-Borkar/Subject-PATCH-staging-media-meson-vdec-declare-u32-as-static-const/20210412-222025
git checkout c9873622761b42d977b48804bb0b4b9a7fbcd6b3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/staging/media/meson/vdec/codec_h264.c: In function 'codec_h264_resume':
>> drivers/staging/media/meson/vdec/codec_h264.c:290:18: error: expected identifier or '(' before '[' token
290 | static const u32[] canvas3 = { ANCO_CANVAS_ADDR, 0 };
| ^
drivers/staging/media/meson/vdec/codec_h264.c:291:18: error: expected identifier or '(' before '[' token
291 | static const u32[] canvas4 = { 24, 0 };
| ^
>> drivers/staging/media/meson/vdec/codec_h264.c:291:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
291 | static const u32[] canvas4 = { 24, 0 };
| ^~~~~~
>> drivers/staging/media/meson/vdec/codec_h264.c:293:28: error: 'canvas3' undeclared (first use in this function)
293 | amvdec_set_canvases(sess, canvas3, canvas4);
| ^~~~~~~
drivers/staging/media/meson/vdec/codec_h264.c:293:28: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/staging/media/meson/vdec/codec_h264.c:293:37: error: 'canvas4' undeclared (first use in this function)
293 | amvdec_set_canvases(sess, canvas3, canvas4);
| ^~~~~~~
vim +290 drivers/staging/media/meson/vdec/codec_h264.c
284
285 static void codec_h264_resume(struct amvdec_session *sess)
286 {
287 struct amvdec_core *core = sess->core;
288 struct codec_h264 *h264 = sess->priv;
289 u32 mb_width, mb_height, mb_total;
> 290 static const u32[] canvas3 = { ANCO_CANVAS_ADDR, 0 };
> 291 static const u32[] canvas4 = { 24, 0 };
292
> 293 amvdec_set_canvases(sess, canvas3, canvas4);
294
295 dev_dbg(core->dev, "max_refs = %u; actual_dpb_size = %u\n",
296 h264->max_refs, sess->num_dst_bufs);
297
298 /* Align to a multiple of 4 macroblocks */
299 mb_width = ALIGN(h264->mb_width, 4);
300 mb_height = ALIGN(h264->mb_height, 4);
301 mb_total = mb_width * mb_height;
302
303 h264->ref_size = mb_total * MB_MV_SIZE * h264->max_refs;
304 h264->ref_vaddr = dma_alloc_coherent(core->dev, h264->ref_size,
305 &h264->ref_paddr, GFP_KERNEL);
306 if (!h264->ref_vaddr) {
307 amvdec_abort(sess);
308 return;
309 }
310
311 /* Address to store the references' MVs */
312 amvdec_write_dos(core, AV_SCRATCH_1, h264->ref_paddr);
313 /* End of ref MV */
314 amvdec_write_dos(core, AV_SCRATCH_4, h264->ref_paddr + h264->ref_size);
315
316 amvdec_write_dos(core, AV_SCRATCH_0, (h264->max_refs << 24) |
317 (sess->num_dst_bufs << 16) |
318 ((h264->max_refs - 1) << 8));
319 }
320
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH 1/3] iomap: Pass original DIO size to completion handler
by kernel test robot
Hi Jan,
I love your patch! Yet something to improve:
[auto build test ERROR on ext4/dev]
[also build test ERROR on xfs-linux/for-next linus/master v5.12-rc7 next-20210412]
[cannot apply to tytso-fscrypt/master]
[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/Jan-Kara/ext4-Fix-data-corruptio...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: openrisc-randconfig-r032-20210412 (attached as .config)
compiler: or1k-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
# https://github.com/0day-ci/linux/commit/0d289243d061378ac42188ff507928788...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jan-Kara/ext4-Fix-data-corruption-when-extending-DIO-write-races-with-buffered-read/20210412-182524
git checkout 0d289243d061378ac42188ff5079287885575bb3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc
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 >>):
fs/zonefs/super.c: In function 'zonefs_file_dio_append':
>> fs/zonefs/super.c:732:2: error: too few arguments to function 'zonefs_file_write_dio_end_io'
732 | zonefs_file_write_dio_end_io(iocb, size, ret, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/zonefs/super.c:654:12: note: declared here
654 | static int zonefs_file_write_dio_end_io(struct kiocb *iocb, ssize_t size,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/zonefs/super.c: At top level:
>> fs/zonefs/super.c:961:14: error: initialization of 'int (*)(struct kiocb *, ssize_t, ssize_t, int, unsigned int)' {aka 'int (*)(struct kiocb *, int, int, int, unsigned int)'} from incompatible pointer type 'int (*)(struct kiocb *, ssize_t, int, unsigned int)' {aka 'int (*)(struct kiocb *, int, int, unsigned int)'} [-Werror=incompatible-pointer-types]
961 | .end_io = zonefs_file_read_dio_end_io,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/zonefs/super.c:961:14: note: (near initialization for 'zonefs_read_dio_ops.end_io')
cc1: some warnings being treated as errors
vim +/zonefs_file_write_dio_end_io +732 fs/zonefs/super.c
8dcc1a9d90c10f Damien Le Moal 2019-12-25 688
02ef12a663c7ac Johannes Thumshirn 2020-05-12 689 static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter *from)
02ef12a663c7ac Johannes Thumshirn 2020-05-12 690 {
02ef12a663c7ac Johannes Thumshirn 2020-05-12 691 struct inode *inode = file_inode(iocb->ki_filp);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 692 struct zonefs_inode_info *zi = ZONEFS_I(inode);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 693 struct block_device *bdev = inode->i_sb->s_bdev;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 694 unsigned int max;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 695 struct bio *bio;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 696 ssize_t size;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 697 int nr_pages;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 698 ssize_t ret;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 699
02ef12a663c7ac Johannes Thumshirn 2020-05-12 700 max = queue_max_zone_append_sectors(bdev_get_queue(bdev));
02ef12a663c7ac Johannes Thumshirn 2020-05-12 701 max = ALIGN_DOWN(max << SECTOR_SHIFT, inode->i_sb->s_blocksize);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 702 iov_iter_truncate(from, max);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 703
a8affc03a9b375 Christoph Hellwig 2021-03-11 704 nr_pages = iov_iter_npages(from, BIO_MAX_VECS);
89ee72376be23a Johannes Thumshirn 2020-07-16 705 if (!nr_pages)
89ee72376be23a Johannes Thumshirn 2020-07-16 706 return 0;
89ee72376be23a Johannes Thumshirn 2020-07-16 707
f91ca2a370bec5 Christoph Hellwig 2021-01-26 708 bio = bio_alloc(GFP_NOFS, nr_pages);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 709 if (!bio)
02ef12a663c7ac Johannes Thumshirn 2020-05-12 710 return -ENOMEM;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 711
02ef12a663c7ac Johannes Thumshirn 2020-05-12 712 bio_set_dev(bio, bdev);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 713 bio->bi_iter.bi_sector = zi->i_zsector;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 714 bio->bi_write_hint = iocb->ki_hint;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 715 bio->bi_ioprio = iocb->ki_ioprio;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 716 bio->bi_opf = REQ_OP_ZONE_APPEND | REQ_SYNC | REQ_IDLE;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 717 if (iocb->ki_flags & IOCB_DSYNC)
02ef12a663c7ac Johannes Thumshirn 2020-05-12 718 bio->bi_opf |= REQ_FUA;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 719
02ef12a663c7ac Johannes Thumshirn 2020-05-12 720 ret = bio_iov_iter_get_pages(bio, from);
6bea0225a4bf14 Damien Le Moal 2020-12-09 721 if (unlikely(ret))
6bea0225a4bf14 Damien Le Moal 2020-12-09 722 goto out_release;
6bea0225a4bf14 Damien Le Moal 2020-12-09 723
02ef12a663c7ac Johannes Thumshirn 2020-05-12 724 size = bio->bi_iter.bi_size;
6bea0225a4bf14 Damien Le Moal 2020-12-09 725 task_io_account_write(size);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 726
02ef12a663c7ac Johannes Thumshirn 2020-05-12 727 if (iocb->ki_flags & IOCB_HIPRI)
02ef12a663c7ac Johannes Thumshirn 2020-05-12 728 bio_set_polled(bio, iocb);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 729
02ef12a663c7ac Johannes Thumshirn 2020-05-12 730 ret = submit_bio_wait(bio);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 731
6bea0225a4bf14 Damien Le Moal 2020-12-09 @732 zonefs_file_write_dio_end_io(iocb, size, ret, 0);
62ab1aadcccd03 Johannes Thumshirn 2021-01-27 733 trace_zonefs_file_dio_append(inode, size, ret);
6bea0225a4bf14 Damien Le Moal 2020-12-09 734
6bea0225a4bf14 Damien Le Moal 2020-12-09 735 out_release:
6bea0225a4bf14 Damien Le Moal 2020-12-09 736 bio_release_pages(bio, false);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 737 bio_put(bio);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 738
02ef12a663c7ac Johannes Thumshirn 2020-05-12 739 if (ret >= 0) {
02ef12a663c7ac Johannes Thumshirn 2020-05-12 740 iocb->ki_pos += size;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 741 return size;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 742 }
02ef12a663c7ac Johannes Thumshirn 2020-05-12 743
02ef12a663c7ac Johannes Thumshirn 2020-05-12 744 return ret;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 745 }
02ef12a663c7ac Johannes Thumshirn 2020-05-12 746
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [Outreachy kernel][PATCH 1/4] Replace macro function by static inline function in file iss.c
by kernel test robot
Hi Aline,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v5.12-rc7 next-20210412]
[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/Aline-Santana-Cordeiro/Replace-m...
base: git://linuxtv.org/media_tree.git master
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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://github.com/0day-ci/linux/commit/31032f2aa94de36a70de87f425eac62a2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Aline-Santana-Cordeiro/Replace-macro-function-by-static-inline-function-in-file-iss-c/20210412-213252
git checkout 31032f2aa94de36a70de87f425eac62a2000367d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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/staging/media/omap4iss/iss.c:30:15: error: return type defaults to 'int' [-Werror=return-type]
30 | static inline iss_print_register(iss, name)
| ^~~~~~~~~~~~~~~~~~
drivers/staging/media/omap4iss/iss.c:30:15: error: function declaration isn't a prototype [-Werror=strict-prototypes]
drivers/staging/media/omap4iss/iss.c: In function 'iss_print_register':
>> drivers/staging/media/omap4iss/iss.c:30:15: warning: old-style function definition [-Wold-style-definition]
>> drivers/staging/media/omap4iss/iss.c:30:15: warning: type of 'iss' defaults to 'int' [-Wmissing-parameter-type]
>> drivers/staging/media/omap4iss/iss.c:30:15: warning: type of 'name' defaults to 'int' [-Wmissing-parameter-type]
In file included from include/linux/printk.h:409,
from include/linux/kernel.h:16,
from include/linux/clk.h:13,
from drivers/staging/media/omap4iss/iss.c:10:
drivers/staging/media/omap4iss/iss.c:32:30: error: stray '#' in program
32 | dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
| ^
include/linux/dynamic_debug.h:91:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
91 | .format = (fmt), \
| ^~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/staging/media/omap4iss/iss.c:32:2: note: in expansion of macro 'dev_dbg'
32 | dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
| ^~~~~~~
drivers/staging/media/omap4iss/iss.c:32:31: error: expected ')' before 'name'
32 | dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
| ^~~~
include/linux/dynamic_debug.h:91:14: note: in definition of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
91 | .format = (fmt), \
| ^~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/staging/media/omap4iss/iss.c:32:2: note: in expansion of macro 'dev_dbg'
32 | dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
| ^~~~~~~
include/linux/dynamic_debug.h:91:13: note: to match this '('
91 | .format = (fmt), \
| ^
include/linux/dynamic_debug.h:127:2: note: in expansion of macro 'DEFINE_DYNAMIC_DEBUG_METADATA'
127 | DEFINE_DYNAMIC_DEBUG_METADATA(id, fmt); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:147:2: note: in expansion of macro '__dynamic_func_call'
147 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
drivers/staging/media/omap4iss/iss.c:32:2: note: in expansion of macro 'dev_dbg'
32 | dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
| ^~~~~~~
drivers/staging/media/omap4iss/iss.c:32:13: error: invalid type argument of '->' (have 'int')
32 | dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
| ^~
include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
drivers/staging/media/omap4iss/iss.c:32:2: note: in expansion of macro 'dev_dbg'
32 | dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
| ^~~~~~~
drivers/staging/media/omap4iss/iss.c:32:30: error: stray '#' in program
32 | dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
| ^
include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call'
129 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call'
161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt'
123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/staging/media/omap4iss/iss.c:32:2: note: in expansion of macro 'dev_dbg'
32 | dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
| ^~~~~~~
drivers/staging/media/omap4iss/iss.c:32:31: error: expected ')' before 'name'
32 | dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
| ^~~~
vim +30 drivers/staging/media/omap4iss/iss.c
29
> 30 static inline iss_print_register(iss, name)
31 {
32 dev_dbg(iss->dev, "###ISS " #name "=0x%08x\n",
33 iss_reg_read(iss, OMAP4_ISS_MEM_TOP, ISS_##name));
34 }
35
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[intel-linux-intel-lts:5.4/yocto 1/13] drivers/mtd/spi-nor/core.c:3383:34: sparse: sparse: cast to restricted __le32
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 756623e2f190038a96e780f5f07990a065ebf2b9
commit: 4541b62447f9a65c9192597304d5f6cd11664386 [1/13] mtd: spi-nor: Prepare core / manufacturer code split
config: i386-randconfig-s032-20210412 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://github.com/intel/linux-intel-lts/commit/4541b62447f9a65c919259730...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 4541b62447f9a65c9192597304d5f6cd11664386
# 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/mtd/spi-nor/core.c:3383:34: sparse: sparse: cast to restricted __le32
>> drivers/mtd/spi-nor/core.c:3651:38: sparse: sparse: dubious: x | !y
drivers/mtd/spi-nor/core.c:3837:27: sparse: sparse: cast to restricted __le32
drivers/mtd/spi-nor/core.c:3931:29: sparse: sparse: cast to restricted __le32
drivers/mtd/spi-nor/core.c:4071:13: sparse: sparse: cast to restricted __le32
vim +3383 drivers/mtd/spi-nor/core.c
2aaa5f7e0c07a0 drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2018-12-06 3324
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3325 /**
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3326 * spi_nor_parse_bfpt() - read and parse the Basic Flash Parameter Table.
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3327 * @nor: pointer to a 'struct spi_nor'
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3328 * @bfpt_header: pointer to the 'struct sfdp_parameter_header' describing
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3329 * the Basic Flash Parameter Table length and version
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3330 * @params: pointer to the 'struct spi_nor_flash_parameter' to be
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3331 * filled
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3332 *
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3333 * The Basic Flash Parameter Table is the main and only mandatory table as
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3334 * defined by the SFDP (JESD216) specification.
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3335 * It provides us with the total size (memory density) of the data array and
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3336 * the number of address bytes for Fast Read, Page Program and Sector Erase
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3337 * commands.
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3338 * For Fast READ commands, it also gives the number of mode clock cycles and
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3339 * wait states (regrouped in the number of dummy clock cycles) for each
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3340 * supported instruction op code.
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3341 * For Page Program, the page size is now available since JESD216 rev A, however
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3342 * the supported instruction op codes are still not provided.
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3343 * For Sector Erase commands, this table stores the supported instruction op
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3344 * codes and the associated sector sizes.
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3345 * Finally, the Quad Enable Requirements (QER) are also available since JESD216
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3346 * rev A. The QER bits encode the manufacturer dependent procedure to be
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3347 * executed to set the Quad Enable (QE) bit in some internal register of the
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3348 * Quad SPI memory. Indeed the QE bit, when it exists, must be set before
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3349 * sending any Quad SPI command to the memory. Actually, setting the QE bit
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3350 * tells the memory to reassign its WP# and HOLD#/RESET# pins to functions IO2
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3351 * and IO3 hence enabling 4 (Quad) I/O lines.
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3352 *
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3353 * Return: 0 on success, -errno otherwise.
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3354 */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3355 static int spi_nor_parse_bfpt(struct spi_nor *nor,
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3356 const struct sfdp_parameter_header *bfpt_header,
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3357 struct spi_nor_flash_parameter *params)
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3358 {
c46872170a54c9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2019-08-23 3359 struct spi_nor_erase_map *map = ¶ms->erase_map;
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3360 struct spi_nor_erase_type *erase_type = map->erase_type;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3361 struct sfdp_bfpt bfpt;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3362 size_t len;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3363 int i, cmd, err;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3364 u32 addr;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3365 u16 half;
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3366 u8 erase_mask;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3367
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3368 /* JESD216 Basic Flash Parameter Table length is at least 9 DWORDs. */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3369 if (bfpt_header->length < BFPT_DWORD_MAX_JESD216)
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3370 return -EINVAL;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3371
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3372 /* Read the Basic Flash Parameter Table. */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3373 len = min_t(size_t, sizeof(bfpt),
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3374 bfpt_header->length * sizeof(u32));
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3375 addr = SFDP_PARAM_HEADER_PTP(bfpt_header);
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3376 memset(&bfpt, 0, sizeof(bfpt));
bfa4133795e5a0 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-09-06 3377 err = spi_nor_read_sfdp_dma_unsafe(nor, addr, len, &bfpt);
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3378 if (err < 0)
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3379 return err;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3380
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3381 /* Fix endianness of the BFPT DWORDs. */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3382 for (i = 0; i < BFPT_DWORD_MAX; i++)
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 @3383 bfpt.dwords[i] = le32_to_cpu(bfpt.dwords[i]);
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3384
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3385 /* Number of address bytes. */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3386 switch (bfpt.dwords[BFPT_DWORD(1)] & BFPT_DWORD1_ADDRESS_BYTES_MASK) {
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3387 case BFPT_DWORD1_ADDRESS_BYTES_3_ONLY:
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3388 nor->addr_width = 3;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3389 break;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3390
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3391 case BFPT_DWORD1_ADDRESS_BYTES_4_ONLY:
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3392 nor->addr_width = 4;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3393 break;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3394
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3395 default:
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3396 break;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3397 }
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3398
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3399 /* Flash Memory Density (in bits). */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3400 params->size = bfpt.dwords[BFPT_DWORD(2)];
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3401 if (params->size & BIT(31)) {
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3402 params->size &= ~BIT(31);
b8f3911610529b drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2017-09-12 3403
b8f3911610529b drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2017-09-12 3404 /*
b8f3911610529b drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2017-09-12 3405 * Prevent overflows on params->size. Anyway, a NOR of 2^64
b8f3911610529b drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2017-09-12 3406 * bits is unlikely to exist so this error probably means
b8f3911610529b drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2017-09-12 3407 * the BFPT we are reading is corrupted/wrong.
b8f3911610529b drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2017-09-12 3408 */
b8f3911610529b drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2017-09-12 3409 if (params->size > 63)
b8f3911610529b drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2017-09-12 3410 return -EINVAL;
b8f3911610529b drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2017-09-12 3411
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3412 params->size = 1ULL << params->size;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3413 } else {
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3414 params->size++;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3415 }
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3416 params->size >>= 3; /* Convert to bytes. */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3417
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3418 /* Fast Read settings. */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3419 for (i = 0; i < ARRAY_SIZE(sfdp_bfpt_reads); i++) {
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3420 const struct sfdp_bfpt_read *rd = &sfdp_bfpt_reads[i];
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3421 struct spi_nor_read_command *read;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3422
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3423 if (!(bfpt.dwords[rd->supported_dword] & rd->supported_bit)) {
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3424 params->hwcaps.mask &= ~rd->hwcaps;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3425 continue;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3426 }
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3427
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3428 params->hwcaps.mask |= rd->hwcaps;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3429 cmd = spi_nor_hwcaps_read2cmd(rd->hwcaps);
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3430 read = ¶ms->reads[cmd];
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3431 half = bfpt.dwords[rd->settings_dword] >> rd->settings_shift;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3432 spi_nor_set_read_settings_from_bfpt(read, half, rd->proto);
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3433 }
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3434
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3435 /*
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3436 * Sector Erase settings. Reinitialize the uniform erase map using the
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3437 * Erase Types defined in the bfpt table.
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3438 */
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3439 erase_mask = 0;
c46872170a54c9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2019-08-23 3440 memset(¶ms->erase_map, 0, sizeof(params->erase_map));
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3441 for (i = 0; i < ARRAY_SIZE(sfdp_bfpt_erases); i++) {
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3442 const struct sfdp_bfpt_erase *er = &sfdp_bfpt_erases[i];
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3443 u32 erasesize;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3444 u8 opcode;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3445
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3446 half = bfpt.dwords[er->dword] >> er->shift;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3447 erasesize = half & 0xff;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3448
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3449 /* erasesize == 0 means this Erase Type is not supported. */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3450 if (!erasesize)
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3451 continue;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3452
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3453 erasesize = 1U << erasesize;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3454 opcode = (half >> 8) & 0xff;
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3455 erase_mask |= BIT(i);
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3456 spi_nor_set_erase_settings_from_bfpt(&erase_type[i], erasesize,
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3457 opcode, i);
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3458 }
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3459 spi_nor_init_uniform_erase_map(map, erase_mask, params->size);
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3460 /*
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3461 * Sort all the map's Erase Types in ascending order with the smallest
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3462 * erase size being the first member in the erase_type array.
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3463 */
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3464 sort(erase_type, SNOR_ERASE_TYPE_MAX, sizeof(erase_type[0]),
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3465 spi_nor_map_cmp_erase_type, NULL);
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3466 /*
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3467 * Sort the erase types in the uniform region in order to update the
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3468 * uniform_erase_type bitmask. The bitmask will be used later on when
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3469 * selecting the uniform erase.
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3470 */
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3471 spi_nor_regions_sort_erase_types(map);
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3472 map->uniform_erase_type = map->uniform_region.offset &
5390a8df769ec9 drivers/mtd/spi-nor/spi-nor.c Tudor Ambarus 2018-09-11 3473 SNOR_ERASE_TYPE_MASK;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3474
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3475 /* Stop here if not JESD216 rev A or later. */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3476 if (bfpt_header->length < BFPT_DWORD_MAX)
2aaa5f7e0c07a0 drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2018-12-06 3477 return spi_nor_post_bfpt_fixups(nor, bfpt_header, &bfpt,
2aaa5f7e0c07a0 drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2018-12-06 3478 params);
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3479
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3480 /* Page size: this field specifies 'N' so the page size = 2^N bytes. */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3481 params->page_size = bfpt.dwords[BFPT_DWORD(11)];
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3482 params->page_size &= BFPT_DWORD11_PAGE_SIZE_MASK;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3483 params->page_size >>= BFPT_DWORD11_PAGE_SIZE_SHIFT;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3484 params->page_size = 1U << params->page_size;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3485
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3486 /* Quad Enable Requirements. */
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3487 switch (bfpt.dwords[BFPT_DWORD(15)] & BFPT_DWORD15_QER_MASK) {
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3488 case BFPT_DWORD15_QER_NONE:
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3489 params->quad_enable = NULL;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3490 break;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3491
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3492 case BFPT_DWORD15_QER_SR2_BIT1_BUGGY:
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3493 case BFPT_DWORD15_QER_SR2_BIT1_NO_RD:
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3494 params->quad_enable = spansion_no_read_cr_quad_enable;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3495 break;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3496
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3497 case BFPT_DWORD15_QER_SR1_BIT6:
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3498 params->quad_enable = macronix_quad_enable;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3499 break;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3500
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3501 case BFPT_DWORD15_QER_SR2_BIT7:
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3502 params->quad_enable = sr2_bit7_quad_enable;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3503 break;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3504
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3505 case BFPT_DWORD15_QER_SR2_BIT1:
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3506 params->quad_enable = spansion_read_cr_quad_enable;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3507 break;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3508
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3509 default:
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3510 return -EINVAL;
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3511 }
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3512
2aaa5f7e0c07a0 drivers/mtd/spi-nor/spi-nor.c Boris Brezillon 2018-12-06 3513 return spi_nor_post_bfpt_fixups(nor, bfpt_header, &bfpt, params);
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3514 }
f384b352cbf031 drivers/mtd/spi-nor/spi-nor.c Cyrille Pitchen 2017-06-26 3515
:::::: The code at line 3383 was first introduced by commit
:::::: f384b352cbf0310fd20c379c4710408c70e769b6 mtd: spi-nor: parse Serial Flash Discoverable Parameters (SFDP) tables
:::::: TO: Cyrille Pitchen <cyrille.pitchen(a)microchip.com>
:::::: CC: Cyrille Pitchen <cyrille.pitchen(a)wedev4u.fr>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months