Lines Matching full:safety
37 // SAFETY:
48 // SAFETY: A call to `unregister` for a given instance of `DriverType` is guaranteed to be valid if
56 // SAFETY: It's safe to set the fields of `struct usb_driver` on initialization.
64 // SAFETY: `udrv` is guaranteed to be a valid `DriverType`.
71 // SAFETY: `udrv` is guaranteed to be a valid `DriverType`.
81 // SAFETY: The USB core only ever calls the probe callback with a valid pointer to a
88 // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `struct usb_device_id` and
102 // SAFETY: The USB core only ever calls the disconnect callback with a valid pointer to a
110 // SAFETY: `disconnect_callback` is only ever called after a successful call to
133 // SAFETY: It is safe to use all zeroes for the other fields of `usb_device_id`.
146 // SAFETY: It is safe to use all zeroes for the other fields of `usb_device_id`.
158 // SAFETY: It is safe to use all zeroes for the other fields of `usb_device_id`.
170 // SAFETY: It is safe to use all zeroes for the other fields of `usb_device_id`.
183 // SAFETY: It is safe to use all zeroes for the other fields of `usb_device_id`.
196 // SAFETY: It is safe to use all zeroes for the other fields of `usb_device_id`.
209 // SAFETY: It is safe to use all zeroes for the other fields of `usb_device_id`.
230 // SAFETY: It is safe to use all zeroes for the other fields of `usb_device_id`.
236 // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `usb_device_id` and does not add
242 // SAFETY: `DRIVER_DATA_OFFSET` is the offset to the `driver_info` field.
350 // SAFETY: `usb::Interface` is a transparent wrapper of `struct usb_interface`.
356 // SAFETY: `Interface` is a transparent wrapper of a type that doesn't depend on
363 // SAFETY: By the type invariant of `Self`, `self.as_raw()` is a pointer to a valid
367 // SAFETY: `dev` points to a valid `struct device`.
374 // SAFETY: `self.as_raw()` is valid by the type invariants.
377 // SAFETY: For a valid `struct usb_interface` pointer, the above call to
383 // SAFETY: Instances of `Interface` are always reference-counted.
386 // SAFETY: The invariants of `Interface` guarantee that `self.as_raw()`
393 // SAFETY: The safety requirements guarantee that the refcount is non-zero.
398 // SAFETY: A `Interface` is always reference-counted and can be released from any thread.
401 // SAFETY: It is safe to send a &Interface to another thread because we do not
429 // SAFETY: `Device` is a transparent wrapper of a type that doesn't depend on `Device`'s generic
434 // SAFETY: Instances of `Device` are always reference-counted.
437 // SAFETY: The invariants of `Device` guarantee that `self.as_raw()`
444 // SAFETY: The safety requirements guarantee that the refcount is non-zero.
451 // SAFETY: By the type invariant of `Self`, `self.as_raw()` is a pointer to a valid
455 // SAFETY: `dev` points to a valid `struct device`.
460 // SAFETY: A `Device` is always reference-counted and can be released from any thread.
463 // SAFETY: It is safe to send a &Device to another thread because we do not