Lines Matching full:safety
26 // SAFETY: A call to `unregister` for a given instance of `RegType` is guaranteed to be valid if
41 // SAFETY: It's safe to set the fields of `struct platform_driver` on initialization. in register()
49 // SAFETY: `pdrv` is guaranteed to be a valid `RegType`. in register()
54 // SAFETY: `pdrv` is guaranteed to be a valid `RegType`. in unregister()
61 // SAFETY: The platform bus only ever calls the probe callback with a valid pointer to a in probe_callback()
71 // SAFETY: By the type invariant `pdev.as_raw` returns a valid pointer to a in probe_callback()
82 // SAFETY: `pdev` is a valid pointer to a `struct platform_device`. in remove_callback()
85 // SAFETY: `remove_callback` is only ever called after a successful call to in remove_callback()
202 // SAFETY: `ptr` was derived from `&self`. in deref()
213 // SAFETY: Instances of `Device` are always reference-counted.
216 // SAFETY: The existence of a shared reference guarantees that the refcount is non-zero. in inc_ref()
221 // SAFETY: The safety requirements guarantee that the refcount is non-zero. in dec_ref()
228 // SAFETY: By the type invariant of `Self`, `self.as_raw()` is a pointer to a valid in as_ref()
232 // SAFETY: `dev` points to a valid `struct device`. in as_ref()
237 // SAFETY: A `Device` is always reference-counted and can be released from any thread.
240 // SAFETY: `Device` can be shared among threads because all methods of `Device`