Lines Matching full:safety
93 /// // SAFETY: `Device` is a transparent wrapper of a type that doesn't depend on `Device`'s
172 /// # Safety
181 // SAFETY: By the safety requirements ptr is valid in get_device()
187 /// # Safety
194 // CAST: By the safety requirements the caller is responsible to guarantee that the in as_bound()
198 // SAFETY: in as_bound()
210 // SAFETY: By the type invariants, `self.as_raw()` is a valid pointer to a `struct device`. in set_drvdata()
218 /// # Safety
223 // SAFETY: By the type invariants, `self.as_raw()` is a valid pointer to a `struct device`. in drvdata_obtain()
226 // SAFETY: By the type invariants, `self.as_raw()` is a valid pointer to a `struct device`. in drvdata_obtain()
233 // SAFETY: in drvdata_obtain()
244 /// # Safety
251 // SAFETY: By the type invariants, `self.as_raw()` is a valid pointer to a `struct device`. in drvdata_borrow()
254 // SAFETY: in drvdata_borrow()
255 // - By the safety requirements of this function, `ptr` comes from a previous call to in drvdata_borrow()
272 // SAFETY: in parent()
280 // SAFETY: in parent()
290 /// # Safety
297 // SAFETY: Guaranteed by the safety requirements of the function. in from_raw()
307 // SAFETY: `klevel` is null-terminated, uses one of the kernel constants. in pr_emerg()
317 // SAFETY: `klevel` is null-terminated, uses one of the kernel constants. in pr_alert()
327 // SAFETY: `klevel` is null-terminated, uses one of the kernel constants. in pr_crit()
337 // SAFETY: `klevel` is null-terminated, uses one of the kernel constants. in pr_err()
347 // SAFETY: `klevel` is null-terminated, uses one of the kernel constants. in pr_warn()
357 // SAFETY: `klevel` is null-terminated, uses one of the kernel constants. in pr_notice()
367 // SAFETY: `klevel` is null-terminated, uses one of the kernel constants. in pr_info()
378 // SAFETY: `klevel` is null-terminated, uses one of the kernel constants. in pr_dbg()
385 /// # Safety
391 // SAFETY: `klevel` is null-terminated and one of the kernel constants. `self.as_raw` in printk()
407 // SAFETY: `self` is valid. in fwnode()
412 // SAFETY: `fwnode_handle` is valid. Its lifetime is tied to `&self`. We in fwnode()
426 // SAFETY: By its type invariant `self.as_raw()` is a valid pointer to a `struct device`. in name()
432 // SAFETY: `Device` is a transparent wrapper of a type that doesn't depend on `Device`'s generic
437 // SAFETY: Instances of `Device` are always reference-counted.
440 // SAFETY: The existence of a shared reference guarantees that the refcount is non-zero. in inc_ref()
445 // SAFETY: The safety requirements guarantee that the refcount is non-zero. in dec_ref()
450 // SAFETY: As by the type invariant `Device` can be sent to any thread.
453 // SAFETY: `Device` can be shared among threads because all immutable methods are protected by the
457 // SAFETY: Same as `Device<Normal>` -- the underlying `struct device` is the same; `Bound` is a
458 // zero-sized type-state marker that does not affect thread safety.
596 /// # Safety
608 /// # Safety
616 // SAFETY: `raw - Self::OFFSET` is guaranteed by the safety requirements in from_device()
622 /// # Safety
637 // safety requirement of the macro.
640 // SAFETY: `ptr` was derived from `&self`.
653 // safety requirement of the macro.
656 // SAFETY: `ptr` was derived from `&self`.
666 /// # Safety
673 // SAFETY: This macro has the exact same safety requirement as
680 // SAFETY: This macro has the exact same safety requirement as
687 // SAFETY: This macro has the exact same safety requirement as
694 // SAFETY: This macro has the exact same safety requirement as