Home
last modified time | relevance | path

Searched refs:cast (Results 1 – 25 of 115) sorted by relevance

12345

/linux/tools/testing/selftests/bpf/progs/
H A Dcpumask_success.c167 if (!bpf_cpumask_test_cpu(0, cast(cpumask))) { in BPF_PROG()
173 if (bpf_cpumask_test_cpu(0, cast(cpumask))) { in BPF_PROG()
196 if (!bpf_cpumask_full(cast(cpumask))) { in BPF_PROG()
202 if (!bpf_cpumask_empty(cast(cpumask))) { in BPF_PROG()
224 if (bpf_cpumask_first(cast(cpumask)) < nr_cpus) { in BPF_PROG()
229 if (bpf_cpumask_first_zero(cast(cpumask)) != 0) { in BPF_PROG()
230 bpf_printk("first zero: %d", bpf_cpumask_first_zero(cast(cpumask))); in BPF_PROG()
236 if (bpf_cpumask_first(cast(cpumask)) != 0) { in BPF_PROG()
241 if (bpf_cpumask_first_zero(cast(cpumask)) != 1) { in BPF_PROG()
271 first = bpf_cpumask_first_and(cast(mask in BPF_PROG()
[all...]
/linux/rust/kernel/
H A Ddevice.rs195 let ptr = ptr.cast(); in as_bound()
216 .cast::<TypeId>() in set_type_id()
226 unsafe { bindings::dev_set_drvdata(self.as_raw(), data.into_foreign().cast()) }; in set_drvdata()
251 unsafe { Pin::<KBox<T>>::from_foreign(ptr.cast()) } in drvdata_obtain()
287 unsafe { Pin::<KBox<T>>::borrow(ptr.cast()) } in drvdata_unchecked()
301 let type_id = unsafe { driver_type.cast::<TypeId>().read_unaligned() }; in match_type_id()
365 unsafe { &*ptr.cast() } in from_raw()
464 klevel.as_ptr().cast::<crate::ffi::c_char>(), in printk()
467 core::ptr::from_ref(&msg).cast::<crate::ffi::c_void>(), in printk()
484 Some(unsafe { &*fwnode_handle.cast() }) in fwnode()
[all …]
H A Dprint.rs26 let mut w = unsafe { RawFormatter::from_ptrs(buf.cast(), end.cast()) }; in rust_fmt_argument()
28 let _ = w.write_fmt(unsafe { *ptr.cast::<fmt::Arguments<'_>>() }); in rust_fmt_argument()
29 w.pos().cast() in rust_fmt_argument()
112 core::ptr::from_ref(&args).cast::<c_void>(),
132 core::ptr::from_ref(&args).cast::<c_void>(), in call_printk_cont()
H A Dmm.rs68 unsafe { bindings::mmdrop(obj.cast().as_ptr()) }; in dec_ref()
104 unsafe { bindings::mmput(obj.cast().as_ptr()) }; in dec_ref()
136 unsafe { &*ptr.cast() } in from_raw()
147 Some(unsafe { ARef::from_raw(NonNull::new_unchecked(self.as_raw().cast())) }) in mmget_not_zero()
166 unsafe { &*ptr.cast() } in from_raw()
H A Dxarray.rs118 .map_while(|ptr| NonNull::new(ptr.cast())) in iter()
187 let ptr = NonNull::new(ptr.cast())?; in load()
212 let ptr = unsafe { bindings::__xa_erase(self.xa.xa.get(), index) }.cast(); in remove()
240 let new = new.cast(); in store()
261 let old = old.cast(); in store()
H A Ddevres.rs173 bindings::devm_add_action(dev.as_raw(), Some(*callback), inner.cast()) in new()
199 let inner = unsafe { &*ptr.cast::<Inner<T>>() }; in devres_callback()
221 core::ptr::from_ref(self.inner()).cast_mut().cast(), in remove_action()
330 drop(unsafe { P::from_foreign(ptr.cast()) }); in register_foreign()
339 bindings::devm_add_action_or_reset(dev.as_raw(), Some(callback::<P>), ptr.cast()) in register_foreign()
H A Duaccess.rs265 let out_ptr = out.as_mut_ptr().cast::<c_void>(); in read_raw()
350 out.as_mut_ptr().cast::<c_void>(), in read()
469 let data_ptr = data.as_ptr().cast::<c_void>(); in write_slice()
545 core::ptr::from_ref(value).cast::<c_void>(), in write()
577 dst.as_mut_ptr().cast::<c_char>(), in raw_strncpy_from_user()
578 src.as_const_ptr().cast::<c_char>(), in raw_strncpy_from_user()
H A Dtypes.rs395 UnsafeCell::get(&self.value).cast::<T>() in get()
403 UnsafeCell::raw_get(this.cast::<UnsafeCell<MaybeUninit<T>>>()).cast::<T>() in cast_into()
408 this.cast() in cast_from()
H A Dusb.rs69 let intf = unsafe { &*intf.cast::<Interface<device::CoreInternal>>() }; in probe_callback()
74 let id = unsafe { &*id.cast::<DeviceId>() }; in probe_callback()
90 let intf = unsafe { &*intf.cast::<Interface<device::CoreInternal>>() }; in disconnect_callback()
363 unsafe { &*(usb_dev.cast()) } in as_ref()
378 unsafe { bindings::usb_put_intf(obj.cast().as_ptr()) } in dec_ref()
429 unsafe { bindings::usb_put_dev(obj.cast().as_ptr()) } in dec_ref()
H A Dauxiliary.rs65 let adev = unsafe { &*adev.cast::<Device<device::CoreInternal>>() }; in probe_callback()
69 let id = unsafe { &*id.cast::<DeviceId>() }; in probe_callback()
85 let adev = unsafe { &*adev.cast::<Device<device::CoreInternal>>() }; in remove_callback()
245 let _ = unsafe { KBox::<Opaque<bindings::auxiliary_device>>::from_raw(adev.cast()) }; in release()
269 let adev: *mut bindings::auxiliary_device = obj.cast().as_ptr(); in dec_ref()
H A Dpid_namespace.rs39 unsafe { &*ptr.cast() } in from_ptr()
54 unsafe { bindings::put_pid_ns(obj.cast().as_ptr()) } in dec_ref()
H A Dcpufreq.rs145 unsafe { &mut *ptr.cast() } in from_raw_mut()
152 this.cast_mut().cast() in as_raw()
239 unsafe { &*ptr.cast() } in from_raw()
246 this.cast_mut().cast() in as_raw()
429 unsafe { &*ptr.cast() } in from_raw()
444 unsafe { &mut *ptr.cast() } in from_raw_mut()
451 this.cast_mut().cast() in as_raw()
639 Some(unsafe { T::borrow(self.as_ref().driver_data.cast()) }) in data()
651 self.as_mut_ref().driver_data = <T as ForeignOwnable>::into_foreign(data).cast(); in set_data()
666 unsafe { <T as ForeignOwnable>::from_foreign(self.as_ref().driver_data.cast()) }, in clear_data()
/linux/rust/kernel/alloc/
H A Dkbox.rs236 unsafe { Box::from_raw(raw.cast()) } in assume_init()
281 Ok(Box(ptr.cast(), PhantomData)) in new_uninit()
348 let ptr = buffer.spare_capacity_mut().as_mut_ptr().cast(); in pin_slice()
382 unsafe { Box::from_raw(ptr.cast()) } in forget_contents()
497 Box::into_raw(self).cast() in into_foreign()
503 unsafe { Box::from_raw(ptr.cast()) } in from_foreign()
509 unsafe { &*ptr.cast() } in borrow()
513 let ptr = ptr.cast(); in borrow_mut()
532 Box::into_raw(unsafe { Pin::into_inner_unchecked(self) }).cast() in into_foreign()
538 unsafe { Pin::new_unchecked(Box::from_raw(ptr.cast())) } in from_foreign()
[all …]
/linux/scripts/gdb/linux/
H A Dcpus.py48 pointer = var_ptr.cast(utils.get_long_type()) + offset
49 return pointer.cast(var_ptr.type)
190 current_task = current_task_addr.cast(task_ptr_type)
200 current_task = current_tp.cast(task_ptr_type)
206 if (scratch_reg.cast(utils.get_ulong_type()) > current_tp.cast(utils.get_ulong_type())):
207 current_task = scratch_reg.cast(task_ptr_type)
H A Dstackdepot.py33 parts = handle.cast(handle_parts_t)
49 …stack = (pool + gdb.Value(offset).cast(utils.get_size_t_type())).cast(stack_record_type.get_type()…
50 size = int(stack['size'].cast(utils.get_ulong_type()))
82 stack_depot_print(gdb.Value(handle).cast(utils.get_uint_type()))
H A Dpage_owner.py72 if page_ext.cast(utils.get_ulong_type()) & PAGE_EXT_INVALID == PAGE_EXT_INVALID:
77 …return (base.cast(utils.get_ulong_type()) + self.page_ext_size * index).cast(page_ext_t.get_type()…
95 …addr = page_ext.cast(utils.get_ulong_type()) + gdb.parse_and_eval("page_owner_ops")["offset"].cast
96 return addr.cast(page_owner_t.get_type().pointer())
99 page = gdb.Value(struct_page_addr).cast(utils.get_page_type().pointer())
H A Dmapletree.py63 return self.tree['ma_root'].cast(maple_enode_type.get_type().pointer())
114 indirect_ptr = node.cast(ulong_type) & ~0x2
115 val = indirect_ptr.cast(maple_enode_type.get_type().pointer())
122 val = entry.cast(ulong_type)
136 indirect_ptr = node['parent'].cast(ulong_type) & ~constants.LX_MAPLE_NODE_MASK
142 indirect_ptr = enode.cast(ulong_type)
149 return indirect_ptr.cast(maple_node_type.get_type().pointer())
196 return slots[offset].cast(ulong_type)
H A Dxarray.py17 return ((entry.cast(ulong_type) & 3) == 2)
24 return entry.cast(ulong_type) == xa_mk_internal(257)
28 return xa_is_internal(entry) and (entry.cast(ulong_type) > 4096)
H A Drbtree.py27 node = root.address.cast(rb_root_type.get_type().pointer())
43 node = root.address.cast(rb_root_type.get_type().pointer())
59 return parent.cast(rb_node_type.get_type().pointer())
68 node = node.address.cast(rb_node_type.get_type().pointer())
91 node = node.address.cast(rb_node_type.get_type().pointer())
H A Dmm.py107 …self.vmemmap = gdb.Value(self.VMEMMAP_START).cast(utils.get_page_type().pointer()) - (self.memstar…
261 …return int(page.cast(utils.get_page_type().pointer()) - self.vmemmap.cast(utils.get_page_type().po…
267 return (self.vmemmap + pfn).cast(utils.get_page_type().pointer())
273 …__idx = int((page.cast(gdb.lookup_type("unsigned long")) - self.VMEMMAP_START).cast(utils.get_ulon…
282 return gdb.Value(addr).cast(utils.get_page_type().pointer())
313 page = gdb.Value(struct_page_addr).cast(utils.get_page_type().pointer())
328 page = gdb.Value(struct_page_addr).cast(utils.get_page_type().pointer())
343 page = gdb.Value(struct_page_addr).cast(utils.get_page_type().pointer())
/linux/rust/kernel/fs/
H A Dfile.rs211 unsafe { bindings::fput(obj.cast().as_ptr()) } in dec_ref()
248 unsafe { bindings::fput(obj.cast().as_ptr()) } in dec_ref()
271 Ok(unsafe { ARef::from_raw(ptr.cast()) }) in fget()
288 unsafe { &*ptr.cast() } in from_raw_file()
312 unsafe { ARef::from_raw(ARef::into_raw(me).cast()) } in assume_no_fdget_pos()
362 unsafe { &*ptr.cast() } in from_raw_file()
376 unsafe { LocalFile::from_raw_file(core::ptr::from_ref(self).cast()) } in deref()
/linux/drivers/ata/
H A Dpata_cs5536.c167 u32 cast; in cs5536_set_piomode() local
174 cs5536_read(pdev, CAST, &cast); in cs5536_set_piomode()
176 cast &= ~(IDE_CAST_DRV_MASK << cshift); in cs5536_set_piomode()
177 cast |= addr_timings[mode] << cshift; in cs5536_set_piomode()
179 cast &= ~(IDE_CAST_CMD_MASK << IDE_CAST_CMD_SHIFT); in cs5536_set_piomode()
180 cast |= cmd_timings[cmdmode] << IDE_CAST_CMD_SHIFT; in cs5536_set_piomode()
182 cs5536_write(pdev, CAST, cast); in cs5536_set_piomode()
/linux/rust/kernel/sync/atomic/
H A Dinternal.rs207 unsafe { bindings::#call(a.as_ptr().cast()) }
213 unsafe { bindings::#call(a.as_ptr().cast(), v) }
226 unsafe { bindings::#call(a.as_ptr().cast(), v) }
240 unsafe { bindings::#call(a.as_ptr().cast(), core::ptr::from_mut(old), new) }
253 unsafe { bindings::#call(v, a.as_ptr().cast()) }
262 unsafe { bindings::#call(v, a.as_ptr().cast()) }
/linux/rust/kernel/debugfs/
H A Dfile_ops.rs109 let data = unsafe { &*((*seq).private.cast::<T>()) }; in writer_act()
163 let seq = unsafe { &mut *((*file).private_data.cast::<bindings::seq_file>()) }; in write()
259 let this = unsafe { &*((*file).private_data.cast::<T>()) }; in blob_read()
266 let mut writer = UserSlice::new(UserPtr::from_ptr(buf.cast()), count).writer(); in blob_read()
314 let this = unsafe { &*((*file).private_data.cast::<T>()) }; in blob_write()
321 let mut reader = UserSlice::new(UserPtr::from_ptr(buf.cast_mut().cast()), count).reader(); in blob_write()
/linux/drivers/scsi/fcoe/
H A Dfcoe_sysfs.c133 #define fcoe_ctlr_show_function(field, format_string, sz, cast) \ argument
142 cast fcoe_ctlr_##field(ctlr)); \
145 #define fcoe_fcf_show_function(field, format_string, sz, cast) \ argument
155 cast fcoe_fcf_##field(fcf)); \
158 #define fcoe_ctlr_private_show_function(field, format_string, sz, cast) \ argument
164 return snprintf(buf, sz, format_string, cast fcoe_ctlr_##field(ctlr)); \
167 #define fcoe_fcf_private_show_function(field, format_string, sz, cast) \ argument
173 return snprintf(buf, sz, format_string, cast fcoe_fcf_##field(fcf)); \
196 #define fcoe_ctlr_private_rd_attr_cast(field, format_string, sz, cast) \ argument
197 fcoe_ctlr_private_show_function(field, format_string, sz, (cast)) \
[all …]

12345