* [hch-dma-mapping:for-next 11/14] arch/arm/mm/dma-mapping.c:77:57: warning: Parameter 'virt' can be declared with const [constParameter]
@ 2022-07-08 3:57 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-07-08 3:57 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2994 bytes --]
::::::
:::::: Manual check reason: "low confidence static check warning: arch/arm/mm/dma-mapping.c:77:57: warning: Parameter 'virt' can be declared with const [constParameter]"
::::::
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
TO: Christoph Hellwig <hch@lst.de>
tree: git://git.infradead.org/users/hch/dma-mapping for-next
head: 4136ce90f079e812fec2c5e10732b2265f61f1bd
commit: ae626eb97376148bb63c3f3ca9517fde0f39bec3 [11/14] ARM/dma-mapping: use dma-direct unconditionally
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout ae626eb97376148bb63c3f3ca9517fde0f39bec3
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> 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 <rabin@rab.in>
:::::: CC: Russell King <rmk+kernel@arm.linux.org.uk>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-08 3:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08 3:57 [hch-dma-mapping:for-next 11/14] arch/arm/mm/dma-mapping.c:77:57: warning: Parameter 'virt' can be declared with const [constParameter] kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.