Lines Matching full:valid

30 // SAFETY: A call to `unregister` for a given instance of `RegType` is guaranteed to be valid if
48 // SAFETY: `pdrv` is guaranteed to be a valid `RegType`. in register()
55 // SAFETY: `pdrv` is guaranteed to be a valid `RegType`. in unregister()
65 // SAFETY: The PCI bus only ever calls the probe callback with a valid pointer to a in probe_callback()
68 // INVARIANT: `pdev` is valid for the duration of `probe_callback()`. in probe_callback()
79 // SAFETY: By the type invariant `pdev.as_raw` returns a valid pointer to a in probe_callback()
90 // SAFETY: The PCI bus only ever calls the remove callback with a valid pointer to a in remove_callback()
95 // `probe_callback`, hence it's guaranteed that `ptr` points to a valid and initialized in remove_callback()
251 /// A [`Device`] instance represents a valid `struct device` created by the C portion of the kernel.
262 /// `Bar` always holds an `IoRaw` inststance that holds a valid pointer to the start of the I/O
281 // `pdev` is valid by the invariants of `Device`. in new()
283 // `name` is always valid. in new()
290 // `pdev` is valid by the invariants of `Device`. in new()
292 // `name` is always valid. in new()
296 // `pdev` valid by the invariants of `Device`. in new()
306 // `pdev` is valid by the invariants of `Device`. in new()
307 // `ioptr` is guaranteed to be the start of a valid I/O mapped memory region. in new()
323 /// `ioptr` must be a valid pointer to the memory mapped PCI bar number `num`.
326 // `pdev` is valid by the invariants of `Device`. in do_release()
327 // `ioptr` is valid by the safety requirements. in do_release()
328 // `num` is valid by the safety requirements. in do_release()
370 // SAFETY: `self.as_raw` is a valid pointer to a `struct pci_dev`. in vendor_id()
376 // SAFETY: `self.as_raw` is a valid pointer to a `struct pci_dev`. in device_id()
387 // - `bar` is a valid bar number, as guaranteed by the above call to `Bar::index_is_valid`, in resource_len()
388 // - by its type invariant `self.as_raw` is always a valid pointer to a `struct pci_dev`. in resource_len()
414 // SAFETY: `self.as_raw` is guaranteed to be a pointer to a valid `struct pci_dev`. in enable_device_mem()
420 // SAFETY: `self.as_raw` is guaranteed to be a pointer to a valid `struct pci_dev`. in set_master()
460 // SAFETY: By the type invariant of `Self`, `self.as_raw()` is a pointer to a valid in as_ref()
464 // SAFETY: `dev` points to a valid `struct device`. in as_ref()