/Linux-v5.10/tools/testing/selftests/vm/ |
D | mremap_dontunmap.c | 33 #define BUG_ON(condition, description) \ macro 51 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in kernel_support_for_mremap_dontunmap() 61 BUG_ON(munmap(dest_mapping, num_pages * page_size) == -1, in kernel_support_for_mremap_dontunmap() 65 BUG_ON(munmap(source_mapping, num_pages * page_size) == -1, in kernel_support_for_mremap_dontunmap() 74 BUG_ON(size & (page_size - 1), in check_region_contains_byte() 76 BUG_ON((unsigned long)addr & (page_size - 1), in check_region_contains_byte() 105 BUG_ON(source_mapping == MAP_FAILED, "mmap"); in mremap_dontunmap_simple() 113 BUG_ON(dest_mapping == MAP_FAILED, "mremap"); in mremap_dontunmap_simple() 117 BUG_ON(check_region_contains_byte in mremap_dontunmap_simple() 120 BUG_ON(check_region_contains_byte in mremap_dontunmap_simple() [all …]
|
D | map_populate.c | 24 #define BUG_ON(condition, description) \ macro 38 BUG_ON(ret <= 0, "read(sock)"); in parent_f() 42 BUG_ON(ret, "msync()"); in parent_f() 45 BUG_ON(ret <= 0, "write(sock)"); in parent_f() 48 BUG_ON(!WIFEXITED(status), "child in unexpected state"); in parent_f() 59 BUG_ON(smap == MAP_FAILED, "mmap()"); in child_f() 61 BUG_ON(*smap != 0xdeadbabe, "MAP_PRIVATE | MAP_POPULATE changed file"); in child_f() 64 BUG_ON(ret <= 0, "write(sock)"); in child_f() 67 BUG_ON(ret <= 0, "read(sock)"); in child_f() 69 BUG_ON(*smap == 0x22222BAD, "MAP_POPULATE didn't COW private page"); in child_f() [all …]
|
/Linux-v5.10/lib/ |
D | atomic64_test.c | 49 BUG_ON(atomic##bit##_##op(val, &v) != r); \ 50 BUG_ON(atomic##bit##_read(&v) != r); \ 58 BUG_ON(atomic##bit##_##op(val, &v) != v0); \ 59 BUG_ON(atomic##bit##_read(&v) != r); \ 75 BUG_ON(atomic##bit##_##op(&v, ##args) != ret); \ 76 BUG_ON(atomic##bit##_read(&v) != expect); \ 159 BUG_ON(v.counter != r); in test_atomic64() 163 BUG_ON(v.counter != r); in test_atomic64() 164 BUG_ON(atomic64_read(&v) != r); in test_atomic64() 193 BUG_ON(v.counter != r); in test_atomic64() [all …]
|
D | plist.c | 151 BUG_ON(plist_head_empty(head)); in plist_requeue() 152 BUG_ON(plist_node_empty(node)); in plist_requeue() 188 BUG_ON(nr_expect != 0); in plist_test_check() 199 BUG_ON(!list_empty(&node_pos->prio_list)); in plist_test_check() 203 BUG_ON(prio_pos->prio > node_pos->prio); in plist_test_check() 204 BUG_ON(prio_pos->prio_list.next != &node_pos->prio_list); in plist_test_check() 208 BUG_ON(nr_expect != 0); in plist_test_check() 209 BUG_ON(prio_pos->prio_list.next != &first->prio_list); in plist_test_check() 217 BUG_ON(node->prio == plist_next(node)->prio); in plist_test_requeue()
|
D | lru_cache.c | 29 BUG_ON(!lc); \ 30 BUG_ON(!lc->nr_elements); \ 31 BUG_ON(test_and_set_bit(__LC_PARANOIA, &lc->flags)); \ 43 BUG_ON(i >= lc_->nr_elements); \ 44 BUG_ON(lc_->lc_element[i] != e_); } while (0) 254 BUG_ON(!lc); in __lc_find() 255 BUG_ON(!lc->nr_elements); in __lc_find() 313 BUG_ON(e->refcnt); in lc_del() 430 BUG_ON(!e); in __lc_get() 433 BUG_ON(++e->refcnt != 1); in __lc_get() [all …]
|
/Linux-v5.10/net/mac802154/ |
D | mib.c | 29 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_dev_set_page_channel() 46 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_get_params() 62 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_set_params() 78 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_add_key() 93 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_del_key() 108 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_add_dev() 122 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_del_dev() 138 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_add_devkey() 154 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_del_devkey() 169 BUG_ON(dev->type != ARPHRD_IEEE802154); in mac802154_add_seclevel() [all …]
|
/Linux-v5.10/tools/testing/radix-tree/ |
D | idr-test.c | 175 BUG_ON(id < 0); in idr_u32_cb() 176 BUG_ON(ptr != DUMMY_PTR); in idr_u32_cb() 187 BUG_ON(idr_alloc_u32(idr, DUMMY_PTR, &id, id, GFP_KERNEL)); in idr_u32_test1() 188 BUG_ON(id != handle); in idr_u32_test1() 189 BUG_ON(idr_alloc_u32(idr, DUMMY_PTR, &id, id, GFP_KERNEL) != -ENOSPC); in idr_u32_test1() 190 BUG_ON(id != handle); in idr_u32_test1() 195 BUG_ON(ptr != NULL); in idr_u32_test1() 196 BUG_ON(sid != 0); in idr_u32_test1() 198 BUG_ON(ptr != DUMMY_PTR); in idr_u32_test1() 199 BUG_ON(sid != id); in idr_u32_test1() [all …]
|
/Linux-v5.10/drivers/clk/sirf/ |
D | clk-atlas7.c | 1451 BUG_ON(!clk); in atlas7_clk_init() 1453 BUG_ON(!clk); in atlas7_clk_init() 1455 BUG_ON(!clk); in atlas7_clk_init() 1457 BUG_ON(!clk); in atlas7_clk_init() 1459 BUG_ON(!clk); in atlas7_clk_init() 1461 BUG_ON(!clk); in atlas7_clk_init() 1466 BUG_ON(!clk); in atlas7_clk_init() 1470 BUG_ON(!clk); in atlas7_clk_init() 1474 BUG_ON(!clk); in atlas7_clk_init() 1479 BUG_ON(!clk); in atlas7_clk_init() [all …]
|
/Linux-v5.10/mm/ |
D | userfaultfd.c | 278 BUG_ON(dst_addr >= dst_start + len); in __mcopy_atomic_hugetlb() 319 BUG_ON(!page); in __mcopy_atomic_hugetlb() 334 BUG_ON(page); in __mcopy_atomic_hugetlb() 399 BUG_ON(copied < 0); in __mcopy_atomic_hugetlb() 400 BUG_ON(err > 0); in __mcopy_atomic_hugetlb() 401 BUG_ON(!copied && !err); in __mcopy_atomic_hugetlb() 476 BUG_ON(dst_start & ~PAGE_MASK); in __mcopy_atomic() 477 BUG_ON(len & ~PAGE_MASK); in __mcopy_atomic() 480 BUG_ON(src_start + len <= src_start); in __mcopy_atomic() 481 BUG_ON(dst_start + len <= dst_start); in __mcopy_atomic() [all …]
|
/Linux-v5.10/tools/perf/bench/ |
D | sched-pipe.c | 63 BUG_ON(ret != sizeof(int)); in worker_thread() 65 BUG_ON(ret != sizeof(int)); in worker_thread() 68 BUG_ON(ret != sizeof(int)); in worker_thread() 70 BUG_ON(ret != sizeof(int)); in worker_thread() 96 BUG_ON(pipe(pipe_1)); in bench_sched_pipe() 97 BUG_ON(pipe(pipe_2)); in bench_sched_pipe() 122 BUG_ON(ret); in bench_sched_pipe() 129 BUG_ON(ret); in bench_sched_pipe()
|
D | numa.c | 255 BUG_ON(!cpumask); in node_has_cpus() 275 BUG_ON(ret); in bind_to_cpu() 285 BUG_ON(target_cpu < 0 || target_cpu >= g->p.nr_cpus); in bind_to_cpu() 290 BUG_ON(ret); in bind_to_cpu() 302 BUG_ON(ret); in bind_to_node() 312 BUG_ON(!cpumask); in bind_to_node() 323 BUG_ON(ret); in bind_to_node() 333 BUG_ON(ret); in bind_to_cpumask() 342 BUG_ON(ret); in mempol_restore() 353 BUG_ON(g->p.nr_nodes > (int)sizeof(nodemask)*8); in bind_to_memnode() [all …]
|
/Linux-v5.10/drivers/net/wireless/ti/wlcore/ |
D | hw_ops.h | 18 BUG_ON(1); in wlcore_hw_calc_tx_blocks() 28 BUG_ON(1); in wlcore_hw_set_tx_desc_blocks() 39 BUG_ON(1); in wlcore_hw_set_tx_desc_data_len() 49 BUG_ON(1); in wlcore_hw_get_rx_buf_align() 67 BUG_ON(1); in wlcore_hw_get_rx_packet_len() 99 BUG_ON(!wl->ops->convert_fw_status); in wlcore_hw_convert_fw_status() 108 BUG_ON(1); in wlcore_hw_sta_get_ap_rate_mask() 127 BUG_ON(1); in wlcore_hw_set_tx_desc_csum() 173 BUG_ON(1); in wlcore_hw_get_spare_blocks() 185 BUG_ON(1); in wlcore_hw_set_key() [all …]
|
/Linux-v5.10/fs/ntfs/ |
D | aops.c | 130 BUG_ON(!recs); in ntfs_end_buffer_async_read() 186 BUG_ON(!ni->runlist.rl && !ni->mft_no && !NInoAttr(ni)); in ntfs_read_block() 199 BUG_ON(!bh); in ntfs_read_block() 391 BUG_ON(!PageLocked(page)); in ntfs_readpage() 421 BUG_ON(ni->type != AT_DATA); in ntfs_readpage() 427 BUG_ON(ni->type != AT_DATA); in ntfs_readpage() 428 BUG_ON(ni->name_len); in ntfs_readpage() 555 BUG_ON(!NInoNonResident(ni)); in ntfs_write_block() 556 BUG_ON(NInoMstProtected(ni)); in ntfs_write_block() 560 BUG_ON(!PageUptodate(page)); in ntfs_write_block() [all …]
|
D | collate.c | 39 BUG_ON(data1_len != data2_len); in ntfs_collate_ntofs_ulong() 40 BUG_ON(data1_len != 4); in ntfs_collate_ntofs_ulong() 97 BUG_ON(cr != COLLATION_BINARY && cr != COLLATION_NTOFS_ULONG); in ntfs_collate() 99 BUG_ON(i < 0); in ntfs_collate() 103 BUG_ON(i < 0x10); in ntfs_collate()
|
D | bitmap.c | 44 BUG_ON(!vi); in __ntfs_bitmap_set_bits_in_run() 49 BUG_ON(start_bit < 0); in __ntfs_bitmap_set_bits_in_run() 50 BUG_ON(cnt < 0); in __ntfs_bitmap_set_bits_in_run() 51 BUG_ON(value > 1); in __ntfs_bitmap_set_bits_in_run() 107 BUG_ON(cnt <= 0); in __ntfs_bitmap_set_bits_in_run() 133 BUG_ON(cnt > 7); in __ntfs_bitmap_set_bits_in_run()
|
D | file.c | 115 BUG_ON(new_init_size > ni->allocated_size); in ntfs_attr_extend_initialized() 130 BUG_ON(old_init_size != old_i_size); in ntfs_attr_extend_initialized() 151 BUG_ON(a->non_resident); in ntfs_attr_extend_initialized() 154 BUG_ON(old_i_size != (loff_t)attr_len); in ntfs_attr_extend_initialized() 195 BUG_ON(!a->non_resident); in ntfs_attr_extend_initialized() 196 BUG_ON(old_i_size != (loff_t) in ntfs_attr_extend_initialized() 269 BUG_ON(ni->initialized_size != new_init_size); in ntfs_attr_extend_initialized() 292 BUG_ON(!a->non_resident); in ntfs_attr_extend_initialized() 341 BUG_ON(NInoMstProtected(ni)); in ntfs_prepare_file_for_write() 342 BUG_ON(ni->type != AT_DATA); in ntfs_prepare_file_for_write() [all …]
|
/Linux-v5.10/arch/sparc/include/asm/ |
D | vga.h | 25 BUG_ON((long) addr >= 0); in scr_writew() 32 BUG_ON((long) addr >= 0); in scr_readw() 39 BUG_ON((long) p >= 0); in scr_memsetw() 46 BUG_ON((long) d >= 0); in scr_memcpyw() 53 BUG_ON((long) d >= 0); in scr_memmovew()
|
/Linux-v5.10/net/ceph/ |
D | messenger.c | 121 BUG_ON(!con_flag_valid(con_flag)); in con_flag_clear() 128 BUG_ON(!con_flag_valid(con_flag)); in con_flag_set() 135 BUG_ON(!con_flag_valid(con_flag)); in con_flag_test() 143 BUG_ON(!con_flag_valid(con_flag)); in con_flag_test_and_clear() 151 BUG_ON(!con_flag_valid(con_flag)); in con_flag_test_and_set() 235 BUG_ON(ceph_msg_cache); in ceph_msgr_slab_init() 245 BUG_ON(!ceph_msg_cache); in ceph_msgr_slab_exit() 257 BUG_ON(zero_page == NULL); in _ceph_msgr_exit() 269 BUG_ON(zero_page != NULL); in ceph_msgr_init() 289 BUG_ON(ceph_msgr_wq == NULL); in ceph_msgr_exit() [all …]
|
/Linux-v5.10/arch/powerpc/kernel/ |
D | syscall_64.c | 28 BUG_ON(irq_soft_mask_return() != IRQS_ALL_DISABLED); in system_call_exception() 33 BUG_ON(!(regs->msr & MSR_RI)); in system_call_exception() 34 BUG_ON(!(regs->msr & MSR_PR)); in system_call_exception() 35 BUG_ON(!FULL_REGS(regs)); in system_call_exception() 36 BUG_ON(regs->softe != IRQS_ENABLED); in system_call_exception() 263 BUG_ON(!(regs->msr & MSR_RI)); in interrupt_exit_user_prepare() 264 BUG_ON(!(regs->msr & MSR_PR)); in interrupt_exit_user_prepare() 265 BUG_ON(!FULL_REGS(regs)); in interrupt_exit_user_prepare() 266 BUG_ON(regs->softe != IRQS_ENABLED); in interrupt_exit_user_prepare() 348 BUG_ON(regs->msr & MSR_PR); in interrupt_exit_kernel_prepare() [all …]
|
/Linux-v5.10/scripts/coccinelle/misc/ |
D | bugon.cocci | 2 /// Use BUG_ON instead of a if condition followed by BUG. 6 //# with a BUG_ON having the conditional expression of the if statement 38 +BUG_ON(e); 55 coccilib.org.print_todo(p[0], "WARNING use BUG_ON") 61 …="WARNING: Use BUG_ON instead of if condition followed by BUG.\nPlease make sure the condition has…
|
/Linux-v5.10/arch/x86/xen/ |
D | multicalls.c | 64 BUG_ON(preemptible()); in xen_mc_flush() 80 BUG_ON(b->argidx != 0); in xen_mc_flush() 146 BUG_ON(preemptible()); in __xen_mc_entry() 147 BUG_ON(b->argidx >= MC_ARGS); in __xen_mc_entry() 165 BUG_ON(b->argidx >= MC_ARGS); in __xen_mc_entry() 174 BUG_ON(preemptible()); in xen_mc_extend_args() 175 BUG_ON(b->argidx >= MC_ARGS); in xen_mc_extend_args() 192 BUG_ON(b->argidx >= MC_ARGS); in xen_mc_extend_args()
|
/Linux-v5.10/fs/ocfs2/dlm/ |
D | dlmast.c | 56 BUG_ON(lock->ml.highest_blocked == LKM_NLMODE); in dlm_should_cancel_bast() 80 BUG_ON(!dlm); in __dlm_queue_ast() 81 BUG_ON(!lock); in __dlm_queue_ast() 133 BUG_ON(!dlm); in dlm_queue_ast() 134 BUG_ON(!lock); in dlm_queue_ast() 146 BUG_ON(!dlm); in __dlm_queue_bast() 147 BUG_ON(!lock); in __dlm_queue_bast() 153 BUG_ON(!list_empty(&lock->bast_list)); in __dlm_queue_bast() 170 BUG_ON(!dlm); in dlm_queue_bast() 171 BUG_ON(!lock); in dlm_queue_bast() [all …]
|
/Linux-v5.10/fs/ocfs2/ |
D | uptodate.c | 60 BUG_ON(!ci || !ci->ci_ops); in ocfs2_metadata_cache_owner() 67 BUG_ON(!ci || !ci->ci_ops); in ocfs2_metadata_cache_get_super() 74 BUG_ON(!ci || !ci->ci_ops); in ocfs2_metadata_cache_lock() 81 BUG_ON(!ci || !ci->ci_ops); in ocfs2_metadata_cache_unlock() 88 BUG_ON(!ci || !ci->ci_ops); in ocfs2_metadata_cache_io_lock() 95 BUG_ON(!ci || !ci->ci_ops); in ocfs2_metadata_cache_io_unlock() 116 BUG_ON(!ops); in ocfs2_metadata_cache_init() 162 BUG_ON(!ci || !ci->ci_ops); in ocfs2_metadata_cache_purge() 292 BUG_ON(ci->ci_num_cached >= OCFS2_CACHE_INFO_MAX_ARRAY); in ocfs2_append_cache_array() 511 BUG_ON(ocfs2_buffer_cached(ci, bh)); in ocfs2_set_new_buffer_uptodate() [all …]
|
D | stackglue.c | 153 BUG_ON(active_stack == NULL); in ocfs2_stack_driver_put() 154 BUG_ON(active_stack->sp_count == 0); in ocfs2_stack_driver_put() 194 BUG_ON(p != plugin); in ocfs2_stack_glue_unregister() 195 BUG_ON(plugin == active_stack); in ocfs2_stack_glue_unregister() 196 BUG_ON(plugin->sp_count != 0); in ocfs2_stack_glue_unregister() 215 BUG_ON(locking_max_version.pv_major != 0); in ocfs2_stack_glue_set_max_proto_version() 243 BUG_ON(lksb->lksb_conn != conn); in ocfs2_dlm_lock() 253 BUG_ON(lksb->lksb_conn == NULL); in ocfs2_dlm_unlock() 317 BUG_ON(group == NULL); in ocfs2_cluster_connect() 318 BUG_ON(conn == NULL); in ocfs2_cluster_connect() [all …]
|
/Linux-v5.10/block/partitions/ |
D | ldm.c | 71 BUG_ON(!data || !ph); in ldm_parse_privhead() 128 BUG_ON (!data || !toc); in ldm_parse_tocblock() 174 BUG_ON (!data || !vm); in ldm_parse_vmdb() 215 BUG_ON (!ph1 || !ph2); in ldm_compare_privheads() 239 BUG_ON (!toc1 || !toc2); in ldm_compare_tocblocks() 276 BUG_ON (!state || !ph1); in ldm_validate_privheads() 364 BUG_ON(!state || !ldb); in ldm_validate_tocblocks() 436 BUG_ON (!state || !ldb); in ldm_validate_vmdb() 500 BUG_ON(!state); in ldm_validate_partition_table() 542 BUG_ON (!ldb); in ldm_get_disk_objid() [all …]
|