Lines Matching full:safety

60 // SAFETY:
71 // SAFETY: A call to `unregister` for a given instance of `DriverType` is guaranteed to be valid if
79 // SAFETY: It's safe to set the fields of `struct pci_driver` on initialization. in register()
87 // SAFETY: `pdrv` is guaranteed to be a valid `DriverType`. in register()
94 // SAFETY: `pdrv` is guaranteed to be a valid `DriverType`. in unregister()
104 // SAFETY: The PCI bus only ever calls the probe callback with a valid pointer to a in probe_callback()
110 // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `struct pci_device_id` and in probe_callback()
124 // SAFETY: The PCI bus only ever calls the remove callback with a valid pointer to a in remove_callback()
130 // SAFETY: `remove_callback` is only ever called after a successful call to in remove_callback()
227 // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `pci_device_id` and does not add
233 // SAFETY: `DRIVER_DATA_OFFSET` is the offset to the `driver_data` field.
371 // SAFETY: `self.as_raw` is a valid pointer to a `struct pci_dev`. in vendor_id()
379 // SAFETY: By its type invariant `self.as_raw` is always a valid pointer to a in device_id()
387 // SAFETY: By its type invariant `self.as_raw` is always a valid pointer to a in revision_id()
395 // SAFETY: By its type invariant `self.as_raw` is always a valid pointer to a in dev_id()
403 // SAFETY: By its type invariant `self.as_raw` is always a valid pointer to a in subsystem_vendor_id()
411 // SAFETY: By its type invariant `self.as_raw` is always a valid pointer to a in subsystem_device_id()
422 // SAFETY: in resource_start()
434 // SAFETY: in resource_len()
443 // SAFETY: `self.as_raw` is a valid pointer to a `struct pci_dev`. in pci_class()
451 // SAFETY: `self.as_raw` is guaranteed to be a pointer to a valid `struct pci_dev`. in enable_device_mem()
458 // SAFETY: `self.as_raw` is guaranteed to be a pointer to a valid `struct pci_dev`. in set_master()
463 // SAFETY: `pci::Device` is a transparent wrapper of `struct pci_dev`.
469 // SAFETY: `Device` is a transparent wrapper of a type that doesn't depend on `Device`'s generic
476 // SAFETY: Instances of `Device` are always reference-counted.
479 // SAFETY: The existence of a shared reference guarantees that the refcount is non-zero. in inc_ref()
484 // SAFETY: The safety requirements guarantee that the refcount is non-zero. in dec_ref()
491 // SAFETY: By the type invariant of `Self`, `self.as_raw()` is a pointer to a valid in as_ref()
495 // SAFETY: `dev` points to a valid `struct device`. in as_ref()
504 // SAFETY: By the type invariant of `Device`, `dev.as_raw()` is a valid pointer to a in try_from()
510 // SAFETY: We've just verified that the bus type of `dev` equals `bindings::pci_bus_type`, in try_from()
515 // SAFETY: `pdev` is a valid pointer to a `struct pci_dev`. in try_from()
520 // SAFETY: A `Device` is always reference-counted and can be released from any thread.
523 // SAFETY: `Device` can be shared among threads because all methods of `Device`