Home
last modified time | relevance | path

Searched refs:ty (Results 1 – 25 of 80) sorted by relevance

1234

/linux/rust/kernel/
H A Dbits.rs13 $ty:ty
21 pub fn [<checked_bit_ $ty>](n: u32) -> Option<$ty> {
22 (1 as $ty).checked_shl(n)
32 pub const fn [<bit_ $ty>](n: u32) -> $ty {
33 build_assert!(n < <$ty>::BITS);
34 (1 as $ty) << n
47 $ty:ty,
60 pub fn [<genmask_checked_ $ty>](range: RangeInclusive<u32>) -> Option<$ty> {
68 let high = [<checked_bit_ $ty>](end)?;
69 let low = [<checked_bit_ $ty>](start)?;
[all …]
H A Dinit.rs
H A Dmodule_param.rs88 ($ty:ident) => {
89 impl ModuleParam for $ty {
91 <$ty as crate::str::parse_int::ParseInt>::from_str(arg)
183 ($ops:ident, $ty:ty) => {
187 set: Some(set_param::<$ty>),
H A Dconfigfs.rs743 ($tpe:ty) => {
889 container: $container:ty,
890 data: $data:ty,
908 container: $container:ty,
909 data: $data:ty,
910 child: $child:ty,
928 @container($container:ty),
929 @data($data:ty),
930 @child($($child:ty)?),
965 @container($container:ty),
[all...]
H A Dbitfield.rs295 $(#[$attr:meta])* $vis:vis struct $name:ident($storage:ty) { $($fields:tt)* }
307 (@core $(#[$attr:meta])* $vis:vis $name:ident $storage:ty) => {
353 (@fields $vis:vis $name:ident $storage:ty {
355 $(?=> $try_into_type:ty)?
356 $(=> $into_type:ty)?
378 @private_field_accessors $vis:vis $name:ident $storage:ty : $hi:tt:$lo:tt $field:ident
423 @public_field_accessors $(#[doc = $doc:expr])* $vis:vis $name:ident $storage:ty :
424 $hi:literal:$lo:literal $field:ident => $into_type:ty
449 @public_field_accessors $(#[doc = $doc:expr])* $vis:vis $name:ident $storage:ty :
450 $hi:tt:$lo:tt $field:ident ?=> $try_into_type:ty
[all …]
H A Dfmt.rs181 $( { $($generics:tt)* } )? $ty:ty $( { where $($where:tt)* } )?
184 impl$($($generics)*)? Display for $ty $(where $($where)*)? {
/linux/rust/zerocopy/src/util/
H A Dmacros.rs26 ($(#[$attr:meta])* $ty:ty: $trait:ident $(; |$candidate:ident| $is_bit_valid:expr)?) => {{
31 unsafe impl $trait for $ty {
54 ($(#[$attrs:meta])* $ty:ty: $($traits:ident),*) => {
55 unsafe_impl!(@impl_traits_with_packed_attrs { $(#[$attrs])* } $ty: $($traits),*)
58 (@impl_traits_with_packed_attrs $attrs:tt $ty:ty: $($traits:ident),*) => {{
59 $( unsafe_impl!(@unpack_attrs $attrs $ty: $traits); )*
62 (@unpack_attrs { $(#[$attrs:meta])* } $ty:ty: $traits:ident) => {
63 unsafe_impl!($(#[$attrs])* $ty: $traits);
95 => $trait:ident for $ty:ty $(; |$candidate:ident| $is_bit_valid:expr)?
102 => $trait for $ty $(; |$candidate| $is_bit_valid)?
[all …]
H A Dmacro_util.rs137 ($ty:ty, $trailing_field_name:tt) => {{
161 zero_elems as *const $ty,
169 let ptr = ALIGNED_64K_ALLOCATION.as_ptr() as *const $ty;
235 ($ty:ty) => {{
259 _trailing: $ty,
334 ($t:ty, $_align:expr, $_packed:expr, [$($ts:ty),*]) => {{
350 ($t:ty, $align:expr, $packed:expr, [$($ts:tt),*]) => {{
358 (@field ([$t:ty])) => {
361 (@field ($t:ty)) => {
364 (@field [$t:ty]) => {
[all …]
/linux/drivers/media/radio/
H A Dradio-typhoon.c78 struct typhoon *ty = kzalloc_obj(*ty); in typhoon_alloc() local
80 return ty ? &ty->isa : NULL; in typhoon_alloc()
113 struct typhoon *ty = container_of(isa, struct typhoon, isa); in typhoon_s_mute_volume() local
122 if (vol == 0 && !ty->muted) { in typhoon_s_mute_volume()
123 ty->muted = true; in typhoon_s_mute_volume()
126 if (vol && ty->muted) { in typhoon_s_mute_volume()
127 ty->muted = false; in typhoon_s_mute_volume()
/linux/rust/kernel/str/
H A Dparse_int.rs106 ($($ty:ty),*) => {
108 impl private::FromStrRadix for $ty {
110 <$ty>::from_str_radix(core::str::from_utf8(src).map_err(|_| EINVAL)?, radix)
117 if <$ty>::MIN < 0 {
118 1u64 << (<$ty>::BITS - 1)
129 return Ok(<$ty>::MIN);
143 impl ParseInt for $ty {}
/linux/rust/syn/
H A Dclassify.rs12 use crate::ty::{ReturnType, Type};
73 pub(crate) fn trailing_unparameterized_path(mut ty: &Type) -> bool { in trailing_unparameterized_path()
75 match ty { in trailing_unparameterized_path()
78 ReturnType::Type(_, ret) => ty = ret, in trailing_unparameterized_path()
82 ControlFlow::Continue(t) => ty = t, in trailing_unparameterized_path()
86 ControlFlow::Continue(t) => ty = t, in trailing_unparameterized_path()
88 Type::Ptr(t) => ty = &t.elem, in trailing_unparameterized_path()
89 Type::Reference(t) => ty = &t.elem, in trailing_unparameterized_path()
92 ControlFlow::Continue(t) => ty = t, in trailing_unparameterized_path()
207 Expr::Cast(e) => return type_trailing_brace(&e.ty), in expr_trailing_brace()
[all …]
H A Ditem.rs17 use crate::ty::{Abi, ReturnType, Type};
113 pub ty: Box<Type>,
226 pub ty: Box<Type>,
291 pub ty: Box<Type>,
565 pub ty: Box<Type>,
648 pub ty: Type,
747 pub ty: Type,
777 pub ty: Type,
849 pub ty: Box<Type>,
935 use crate::ty::{Abi, ReturnType, Type, TypePath, TypeReference};
[all …]
H A Dty.rs247 pub ty: Type,
289 use crate::ty::{
330 if let Type::Path(mut ty) = *group.elem { in ambig_ty()
331 Path::parse_rest(input, &mut ty.path, false)?; in ambig_ty()
332 return Ok(Type::Path(ty)); in ambig_ty()
340 ty: group.elem, in ambig_ty()
348 if let Type::Path(mut ty) = *group.elem { in ambig_ty()
349 let arguments = &mut ty.path.segments.last_mut().unwrap().arguments; in ambig_ty()
352 Path::parse_rest(input, &mut ty.path, false)?; in ambig_ty()
353 return Ok(Type::Path(ty)); in ambig_ty()
[all …]
H A Dparse_macro_input.rs111 ($tokenstream:ident as $ty:ty) => {
112 match $crate::parse::<$ty>($tokenstream) {
H A Dpath.rs11 use crate::ty::{ReturnType, Type};
218 pub ty: Type,
278 pub ty: Box<Type>,
306 use crate::ty::{ReturnType, Type};
331 Type::Path(mut ty) in parse()
332 if ty.qself.is_none() in parse()
333 && ty.path.leading_colon.is_none() in parse()
334 && ty.path.segments.len() == 1 in parse()
335 && match &ty.path.segments[0].arguments { in parse()
341 let segment = ty.path.segments.pop().unwrap().into_value(); in parse()
[all …]
H A Ddata.rs9 use crate::ty::Type;
200 pub ty: Type,
218 let span = crate::spanned::Spanned::span(&field.ty); in next()
256 use crate::ty::Type;
339 let ty: Type = if unnamed_field in parse_named() localVariable
357 ty, in parse_named()
370 ty: input.parse()?, in parse_unnamed()
423 self.ty.to_tokens(tokens); in to_tokens()
/linux/rust/kernel/sync/atomic/
H A Dinternal.rs106 $func:ident($($arg:ident : $arg_type:ty),*) $(-> $ret:ty)?
115 $func:ident [$variant:ident $($rest:ident)*]($($arg_sig:tt)*) $(-> $ret:ty)?
131 $func:ident []($($arg_sig:tt)*) $(-> $ret:ty)?
144 ($ctype:ident) $func:ident($($arg:ident: $arg_type:ty),*) $(-> $ret:ty)? {
164 ($ctype:ident) $func:ident[$variant:ident $($rest:ident)*]($($arg_sig:tt)*) $(-> $ret:ty)? {
182 ($ctype:ident) $func:ident[]($($arg_sig:tt)*) $( -> $ret:ty)? {
199 fn $func:ident [$($variant:ident),*]($($arg_sig:tt)*) $( -> $ret:ty)? {
219 $ty
[all...]
/linux/rust/zerocopy/src/
H A Dimpls.rs183 ($($nonzero:ident[$prim:ty]),*) => {
403 ($($atomics:tt [$primitives:ty]),* $(,)?) => {
421 ($($($tyvar:ident)? => $atomic:ty [$prim:ty]),*) => {{
1426 ($($tys:ty),*) => { in test_impls()
1451 …($ty:ty $(,$tys:ty)* => @success $($success_case:expr),* $(, @failure $($failure_case:expr),*)?) =… in test_impls()
1452 impl TryFromBytesTestable for $ty { in test_impls()
1461 …($($($ty:ty),* => @success $($success_case:expr), * $(, @failure $($failure_case:expr),*)?;)*) => { in test_impls()
1463 …impl_try_from_bytes_testable!($($ty),* => @success $($success_case),* $(, @failure $($failure_case… in test_impls()
1670 ($fn_name:ident($ty:ty) $(: $($tys:ty),*)?) => {{ in test_impls()
1676 let id = TypeId::of::<$ty>(); in test_impls()
[all …]
/linux/lib/crypto/
H A Darc4.c42 u32 ty, ta, tb; in arc4_crypt() local
60 ty = (y + ta) & 0xff; in arc4_crypt()
61 tb = S[ty]; in arc4_crypt()
65 y = ty; in arc4_crypt()
/linux/rust/
H A Dffi.rs14 ($($name:ident = $ty:ty;)*) => {$(
16 pub type $name = $ty;
/linux/rust/kernel/list/
H A Dimpl_list_item_mod.rs36 for $self:ty
81 HasSelfPtr<$item_type:ty $(, $id:tt)?>
82 for $self:ty
189 $(impl$({$($generics:tt)*})? ListItem<$num:tt> for $self:ty {
255 $(impl$({$($generics:tt)*})? ListItem<$num:tt> for $self:ty {
/linux/rust/kernel/pci/
H A Dio.rs114 /// Implements [`IoCapable`] on [`ConfigSpace`] for `$ty` using `$read_fn` and `$write_fn`.
116 ($ty:ty, $read_fn:ident, $write_fn:ident) => {
117 impl IoCapable<$ty> for ConfigSpaceBackend {
118 fn io_read(view: ConfigSpace<'_, $ty>) -> $ty {
124 let mut val: $ty = 0;
132 fn io_write(view: ConfigSpace<'_, $ty>, value: $ty) { in maxsize()
/linux/rust/pin-init/src/
H A Dlib.rs490 (let $var:ident $(: $t:ty)? = $val:expr) => {
566 (let $var:ident $(: $t:ty)? = $val:expr) => {
571 (let $var:ident $(: $t:ty)? =? $val:expr) => {
863 ($ty:ty, $field:ident, $field_ty:ty, inline) => {
865 let _ = move |ptr: *mut $ty| unsafe {
866 let data = <$ty as $crate::__internal::HasPinData>::__pin_data();
873 ($ty:ty,
[all...]
/linux/rust/zerocopy/src/pointer/
H A Dptr.rs1475 ($test_name:ident: $ty:ty) => {
1479 const S: usize = core::mem::size_of::<$ty>();
1481 test::<$ty, _, N>([None]);
1487 test::<[$ty], _, N>([Some(0), Some(1), Some(2), Some(3)]);
1488 test::<SliceDst<$ty>, _, N>([Some(0), Some(1), Some(2), Some(3)]);
1490 test::<[$ty], _, N>([None, Some(0), Some(1), Some(2), Some(3)]);
1491 test::<SliceDst<$ty>, _, N>([None, Some(0), Some(1), Some(2), Some(3)]);
1495 ($ty:ident) => {
1496 test!($ty: $ty);
1498 ($($ty:ident),*) => { $(test!($ty);)* }
[all …]
/linux/drivers/gpu/drm/nouveau/include/nvhw/
H A Ddrf.h140 #define DRF_MR_X(er,ew,ty,p,o,dr,m,v) ({ \ argument
141 ty _t = DRF_RD_X(er, (p), (o), dr); \
145 #define DRF_MR_N(X,er,ew,ty,p,o,d,r ,m,v) DRF_MR_X(er, ew, ty, (p), (o), d##_##r , (m), (v)) argument
146 #define DRF_MR_I(X,er,ew,ty,p,o,d,r,i,m,v) DRF_MR_X(er, ew, ty, (p), (o), d##_##r(i), (m), (v)) argument
174 #define DRF_MV_N(X,er,ew,ty,p,o,d,r, f,v) \ argument
175 NVVAL_GET_X(DRF_MR_X(er, ew, ty, (p), (o), d##_##r , DRF_SMASK(d##_##r##_##f), \
177 #define DRF_MV_I(X,er,ew,ty,p,o,d,r,i,f,v) \ argument
178 NVVAL_GET_X(DRF_MR_X(er, ew, ty, (p), (o), d##_##r(i), DRF_SMASK(d##_##r##_##f), \
184 #define DRF_MD_N(X,er,ew,ty,p,o,d,r, f,v) \ argument
185 NVVAL_GET_X(DRF_MR_X(er, ew, ty, (p), (o), d##_##r , DRF_SMASK(d##_##r##_##f), \
[all …]

1234