Home
last modified time | relevance | path

Searched refs:to_bytes (Results 1 – 18 of 18) sorted by relevance

/linux/drivers/android/binder/
H A Dstats.rs75 let bytes = unsafe { CStr::from_char_ptr(c_str_ptr) }.to_bytes(); in command_string()
84 let bytes = unsafe { CStr::from_char_ptr(c_str_ptr) }.to_bytes(); in return_string()
/linux/drivers/md/
H A Ddm-ebs-target.c72 unsigned int buf_off = to_bytes(__block_mod(iter->bi_sector, ec->u_bs)); in __ebs_rw_bvec()
276 to_bytes(tmp1) > PAGE_SIZE) { in ebs_ctr()
316 ec->bufio = dm_bufio_client_create(ec->dev->bdev, to_bytes(ec->u_bs), 1, in ebs_ctr()
434 limits->logical_block_size = to_bytes(ec->e_bs); in ebs_io_hints()
435 limits->physical_block_size = to_bytes(ec->u_bs); in ebs_io_hints()
H A Ddm-stripe.c263 bio->bi_iter.bi_size = to_bytes(end - begin); in stripe_map_range()
H A Ddm-clone-target.c452 bio->bi_iter.bi_size = to_bytes(len); in trim_bio()
H A Ddm.c651 clone->bi_iter.bi_size = to_bytes(*len); in alloc_tio()
/linux/scripts/crypto/
H A Dgen-hash-testvecs.py69 return m.to_bytes(16, byteorder='little')
92 return Ghash.reflect_bits_in_bytes(poly).to_bytes(16, byteorder='little')
144 return self.acc.to_bytes(16, byteorder='little')
282 h += (p % 2**64).to_bytes(8, byteorder='little')
/linux/samples/rust/
H A Drust_debugfs_scoped.rs50 .retain(|device| device.name.to_bytes() != to_remove.to_bytes()); in create_file_write()
/linux/rust/kernel/
H A Dstr.rs82 /// assert_eq!(s.to_bytes(), "Hello, BStr!".as_bytes()); in fmt()
86 /// assert_eq!(s.to_bytes(), "\\xf0\\x9f\\xa6\\x80".as_bytes()); in fmt()
114 /// assert_eq!(s.to_bytes(), "\"Hello, \\\"BStr\\\"!\"".as_bytes()); in fmt()
118 /// assert_eq!(s.to_bytes(), "\"\\xf0\\x9f\\x98\\xba\"".as_bytes()); in fmt()
309 for &c in self.to_bytes() {
391 BStr::from_bytes(self.to_bytes())
H A Derror.rs312 unsafe { core::str::from_utf8_unchecked(name.to_bytes()) },
/linux/tools/testing/selftests/drivers/net/lib/py/
H A Denv.py586 ifindex_bytes = self.nk_host_ifindex.to_bytes(4, byteorder='little')
620 phys_ifindex_bytes = self.ifindex.to_bytes(4, byteorder=sys.byteorder)
/linux/rust/zerocopy/src/
H A Dref.rs1044 assert_eq!(Ref::bytes(&r), &VAL1.to_bytes()); in test_new_helper()
1047 assert_eq!(Ref::bytes(&r), &VAL1.to_bytes()); in test_new_helper()
1052 Ref::bytes_mut(&mut r).copy_from_slice(&VAL2.to_bytes()[..]); in test_new_helper()
H A Dbyteorder.rs578 pub const fn to_bytes(self) -> [u8; $bytes] {
1321 const _BYTES: [u8; 2] = _FROM_BYTES.to_bytes(); in test_const_methods()
/linux/tools/perf/scripts/python/
H A Dintel-pt-events.py144 s = payload.to_bytes(8, "little").decode("ascii").rstrip("\x00")
/linux/rust/zerocopy/src/util/
H A Dmod.rs876 pub(crate) fn to_bytes(self) -> [u8; 8] { in to_bytes() method
/linux/tools/testing/selftests/net/openvswitch/
H A Dovs-dpctl.py180 def to_bytes(mac): function
192 return to_bytes(mac_str), to_bytes(mask_str)
/linux/drivers/gpu/drm/
H A Ddrm_panic_qr.rs971 &Segment::Binary(url_cstr.to_bytes()), in drm_panic_qr_generate()
/linux/tools/testing/selftests/drivers/net/
H A Dpsp.py476 tx['key'] = (tx['key'][0] ^ 0xff).to_bytes(1, 'little') + tx['key'][1:]
/linux/rust/proc-macro2/
H A Dfallback.rs1102 let mut bytes = string.to_bytes(); in c_string()