Lines Matching full:safety

26 // SAFETY: A call to `unregister` for a given instance of `RegType` is guaranteed to be valid if
36 // SAFETY: It's safe to set the fields of `struct pci_driver` on initialization. in register()
44 // SAFETY: `pdrv` is guaranteed to be a valid `RegType`. in register()
51 // SAFETY: `pdrv` is guaranteed to be a valid `RegType`. in unregister()
61 // SAFETY: The PCI bus only ever calls the probe callback with a valid pointer to a in probe_callback()
64 // SAFETY: `dev` is guaranteed to be embedded in a valid `struct pci_dev` by the call in probe_callback()
68 // SAFETY: `DeviceId` is a `#[repr(transparent)` wrapper of `struct pci_device_id` and in probe_callback()
76 // SAFETY: By the type invariant `pdev.as_raw` returns a valid pointer to a in probe_callback()
87 // SAFETY: The PCI bus only ever calls the remove callback with a valid pointer to a in remove_callback()
91 // SAFETY: `remove_callback` is only ever called after a successful call to in remove_callback()
159 // SAFETY:
274 // SAFETY: in new()
283 // SAFETY: in new()
289 // SAFETY: in new()
299 // SAFETY: in new()
311 /// # Safety
315 // SAFETY: in do_release()
317 // `ioptr` is valid by the safety requirements. in do_release()
318 // `num` is valid by the safety requirements. in do_release()
326 // SAFETY: The safety requirements are guaranteed by the type invariant of `self.pdev`. in release()
348 // SAFETY: By the type invariant of `Self`, the MMIO range in `self.io` is properly mapped. in deref()
356 /// # Safety
365 // SAFETY: By the type invariant `self.0.as_raw` is a pointer to the `struct device` in as_raw()
372 // SAFETY: `self.as_raw` is a valid pointer to a `struct pci_dev`. in vendor_id()
378 // SAFETY: `self.as_raw` is a valid pointer to a `struct pci_dev`. in device_id()
384 // SAFETY: `self.as_raw` is guaranteed to be a pointer to a valid `struct pci_dev`. in enable_device_mem()
395 // SAFETY: `self.as_raw` is guaranteed to be a pointer to a valid `struct pci_dev`. in set_master()
405 // SAFETY: in resource_len()