Please check for false positives in the output before submitting a patch. When using "patch" mode, carefully review the patch before submitting it. /home/cocci/testing/include/linux/dma-fence-chain.h:94:4-26: WARNING: casting value returned by memory allocation function to (struct dma_fence_chain *) is useless. /home/cocci/testing/include/linux/jbd2.h:1623:4-21: WARNING: casting value returned by memory allocation function to (struct jbd2_inode *) is useless. /home/cocci/testing/include/linux/jbd2.h:1604:4-12: WARNING: casting value returned by memory allocation function to (handle_t *) is useless. /home/cocci/testing/include/linux/skmsg.h:423:4-24: WARNING: casting value returned by memory allocation function to (struct sk_psock_link *) is useless. /home/cocci/testing/kernel/sched/topology.c:621:6-25: WARNING: atomic_dec_and_test variation before object free at line 622. /home/cocci/testing/kernel/sched/topology.c:508:7-26: WARNING: atomic_dec_and_test variation before object free at line 522. /home/cocci/testing/kernel/sched/topology.c:532:6-25: WARNING: atomic_dec_and_test variation before object free at line 535. /home/cocci/testing/mm/kmemleak.c:529:6-25: WARNING: atomic_dec_and_test variation before object free at line 541. /home/cocci/testing/kernel/fork.c:941:14-33: WARNING: atomic_dec_and_test variation before object free at line 943. /home/cocci/testing/kernel/fork.c:1382:5-24: WARNING: atomic_dec_and_test variation before object free at line 1384. /home/cocci/testing/fs/namei.c:273:6-25: WARNING: atomic_dec_and_test variation before object free at line 278. /home/cocci/testing/mm/shmem.c:1424:6-25: WARNING: atomic_dec_and_test variation before object free at line 1405. /home/cocci/testing/mm/shmem.c:1424:6-25: WARNING: atomic_dec_and_test variation before object free at line 1423. /home/cocci/testing/fs/smb/server/vfs_cache.c:271:5-24: WARNING: atomic_dec_and_test variation before object free at line 281. /home/cocci/testing/fs/smb/server/vfs_cache.c:222:5-24: WARNING: atomic_dec_and_test variation before object free at line 223. /home/cocci/testing/drivers/md/dm.c:348:5-24: WARNING: atomic_dec_and_test variation before object free at line 350. /home/cocci/testing/kernel/bpf/syscall.c:2290:5-26: WARNING: atomic_dec_and_test variation before object free at line 2293. /home/cocci/testing/kernel/bpf/syscall.c:3095:6-27: WARNING: atomic_dec_and_test variation before object free at line 3099. /home/cocci/testing/kernel/bpf/syscall.c:3105:6-27: WARNING: atomic_dec_and_test variation before object free at line 3107. /home/cocci/testing/kernel/bpf/syscall.c:798:5-26: WARNING: atomic_dec_and_test variation before object free at line 800. /home/cocci/testing/net/netfilter/ipvs/ip_vs_ctl.c:528:5-24: WARNING: atomic_dec_and_test variation before object free at line 533. /home/cocci/testing/drivers/net/ethernet/broadcom/bnxt/bnxt.c:5615:6-25: WARNING: atomic_dec_and_test variation before object free at line 5622. /home/cocci/testing/drivers/usb/gadget/function/f_fs.c:2166:5-24: WARNING: atomic_dec_and_test variation before object free at line 2176. /home/cocci/testing/fs/smb/server/transport_rdma.c:874:5-24: WARNING: atomic_dec_and_test variation before object free at line 883. /home/cocci/testing/fs/smb/server/transport_rdma.c:874:5-24: WARNING: atomic_dec_and_test variation before object free at line 887. /home/cocci/testing/arch/powerpc/mm/book3s64/pgtable.c:446:5-24: WARNING: atomic_dec_and_test variation before object free at line 448. /home/cocci/testing/io_uring/kbuf.c:377:5-24: WARNING: atomic_dec_and_test variation before object free at line 379. /home/cocci/testing/fs/file_table.c:473:5-29: WARNING: atomic_dec_and_test variation before object free at line 477. /home/cocci/testing/fs/file_table.c:473:5-29: WARNING: atomic_dec_and_test variation before object free at line 492. /home/cocci/testing/mm/rmap.c:2548:25-44: WARNING: atomic_dec_and_test variation before object free at line 2549. /home/cocci/testing/drivers/md/md.c:562:5-24: WARNING: atomic_dec_and_test variation before object free at line 564. /home/cocci/testing/drivers/md/md.c:595:5-24: WARNING: atomic_dec_and_test variation before object free at line 596. /home/cocci/testing/block/bio.c:815:7-26: WARNING: atomic_dec_and_test variation before object free at line 821. /home/cocci/testing/kernel/events/core.c:5348:6-30: WARNING: atomic_dec_and_test variation before object free at line 5351. /home/cocci/testing/drivers/most/core.c:254:8-16: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:398:8-16: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:409:9-17: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:211:8-16: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:222:8-16: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:272:8-16: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:297:10-18: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:326:8-16: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:282:9-17: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:263:8-16: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:318:8-16: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:309:8-16: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:233:8-16: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/most/core.c:244:8-16: WARNING: please use sysfs_emit or sysfs_emit_at /home/cocci/testing/drivers/w1/w1.c:72:9-10: WARNING opportunity for kfree_sensitive/kvfree_sensitive (memset at line 71) /home/cocci/testing/drivers/w1/w1.c:801:10-11: WARNING opportunity for kfree_sensitive/kvfree_sensitive (memset at line 799) /home/cocci/testing/drivers/pci/controller/dwc/pcie-dw-rockchip.c:454:2-9: line 454 is redundant because platform_get_irq() already prints an error /home/cocci/testing/include/linux/ioport.h:254:13-16: ERROR: Missing resource_size with res warning: line 134: should no_llseek be a metavariable? warning: line 141: should noop_llseek be a metavariable? warning: line 223: should nonseekable_open be a metavariable? warning: line 290: should nonseekable_open be a metavariable? warning: line 338: should nonseekable_open be a metavariable? /home/cocci/testing/drivers/usb/gadget/function/u_serial.c:1522:4-22: opportunity for str_plural(MAX_U_SERIAL_PORTS) /home/cocci/testing/drivers/usb/host/xhci-ring.c:3402:17-28: opportunity for str_plural(ep_interval) /home/cocci/testing/drivers/usb/host/xhci-ring.c:3403:19-32: opportunity for str_plural(xhci_interval) /home/cocci/testing/drivers/pcmcia/i82365.c:684:36-38: opportunity for str_plural(ns) /home/cocci/testing/tools/testing/selftests/mqueue/mq_perf_tests.c:452:8-19: opportunity for str_plural(res . tv_nsec) /home/cocci/testing/include/linux/mm.h:3537:14-20: WARNING: Consider using vma_pages helper on vma /home/cocci/testing/tools/testing/nvdimm/test/ndtest.c:380:2-7: WARNING: NULL check before some freeing functions is not needed. /home/cocci/testing/tools/testing/nvdimm/test/nfit.c:1643:2-7: WARNING: NULL check before some freeing functions is not needed. /home/cocci/testing/fs/smb/client/smb2pdu.c:2960:8-14: ERROR: reference preceded by free on line 2960 /home/cocci/testing/fs/smb/client/smb2pdu.c:2973:7-13: ERROR: reference preceded by free on line 2960 /home/cocci/testing/fs/smb/client/smb2pdu.c:2960:8-14: ERROR: reference preceded by free on line 2973 /home/cocci/testing/fs/smb/client/smb2pdu.c:2973:7-13: ERROR: reference preceded by free on line 2973 /home/cocci/testing/lib/fortify_kunit.c:211:8-9: ERROR: reference preceded by free on line 208 /home/cocci/testing/lib/fortify_kunit.c:213:8-9: ERROR: reference preceded by free on line 211 /home/cocci/testing/lib/fortify_kunit.c:216:8-9: ERROR: reference preceded by free on line 213 /home/cocci/testing/lib/fortify_kunit.c:218:8-9: ERROR: reference preceded by free on line 216 /home/cocci/testing/lib/fortify_kunit.c:220:8-9: ERROR: reference preceded by free on line 218 /home/cocci/testing/lib/fortify_kunit.c:223:8-9: ERROR: reference preceded by free on line 220 /home/cocci/testing/lib/fortify_kunit.c:226:8-9: ERROR: reference preceded by free on line 223 /home/cocci/testing/lib/fortify_kunit.c:228:8-9: ERROR: reference preceded by free on line 226 /home/cocci/testing/lib/fortify_kunit.c:230:8-9: ERROR: reference preceded by free on line 228 /home/cocci/testing/lib/fortify_kunit.c:233:8-9: ERROR: reference preceded by free on line 230 /home/cocci/testing/lib/fortify_kunit.c:236:8-9: ERROR: reference preceded by free on line 233 /home/cocci/testing/lib/fortify_kunit.c:242:8-9: ERROR: reference preceded by free on line 236 /home/cocci/testing/lib/fortify_kunit.c:247:8-9: ERROR: reference preceded by free on line 242 /home/cocci/testing/lib/fortify_kunit.c:252:8-9: ERROR: reference preceded by free on line 247 /home/cocci/testing/lib/fortify_kunit.c:258:54-55: ERROR: reference preceded by free on line 252 /home/cocci/testing/lib/fortify_kunit.c:378:9-10: ERROR: reference preceded by free on line 376 /home/cocci/testing/lib/fortify_kunit.c:376:9-10: ERROR: reference preceded by free on line 378 /home/cocci/testing/fs/smb/client/smb2ops.c:1648:23-29: ERROR: reference preceded by free on line 1768 /home/cocci/testing/fs/smb/client/smb2ops.c:1667:12-18: ERROR: reference preceded by free on line 1768 /home/cocci/testing/fs/smb/client/smb2ops.c:1682:31-37: ERROR: reference preceded by free on line 1768 /home/cocci/testing/fs/smb/client/smb2ops.c:1768:7-13: ERROR: reference preceded by free on line 1768 /home/cocci/testing/fs/smb/client/smb2ops.c:1300:7-9: ERROR: reference preceded by free on line 1300 /home/cocci/testing/drivers/pci/controller/pci-hyperv.c:2615:31-33: ERROR: reference preceded by free on line 2596 /home/cocci/testing/drivers/irqchip/irq-renesas-rzg2l.c:545:2-8: ERROR: missing put_device; call of_find_device_by_node on line 538, but without a corresponding object release within this function. /home/cocci/testing/drivers/irqchip/irq-renesas-rzg2l.c:550:2-8: ERROR: missing put_device; call of_find_device_by_node on line 538, but without a corresponding object release within this function. /home/cocci/testing/drivers/irqchip/irq-renesas-rzg2l.c:556:2-8: ERROR: missing put_device; call of_find_device_by_node on line 538, but without a corresponding object release within this function. /home/cocci/testing/drivers/irqchip/irq-renesas-rzg2l.c:561:2-8: ERROR: missing put_device; call of_find_device_by_node on line 538, but without a corresponding object release within this function. /home/cocci/testing/drivers/irqchip/irq-renesas-rzg2l.c:566:2-8: ERROR: missing put_device; call of_find_device_by_node on line 538, but without a corresponding object release within this function. /home/cocci/testing/drivers/irqchip/irq-renesas-rzg2l.c:571:2-8: ERROR: missing put_device; call of_find_device_by_node on line 538, but without a corresponding object release within this function. /home/cocci/testing/drivers/irqchip/irq-renesas-rzg2l.c:594:1-7: ERROR: missing put_device; call of_find_device_by_node on line 538, but without a corresponding object release within this function. /home/cocci/testing/drivers/irqchip/irq-renesas-rzg2l.c:601:1-7: ERROR: missing put_device; call of_find_device_by_node on line 538, but without a corresponding object release within this function. /home/cocci/testing/drivers/pci/hotplug/pnv_php.c:162:2-13: ERROR: probable double put. /home/cocci/testing/drivers/spmi/spmi-pmic-arb.c:1774:1-33: WARNING: Function "for_each_available_child_of_node" should have of_node_put() before return around line 1778. /home/cocci/testing/drivers/iio/humidity/am2315.c:179:26-29: ERROR: iterator variable bound on line 177 cannot be NULL /home/cocci/testing/arch/x86/kvm/svm/sev.c:1925:7-8: ERROR: iterator variable bound on line 1920 cannot be NULL /home/cocci/testing/arch/x86/kvm/svm/sev.c:1945:6-7: ERROR: iterator variable bound on line 1940 cannot be NULL /home/cocci/testing/drivers/md/dm-vdo/slab-depot.c:160:39-52: ERROR: invalid reference to the index variable of the iterator on line 155 /home/cocci/testing/fs/jfs/jfs_logmgr.c:884:27-31: ERROR: invalid reference to the index variable of the iterator on line 817 /home/cocci/testing/drivers/pci/setup-bus.c:1995:21-24: ERROR: invalid reference to the index variable of the iterator on line 1969 /home/cocci/testing/tools/testing/nvdimm/test/iomap.c:250:10-13: ERROR: invalid reference to the index variable of the iterator on line 238 /home/cocci/testing/drivers/thermal/thermal_core.c:732:11-15: ERROR: invalid reference to the index variable of the iterator on line 723 /home/cocci/testing/drivers/thermal/thermal_core.c:732:27-31: ERROR: invalid reference to the index variable of the iterator on line 727 /home/cocci/testing/drivers/thermal/thermal_core.c:1576:5-8: ERROR: invalid reference to the index variable of the iterator on line 1573 /home/cocci/testing/fs/netfs/write_collect.c:254:7-13: ERROR: invalid reference to the index variable of the iterator on line 225 /home/cocci/testing/arch/powerpc/platforms/pseries/papr_scm.c:1348:24-25: ERROR: invalid reference to the index variable of the iterator on line 1340 /home/cocci/testing/arch/powerpc/platforms/pseries/papr_scm.c:1348:35-36: ERROR: invalid reference to the index variable of the iterator on line 1340 /home/cocci/testing/drivers/net/ethernet/intel/igb/igb_main.c:7862:3-8: ERROR: invalid reference to the index variable of the iterator on line 7854 /home/cocci/testing/drivers/usb/gadget/udc/aspeed_udc.c:712:6-9: ERROR: invalid reference to the index variable of the iterator on line 702 /home/cocci/testing/fs/fs-writeback.c:464:8-11: ERROR: invalid reference to the index variable of the iterator on line 459 /home/cocci/testing/drivers/vfio/vfio_iommu_spapr_tce.c:129:41-47: ERROR: invalid reference to the index variable of the iterator on line 119 /home/cocci/testing/mm/compaction.c:1662:31-39: ERROR: invalid reference to the index variable of the iterator on line 1624 /home/cocci/testing/drivers/dca/dca-core.c:209:25-28: ERROR: invalid reference to the index variable of the iterator on line 198 /home/cocci/testing/kernel/exit.c:515:18-19: ERROR: invalid reference to the index variable of the iterator on line 508 /home/cocci/testing/mm/percpu.c:2053:34-39: ERROR: invalid reference to the index variable of the iterator on line 2043 /home/cocci/testing/mm/percpu.c:2053:52-57: ERROR: invalid reference to the index variable of the iterator on line 2043 /home/cocci/testing/mm/percpu.c:2010:19-29: ERROR: function pcpu_balance_populated called on line 2212 inside lock on line 2208 but uses GFP_KERNEL /home/cocci/testing/fs/inode.c:924:2-11: second lock on line 924 /home/cocci/testing/fs/inode.c:965:2-11: second lock on line 965 /home/cocci/testing/fs/fs-writeback.c:2511:1-10: second lock on line 2527 /home/cocci/testing/fs/fs-writeback.c:1901:2-11: second lock on line 1973 /home/cocci/testing/fs/fs-writeback.c:1740:1-10: second lock on line 1777 /home/cocci/testing/arch/x86/kvm/mmu/mmu.c:2803:3-12: second lock on line 2803 /home/cocci/testing/fs/inode.c:940:1-7: preceding lock on line 924 /home/cocci/testing/fs/inode.c:981:1-7: preceding lock on line 965 /home/cocci/testing/fs/inode.c:1710:3-9: preceding lock on line 1697 /home/cocci/testing/drivers/pinctrl/nomadik/pinctrl-nomadik.c:981:1-7: preceding lock on line 904 /home/cocci/testing/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:1018:2-8: preceding lock on line 968 /home/cocci/testing/arch/x86/kvm/mmu/tdp_mmu.c:1447:4-10: preceding lock on line 1439 /home/cocci/testing/arch/x86/kvm/mmu/tdp_mmu.c:1447:4-10: preceding lock on line 1439 /home/cocci/testing/arch/x86/kvm/mmu/tdp_mmu.c:1474:1-7: preceding lock on line 1439 /home/cocci/testing/arch/x86/kvm/mmu/tdp_mmu.c:1474:1-7: preceding lock on line 1439 /home/cocci/testing/arch/x86/kvm/mmu/tdp_mmu.c:1447:4-10: preceding lock on line 1441 /home/cocci/testing/arch/x86/kvm/mmu/tdp_mmu.c:1447:4-10: preceding lock on line 1441 /home/cocci/testing/arch/x86/kvm/mmu/tdp_mmu.c:1474:1-7: preceding lock on line 1441 /home/cocci/testing/arch/x86/kvm/mmu/tdp_mmu.c:1474:1-7: preceding lock on line 1441 /home/cocci/testing/drivers/iio/light/opt3001.c:735:1-7: preceding lock on line 693 /home/cocci/testing/drivers/net/tun.c:2038:1-7: preceding lock on line 1839 /home/cocci/testing/mm/hugetlb.c:6485:2-8: preceding lock on line 6451 /home/cocci/testing/mm/hugetlb.c:5969:2-8: preceding lock on line 6027 /home/cocci/testing/mm/hugetlb.c:5969:2-8: preceding lock on line 6029 /home/cocci/testing/mm/hugetlb.c:739:3-9: preceding lock on line 712 /home/cocci/testing/mm/hugetlb.c:788:2-8: preceding lock on line 778 /home/cocci/testing/drivers/staging/rtl8192e/rtllib_rx.c:706:3-9: preceding lock on line 697 /home/cocci/testing/mm/vmalloc.c:1086:3-9: preceding lock on line 1082 /home/cocci/testing/drivers/misc/eeprom/ee1004.c:276:2-8: preceding lock on line 265 /home/cocci/testing/fs/namei.c:3185:2-8: preceding lock on line 3180 /home/cocci/testing/kernel/exit.c:1596:3-9: preceding lock on line 1591 /home/cocci/testing/kernel/exit.c:1603:4-10: preceding lock on line 1591 /home/cocci/testing/kernel/exit.c:1607:4-10: preceding lock on line 1591 /home/cocci/testing/kernel/exit.c:531:1-7: preceding lock on line 497 /home/cocci/testing/fs/dcache.c:668:2-8: preceding lock on line 660 /home/cocci/testing/arch/x86/mm/pat/set_memory.c:1833:1-7: preceding lock on line 1807 /home/cocci/testing/drivers/input/mouse/psmouse-base.c:1907:3-9: preceding lock on line 1912 /home/cocci/testing/drivers/input/mouse/psmouse-base.c:1916:3-9: preceding lock on line 1912 /home/cocci/testing/drivers/input/mouse/psmouse-base.c:1921:3-9: preceding lock on line 1912 /home/cocci/testing/mm/migrate.c:823:1-7: preceding lock on line 783 /home/cocci/testing/arch/powerpc/platforms/cell/spufs/inode.c:456:1-7: preceding lock on line 430 /home/cocci/testing/drivers/md/bcache/btree.c:1531:1-7: preceding lock on line 1406 /home/cocci/testing/kernel/trace/trace.c:6482:3-9: preceding lock on line 6501 /home/cocci/testing/kernel/trace/trace.c:6504:3-9: preceding lock on line 6501 /home/cocci/testing/block/blk-cgroup.c:926:1-7: preceding lock on line 858 /home/cocci/testing/block/blk-cgroup.c:926:1-7: preceding lock on line 899 /home/cocci/testing/net/netfilter/nf_conntrack_core.c:113:2-8: preceding lock on line 107 /home/cocci/testing/drivers/md/md.c:464:2-8: preceding lock on line 462 /home/cocci/testing/arch/arm64/kvm/mmu.c:147:3-9: preceding lock on line 140 /home/cocci/testing/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:4487:1-7: preceding lock on line 4389 /home/cocci/testing/mm/percpu.c:1912:1-7: preceding lock on line 1794 /home/cocci/testing/mm/percpu.c:1938:1-7: preceding lock on line 1794 /home/cocci/testing/arch/x86/kvm/mmu/mmu.c:2786:3-9: preceding lock on line 2803 /home/cocci/testing/arch/x86/kvm/mmu/mmu.c:2792:3-9: preceding lock on line 2803 /home/cocci/testing/drivers/iio/industrialio-core.c:2160:2-8: preceding lock on line 2157 /home/cocci/testing/drivers/usb/typec/ucsi/ucsi.c:243:2-8: preceding lock on line 238 /home/cocci/testing/drivers/usb/typec/ucsi/ucsi.c:247:2-8: preceding lock on line 238 /home/cocci/testing/mm/slub.c:4347:2-8: preceding lock on line 4319 /home/cocci/testing/mm/vmscan.c:798:1-7: preceding lock on line 714 /home/cocci/testing/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c:281:1-7: preceding lock on line 241 /home/cocci/testing/mm/swapfile.c:1026:1-7: preceding lock on line 909 /home/cocci/testing/mm/swapfile.c:1026:1-7: preceding lock on line 922 /home/cocci/testing/mm/swapfile.c:1026:1-7: preceding lock on line 954 /home/cocci/testing/mm/swapfile.c:1026:1-7: preceding lock on line 987 /home/cocci/testing/mm/swapfile.c:1055:1-7: preceding lock on line 909 /home/cocci/testing/mm/swapfile.c:1055:1-7: preceding lock on line 922 /home/cocci/testing/mm/swapfile.c:1055:1-7: preceding lock on line 954 /home/cocci/testing/mm/swapfile.c:1055:1-7: preceding lock on line 987 /home/cocci/testing/drivers/md/bcache/alloc.c:414:1-7: preceding lock on line 349 /home/cocci/testing/drivers/md/bcache/alloc.c:414:1-7: preceding lock on line 368 /home/cocci/testing/fs/fs-writeback.c:347:3-9: preceding lock on line 342 /home/cocci/testing/arch/powerpc/kvm/book3s_hv.c:4655:0-1: preceding lock on line 4572 /home/cocci/testing/fs/aio.c:1710:3-9: preceding lock on line 1708 /home/cocci/testing/tools/testing/selftests/mm/pagemap_ioctl.c:1322:26-27: WARNING: Use ARRAY_SIZE /home/cocci/testing/lib/checksum_kunit.c:471:27-28: WARNING: Use ARRAY_SIZE /home/cocci/testing/lib/checksum_kunit.c:472:33-34: WARNING: Use ARRAY_SIZE /home/cocci/testing/lib/checksum_kunit.c:474:38-39: WARNING: Use ARRAY_SIZE /home/cocci/testing/tools/testing/selftests/mm/uffd-unit-tests.c:1479:32-33: WARNING: Use ARRAY_SIZE /home/cocci/testing/tools/testing/selftests/mm/uffd-unit-tests.c:1480:30-31: WARNING: Use ARRAY_SIZE /home/cocci/testing/lib/overflow_kunit.c:637:13-14: WARNING: array_size is used later (line 644) to compute the same size /home/cocci/testing/drivers/net/ethernet/intel/iavf/iavf_main.c:2238:6-8: WARNING: possible condition with no effect (if == else) /home/cocci/testing/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3581:2-4: WARNING: possible condition with no effect (if == else) /home/cocci/testing/mm/shmem.c:3905:8-15: ERROR: PTR_ERR applied after initialization to constant on line 3896 /home/cocci/testing/drivers/iio/common/scmi_sensors/scmi_iio.c:247:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. /home/cocci/testing/drivers/iio/common/scmi_sensors/scmi_iio.c:507:2-8: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. /home/cocci/testing/drivers/iio/common/scmi_sensors/scmi_iio.c:273:2-8: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. /home/cocci/testing/drivers/iio/common/scmi_sensors/scmi_iio.c:166:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead. /home/cocci/testing/drivers/staging/iio/impedance-analyzer/ad5933.c:198:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. /home/cocci/testing/arch/x86/kvm/lapic.c:1962:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. /home/cocci/testing/fs/jfs/jfs_dmap.c:1599:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_s64 instead. /home/cocci/testing/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:2782:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. /home/cocci/testing/drivers/iio/frequency/adf4350.c:190:2-8: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. /home/cocci/testing/drivers/tty/serial/imx.c:1828:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. /home/cocci/testing/include/linux/clockchips.h:176:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. /home/cocci/testing/mm/mm_init.c:2395:2-8: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead. /home/cocci/testing/tools/testing/selftests/kvm/include/x86_64/processor.h:66:7-26: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) /home/cocci/testing/include/linux/mmzone.h:1796:15-30: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) /home/cocci/testing/fs/smb/server/smb2pdu.h:197:6-12: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) /home/cocci/testing/fs/smb/server/smb2pdu.h:373:6-10: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) /home/cocci/testing/drivers/parport/procfs.c:260:18-28: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) /home/cocci/testing/drivers/parport/procfs.c:357:18-28: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) /home/cocci/testing/include/linux/min_heap.h:21:7-19: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) /home/cocci/testing/include/linux/mtd/cfi.h:193:31-41: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) /home/cocci/testing/include/linux/mtd/cfi.h:245:10-19: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) /home/cocci/testing/include/linux/mtd/cfi.h:251:10-19: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) /home/cocci/testing/drivers/pci/controller/dwc/pci-dra7xx.c:852:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) /home/cocci/testing/drivers/rtc/rtc-tps65910.c:412:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) /home/cocci/testing/drivers/input/touchscreen/edt-ft5x06.c:1322:9-34: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) /home/cocci/testing/drivers/usb/typec/ucsi/ucsi_ccg.c:711:8-28: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) /home/cocci/testing/drivers/pinctrl/pinctrl-mcp23s08.c:555:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) /home/cocci/testing/drivers/rtc/rtc-rc5t583.c:241:7-32: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) /home/cocci/testing/drivers/mailbox/mtk-cmdq-mailbox.c:587:8-14: ERROR: application of sizeof to pointer /home/cocci/testing/drivers/input/touchscreen/himax_hx83112b.c:137:42-48: ERROR: application of sizeof to pointer /home/cocci/testing/arch/loongarch/include/asm/addrspace.h:62:33-34: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4041:21-22: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4081:21-22: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4121:13-14: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:2134:20-21: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:2089:27-28: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:2159:20-21: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:2200:31-32: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4913:26-27: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4447:14-15: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:1782:29-30: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:3871:31-32: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:3900:31-32: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:3903:31-32: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:3856:31-32: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:3859:32-33: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4173:15-16: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4175:39-40: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4186:48-49: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4188:48-49: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4189:48-49: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4190:53-54: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4196:37-38: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4206:47-48: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4248:15-16: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4250:39-40: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4259:48-49: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4261:48-49: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4262:48-49: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4263:53-54: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4269:37-38: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4292:15-16: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4309:14-15: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4313:46-47: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4323:14-15: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4357:27-28: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4377:22-23: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:4382:16-17: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:3938:33-34: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:3940:51-52: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:3949:29-30: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:3966:31-32: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/tty/synclink_gt.c:3969:49-50: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/arch/powerpc/include/asm/page.h:116:37-38: WARNING: sum of probable bitmasks, consider | /home/cocci/testing/drivers/pci/controller/dwc/pci-imx6.c:589:5-8: Unneeded variable: "ret". Return "0" on line 635 /home/cocci/testing/fs/btrfs/send.c:7144:5-8: Unneeded variable: "ret". Return "0" on line 7150 /home/cocci/testing/lib/overflow_kunit.c:295:14-19: Unneeded variable: "index". Return "0" on line 297 /home/cocci/testing/arch/x86/kvm/emulate.c:1181:5-7: Unneeded variable: "rc". Return "X86EMUL_CONTINUE" on line 1203 /home/cocci/testing/arch/x86/kvm/emulate.c:1316:5-7: Unneeded variable: "rc". Return "X86EMUL_CONTINUE" on line 1331 /home/cocci/testing/arch/x86/kvm/emulate.c:4524:5-7: Unneeded variable: "rc". Return "X86EMUL_CONTINUE" on line 4558 /home/cocci/testing/arch/s390/kvm/kvm-s390.c:4309:5-8: Unneeded variable: "ret". Return "0" on line 4321 /home/cocci/testing/drivers/input/serio/i8042.c:1133:6-11: Unneeded variable: "delay". Return "0" on line 1149 /home/cocci/testing/arch/powerpc/kvm/book3s_pr.c:424:5-6: Unneeded variable: "r". Return "1" on line 431 /home/cocci/testing/drivers/usb/typec/ucsi/ucsi_glink.c:266:2-3: Unneeded semicolon /home/cocci/testing/arch/loongarch/kvm/exit.c:716:2-3: Unneeded semicolon /home/cocci/testing/drivers/hwtracing/coresight/coresight-priv.h:231:2-3: Unneeded semicolon /home/cocci/testing/kernel/trace/trace.c:2141:2-8: SUGGESTION: printk + WARN_ON can be just WARN /home/cocci/testing/tools/testing/selftests/mm/mseal_test.c:1399:29-30: WARNING comparing pointer to 0 /home/cocci/testing/tools/testing/selftests/mm/mseal_test.c:486:27-28: WARNING comparing pointer to 0 /home/cocci/testing/lib/test_xarray.c:978:52-53: WARNING comparing pointer to 0 /home/cocci/testing/lib/test_xarray.c:978:52-53: WARNING comparing pointer to 0 /home/cocci/testing/drivers/scsi/qedf/qedf_main.c:4024:18-25: ERROR: qedf is NULL but dereferenced. /home/cocci/testing/drivers/staging/greybus/bootrom.c:301:35-39: ERROR: fw is NULL but dereferenced. /home/cocci/testing/fs/btrfs/send.c:8344:22-39: ERROR: sctx is NULL but dereferenced. /home/cocci/testing/fs/btrfs/send.c:8361:22-39: ERROR: sctx is NULL but dereferenced. /home/cocci/testing/fs/btrfs/send.c:8372:22-33: ERROR: sctx is NULL but dereferenced. /home/cocci/testing/drivers/android/binder.c:1609:19-23: ERROR: from is NULL but dereferenced. /home/cocci/testing/drivers/android/binder.c:2978:19-23: ERROR: from is NULL but dereferenced. /home/cocci/testing/drivers/android/binder.c:3073:29-33: ERROR: target_thread is NULL but dereferenced. /home/cocci/testing/drivers/android/binder.c:5055:16-20: ERROR: t is NULL but dereferenced. /home/cocci/testing/drivers/android/binder.c:5086:17-21: ERROR: t is NULL but dereferenced. /home/cocci/testing/drivers/android/binder.c:378:25-35: ERROR: node -> proc is NULL but dereferenced. /home/cocci/testing/drivers/android/binder.c:2307:26-36: ERROR: node -> proc is NULL but dereferenced. /home/cocci/testing/drivers/android/binder.c:2314:26-36: ERROR: node -> proc is NULL but dereferenced. /home/cocci/testing/fs/smb/client/cifsfs.c:1140:6-12: ERROR: allocation function on line 1127 returns NULL not ERR_PTR on failure /home/cocci/testing/arch/x86/kvm/cpuid.c:631:27-28: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:632:2-3: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:633:2-3: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:633:27-28: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:633:45-46: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:634:21-22: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:635:12-13: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:637:2-3: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:646:21-22: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:648:22-23: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:649:2-3: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:657:29-30: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:664:37-38: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:725:31-32: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:725:43-44: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:727:31-32: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:728:2-3: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:735:21-22: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:737:22-23: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:738:10-11: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:787:2-3: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:787:16-17: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:787:30-31: duplicated argument to & or | /home/cocci/testing/arch/x86/kvm/cpuid.c:791:43-44: duplicated argument to & or | /home/cocci/testing/arch/powerpc/include/asm/mmu.h:150:2-20: duplicated argument to & or | /home/cocci/testing/drivers/usb/storage/usb.c:579:4-13: duplicated argument to && or || /home/cocci/testing/drivers/pci/pci.c:6853:6-10: duplicated argument to && or || /home/cocci/testing/drivers/scsi/sd.c:2445:6-16: WARNING: Unsigned expression compared with zero: the_result > 0 /home/cocci/testing/tools/testing/selftests/mm/pagemap_ioctl.c:1408:18-23: WARNING: Unsigned expression compared with zero: count > 0