Home
last modified time | relevance | path

Searched refs:checked_add (Results 1 – 10 of 10) sorted by relevance

/linux/rust/kernel/
H A Dptr.rs224 .and_then(|align| aligned_down.checked_add(align))
291 match value.checked_add(align.as_usize() - 1) {
H A Duaccess.rs535 if offset.checked_add(count).ok_or(EOVERFLOW)? > len { in write_dma()
H A Dmaple_tree.rs59 Bound::Excluded(start) => start.checked_add(1)?, in to_maple_range()
H A Dio.rs182 if let Some(end) = offset.checked_add(size_of::<U>()) { in offset_valid()
/linux/rust/proc-macro2/
H A Dfallback.rs1150 self.span.lo.checked_add(start)? in subspan()
1154 self.span.lo.checked_add(start)?.checked_add(1)? in subspan()
1161 self.span.lo.checked_add(end)?.checked_add(1)? in subspan()
1165 self.span.lo.checked_add(end)? in subspan()
/linux/rust/zerocopy/src/
H A Dlayout.rs401 let offset = match preceding_size.checked_add(padding) { in extend()
421 let size = match offset.checked_add(field_size) { in extend()
443 let offset = match offset.checked_add(trailing_offset) { in extend()
500 let size = match unpadded_size.checked_add(padding) { in pad_to_align()
642 addr.checked_add(bytes_len).is_some(), in validate_cast_and_convert_metadata()
2032 let Some(unpadded_size) = size_info.offset.checked_add(trailing_slice_size) else { in prove_requires_dynamic_padding()
H A Dbyteorder.rs1069 fn checked_add(self, rhs: Self) -> Option<Self>; in checked_add() method
1208 fn checked_add(self, rhs: Self) -> Option<Self> { self.checked_add(rhs) }
1218 fn checked_add(self, rhs: Self) -> Option<Self> { Some(self + rhs) }
1540 test!(@binary Add, add[checked_add], AddAssign, add_assign, call_for_all_types); in test_ops_impls()
H A Dlib.rs1009 let without_padding = offset.checked_add(slice_len)?; in size_for_metadata()
1010 without_padding.checked_add(util::padding_needed_for(without_padding, layout.align)) in size_for_metadata()
/linux/rust/zerocopy/src/util/
H A Dmod.rs233 m.checked_add(align.get()).map(|next_mul| next_mul > n).unwrap_or(true)
763 match self.checked_add(rhs) { in unchecked_add()
/linux/rust/kernel/alloc/
H A Dkvec.rs690 let new_cap = core::cmp::max(cap * 2, len.checked_add(additional).ok_or(AllocError)?); in truncate()