CC: [email protected] BCC: [email protected] CC: [email protected] TO: Christoph Hellwig <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git to-build head: 78e0e09340fa7778055d35fc32d88a6b6d699c6a commit: 78e0e09340fa7778055d35fc32d88a6b6d699c6a [7/7] ARM: use dma-direct unconditionally :::::: branch date: 8 days ago :::::: commit date: 8 days ago compiler: arm-linux-gnueabi-gcc (GCC) 11.3.0 reproduce (cppcheck warning): # apt-get install cppcheck git checkout 78e0e09340fa7778055d35fc32d88a6b6d699c6a cppcheck --quiet --enable=style,performance,portability --template=gcc FILE If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> arch/arm/mm/ioremap.c:72:46: warning: Parameter 'vaddr' can be declared with >> const [constParameter] struct static_vm *find_static_vm_vaddr(void *vaddr) ^ >> arch/arm/mm/ioremap.c:85:11: warning: Uninitialized variables: svm.vm, >> svm.list [uninitvar] return svm; ^ arch/arm/mm/ioremap.c:81:16: note: Assuming condition is false if (vm->addr > vaddr) ^ arch/arm/mm/ioremap.c:81:16: note: Assuming condition is false if (vm->addr > vaddr) ^ arch/arm/mm/ioremap.c:85:11: note: Uninitialized variables: svm.vm, svm.list return svm; ^ -- >> arch/arm/mm/dma-mapping.c:77:57: warning: Parameter 'virt' can be declared >> with const [constParameter] static struct arm_dma_buffer *arm_dma_buffer_find(void *virt) ^ >> arch/arm/mm/dma-mapping.c:84:12: warning: Uninitialized variable: buf->virt >> [uninitvar] if (buf->virt == virt) { ^ vim +/virt +77 arch/arm/mm/dma-mapping.c 19e6e5e5392bd64 Rabin Vincent 2016-03-03 76 19e6e5e5392bd64 Rabin Vincent 2016-03-03 @77 static struct arm_dma_buffer *arm_dma_buffer_find(void *virt) 19e6e5e5392bd64 Rabin Vincent 2016-03-03 78 { 19e6e5e5392bd64 Rabin Vincent 2016-03-03 79 struct arm_dma_buffer *buf, *found = NULL; 19e6e5e5392bd64 Rabin Vincent 2016-03-03 80 unsigned long flags; 19e6e5e5392bd64 Rabin Vincent 2016-03-03 81 19e6e5e5392bd64 Rabin Vincent 2016-03-03 82 spin_lock_irqsave(&arm_dma_bufs_lock, flags); 19e6e5e5392bd64 Rabin Vincent 2016-03-03 83 list_for_each_entry(buf, &arm_dma_bufs, list) { 19e6e5e5392bd64 Rabin Vincent 2016-03-03 @84 if (buf->virt == virt) { 19e6e5e5392bd64 Rabin Vincent 2016-03-03 85 list_del(&buf->list); 19e6e5e5392bd64 Rabin Vincent 2016-03-03 86 found = buf; 19e6e5e5392bd64 Rabin Vincent 2016-03-03 87 break; 19e6e5e5392bd64 Rabin Vincent 2016-03-03 88 } 19e6e5e5392bd64 Rabin Vincent 2016-03-03 89 } 19e6e5e5392bd64 Rabin Vincent 2016-03-03 90 spin_unlock_irqrestore(&arm_dma_bufs_lock, flags); 19e6e5e5392bd64 Rabin Vincent 2016-03-03 91 return found; 19e6e5e5392bd64 Rabin Vincent 2016-03-03 92 } 19e6e5e5392bd64 Rabin Vincent 2016-03-03 93 :::::: The code at line 77 was first introduced by commit :::::: 19e6e5e5392bd646c93d9e2c7b2b58c8558cb041 ARM: 8547/1: dma-mapping: store buffer information :::::: TO: Rabin Vincent <[email protected]> :::::: CC: Russell King <[email protected]> -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
