Lines Matching full:safety

59 // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `i2c_device_id` and does not add
65 // SAFETY: `DRIVER_DATA_OFFSET` is the offset to the `driver_data` field.
94 // SAFETY:
105 // SAFETY: A call to `unregister` for a given instance of `DriverType` is guaranteed to be valid if
133 // SAFETY: It's safe to set the fields of `struct i2c_client` on initialization.
144 // SAFETY: `idrv` is guaranteed to be a valid `DriverType`.
149 // SAFETY: `idrv` is guaranteed to be a valid `DriverType`.
156 // SAFETY: The I2C bus only ever calls the probe callback with a valid pointer to a
174 // SAFETY: `idev` is a valid pointer to a `struct i2c_client`.
177 // SAFETY: `remove_callback` is only ever called after a successful call to
186 // SAFETY: `shutdown_callback` is only ever called for a valid `idev`
189 // SAFETY: `shutdown_callback` is only ever called after a successful call to
208 // SAFETY:
217 // SAFETY: `DeviceId` is a `#[repr(transparent)` wrapper of `struct i2c_device_id` and
395 // SAFETY: `self.as_raw` is a valid pointer to a `struct i2c_adapter`.
401 // SAFETY: `index` must refer to a valid I2C adapter; the kernel
406 // SAFETY: `adapter` is non-null and points to a live `i2c_adapter`.
412 // SAFETY: `I2cAdapter` is a transparent wrapper of a type that doesn't depend on
417 // SAFETY: Instances of `I2cAdapter` are always reference-counted.
420 // SAFETY: The existence of a shared reference guarantees that the refcount is non-zero.
425 // SAFETY: The safety requirements guarantee that the refcount is non-zero.
482 // SAFETY: `I2cClient` is a transparent wrapper of `struct i2c_client`.
488 // SAFETY: `I2cClient` is a transparent wrapper of a type that doesn't depend on
493 // SAFETY: Instances of `I2cClient` are always reference-counted.
496 // SAFETY: The existence of a shared reference guarantees that the refcount is non-zero.
501 // SAFETY: The safety requirements guarantee that the refcount is non-zero.
509 // SAFETY: By the type invariant of `Self`, `self.as_raw()` is a pointer to a valid
513 // SAFETY: `dev` points to a valid `struct device`.
522 // SAFETY: By the type invariant of `Device`, `dev.as_raw()` is a valid pointer to a
528 // SAFETY: We've just verified that the type of `dev` equals to
533 // SAFETY: `idev` is a valid pointer to a `struct i2c_client`.
538 // SAFETY: A `I2cClient` is always reference-counted and can be released from any thread.
541 // SAFETY: `I2cClient` can be shared among threads because all methods of `I2cClient`
568 // SAFETY: the kernel guarantees that `i2c_new_client_device()` returns either a valid
583 // SAFETY: `Drop` is only called for a valid `Registration`, which by invariant
589 // SAFETY: A `Registration` of a `struct i2c_client` can be released from any thread.
592 // SAFETY: `Registration` offers no interior mutability (no mutation through &self