Lines Matching full:safety
62 // SAFETY:
73 // SAFETY: A call to `unregister` for a given instance of `DriverType` is guaranteed to be valid if
81 // SAFETY: It's safe to set the fields of `struct pci_driver` on initialization.
89 // SAFETY: `pdrv` is guaranteed to be a valid `DriverType`.
96 // SAFETY: `pdrv` is guaranteed to be a valid `DriverType`.
106 // SAFETY: The PCI bus only ever calls the probe callback with a valid pointer to a
112 // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `struct pci_device_id` and
116 // SAFETY: `id` comes from `T::ID_TABLE` which is of type `IdArray<_, T::IdInfo>` or
130 // SAFETY: The PCI bus only ever calls the remove callback with a valid pointer to a
136 // SAFETY: `remove_callback` is only ever called after a successful call to
233 // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `pci_device_id` and does not add
239 // SAFETY: `DRIVER_DATA_OFFSET` is the offset to the `driver_data` field.
373 // SAFETY: `self.as_raw` is a valid pointer to a `struct pci_dev`.
381 // SAFETY: By its type invariant `self.as_raw` is always a valid pointer to a
389 // SAFETY: By its type invariant `self.as_raw` is always a valid pointer to a
397 // SAFETY: By its type invariant `self.as_raw` is always a valid pointer to a
405 // SAFETY: By its type invariant `self.as_raw` is always a valid pointer to a
413 // SAFETY: By its type invariant `self.as_raw` is always a valid pointer to a
424 // SAFETY:
436 // SAFETY:
445 // SAFETY: `self.as_raw` is a valid pointer to a `struct pci_dev`.
454 // SAFETY: `self.as_raw()` is a valid pointer to a `struct pci_dev`.
465 // SAFETY: `self.as_raw` is guaranteed to be a pointer to a valid `struct pci_dev`.
472 // SAFETY: `self.as_raw` is guaranteed to be a pointer to a valid `struct pci_dev`.
477 // SAFETY: `pci::Device` is a transparent wrapper of `struct pci_dev`.
483 // SAFETY: `Device` is a transparent wrapper of a type that doesn't depend on `Device`'s generic
490 // SAFETY: Instances of `Device` are always reference-counted.
494 // SAFETY: The existence of a shared reference guarantees that the refcount is non-zero.
500 // SAFETY: The safety requirements guarantee that the refcount is non-zero.
507 // SAFETY: By the type invariant of `Self`, `self.as_raw()` is a pointer to a valid
511 // SAFETY: `dev` points to a valid `struct device`.
520 // SAFETY: By the type invariant of `Device`, `dev.as_raw()` is a valid pointer to a
526 // SAFETY: We've just verified that the bus type of `dev` equals `bindings::pci_bus_type`,
531 // SAFETY: `pdev` is a valid pointer to a `struct pci_dev`.
536 // SAFETY: A `Device` is always reference-counted and can be released from any thread.
539 // SAFETY: `Device` can be shared among threads because all methods of `Device`
543 // SAFETY: Same as `Device<Normal>` -- the underlying `struct pci_dev` is the same;
544 // `Bound` is a zero-sized type-state marker that does not affect thread safety.