diff options
| author | Mirsad Todorovac <[email protected]> | 2024-10-29 05:46:52 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-11-06 21:36:37 +0000 |
| commit | 82e33f249f1126cf3c5f39a31b850d485ac33bc3 (patch) | |
| tree | 00622e0cf87daf6df08337959dbcb287955d4118 /drivers/usb/cdns3/cdns3-pci-wrap.c | |
| parent | resource: avoid unnecessary resource tree walking in __region_intersects() (diff) | |
| download | kernel-82e33f249f1126cf3c5f39a31b850d485ac33bc3.tar.gz kernel-82e33f249f1126cf3c5f39a31b850d485ac33bc3.zip | |
fs/proc/kcore.c: fix coccinelle reported ERROR instances
Coccinelle complains about the nested reuse of the pointer `iter' with
different pointer type:
./fs/proc/kcore.c:515:26-30: ERROR: invalid reference to the index variable of the iterator on line 499
./fs/proc/kcore.c:534:23-27: ERROR: invalid reference to the index variable of the iterator on line 499
./fs/proc/kcore.c:550:40-44: ERROR: invalid reference to the index variable of the iterator on line 499
./fs/proc/kcore.c:568:27-31: ERROR: invalid reference to the index variable of the iterator on line 499
./fs/proc/kcore.c:581:28-32: ERROR: invalid reference to the index variable of the iterator on line 499
./fs/proc/kcore.c:599:27-31: ERROR: invalid reference to the index variable of the iterator on line 499
./fs/proc/kcore.c:607:38-42: ERROR: invalid reference to the index variable of the iterator on line 499
./fs/proc/kcore.c:614:26-30: ERROR: invalid reference to the index variable of the iterator on line 499
Replacing `struct kcore_list *iter' with `struct kcore_list *tmp' doesn't change the
scope and the functionality is the same and coccinelle seems happy.
NOTE: There was an issue with using `struct kcore_list *pos' as the nested iterator.
The build did not work!
[[email protected]: s/tmp/pos/]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1]
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 04d168c6d42d ("fs/proc/kcore.c: remove check of list iterator against head past the loop body")
Signed-off-by: Jakob Koschel <[email protected]>
Signed-off-by: Mirsad Todorovac <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: "Brian Johannesmeyer" <[email protected]>
Cc: Cristiano Giuffrida <[email protected]>
Cc: "Bos, H.J." <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Yang Li <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Hari Bathini <[email protected]>
Cc: Yan Zhen <[email protected]>
Cc: Alexander Gordeev <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-pci-wrap.c')
0 files changed, 0 insertions, 0 deletions
