Lines Matching full:safety

46 // SAFETY:
57 // SAFETY: A call to `unregister` for a given instance of `DriverType` is guaranteed to be valid if
75 // SAFETY: It's safe to set the fields of `struct platform_driver` on initialization. in register()
84 // SAFETY: `pdrv` is guaranteed to be a valid `DriverType`. in register()
89 // SAFETY: `pdrv` is guaranteed to be a valid `DriverType`. in unregister()
96 // SAFETY: The platform bus only ever calls the probe callback with a valid pointer to a in probe_callback()
112 // SAFETY: The platform bus only ever calls the remove callback with a valid pointer to a in remove_callback()
118 // SAFETY: `remove_callback` is only ever called after a successful call to in remove_callback()
268 // SAFETY: `self.as_raw()` returns a valid pointer to a `struct platform_device`. in resource_by_index()
277 // SAFETY: `resource` is a valid pointer to a `struct resource` as in resource_by_index()
284 // SAFETY: `self.as_raw()` returns a valid pointer to a `struct in resource_by_name()
298 // SAFETY: `resource` is a valid pointer to a `struct resource` as in resource_by_name()
308 // SAFETY: `resource` is a valid resource for `&self` during the in io_request_by_index()
316 // SAFETY: `resource` is a valid resource for `&self` during the in io_request_by_name()
322 // SAFETY: `platform::Device` is a transparent wrapper of `struct platform_device`.
389 // SAFETY: `self.as_raw` returns a valid pointer to a `struct platform_device`. in irq_by_index()
396 // SAFETY: `irq` is guaranteed to be a valid IRQ number for `&self`. in irq_by_index()
403 // SAFETY: `self.as_raw` returns a valid pointer to a `struct platform_device`. in optional_irq_by_index()
410 // SAFETY: `irq` is guaranteed to be a valid IRQ number for `&self`. in optional_irq_by_index()
416 // SAFETY: `self.as_raw` returns a valid pointer to a `struct platform_device`. in irq_by_name()
423 // SAFETY: `irq` is guaranteed to be a valid IRQ number for `&self`. in irq_by_name()
430 // SAFETY: `self.as_raw` returns a valid pointer to a `struct platform_device`. in optional_irq_by_name()
439 // SAFETY: `irq` is guaranteed to be a valid IRQ number for `&self`. in optional_irq_by_name()
507 // SAFETY: `Device` is a transparent wrapper of a type that doesn't depend on `Device`'s generic
514 // SAFETY: Instances of `Device` are always reference-counted.
517 // SAFETY: The existence of a shared reference guarantees that the refcount is non-zero. in inc_ref()
522 // SAFETY: The safety requirements guarantee that the refcount is non-zero. in dec_ref()
529 // SAFETY: By the type invariant of `Self`, `self.as_raw()` is a pointer to a valid in as_ref()
533 // SAFETY: `dev` points to a valid `struct device`. in as_ref()
542 // SAFETY: By the type invariant of `Device`, `dev.as_raw()` is a valid pointer to a in try_from()
548 // SAFETY: We've just verified that the bus type of `dev` equals in try_from()
553 // SAFETY: `pdev` is a valid pointer to a `struct platform_device`. in try_from()
558 // SAFETY: A `Device` is always reference-counted and can be released from any thread.
561 // SAFETY: `Device` can be shared among threads because all methods of `Device`