mirror of
https://github.com/torvalds/linux.git
synced 2026-01-24 23:16:46 +00:00
Merge tag 'v6.18-rc6' into drm-next
Linux 6.18-rc6 Backmerge in order to merge msm next Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -217,13 +217,7 @@ impl<Ctx: device::DeviceContext> Device<Ctx> {
|
||||
|
||||
/// Returns a reference to the parent [`device::Device`], if any.
|
||||
pub fn parent(&self) -> Option<&device::Device> {
|
||||
let ptr: *const Self = self;
|
||||
// CAST: `Device<Ctx: DeviceContext>` types are transparent to each other.
|
||||
let ptr: *const Device = ptr.cast();
|
||||
// SAFETY: `ptr` was derived from `&self`.
|
||||
let this = unsafe { &*ptr };
|
||||
|
||||
this.as_ref().parent()
|
||||
self.as_ref().parent()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ impl<Ctx: DeviceContext> Device<Ctx> {
|
||||
|
||||
/// Returns a reference to the parent device, if any.
|
||||
#[cfg_attr(not(CONFIG_AUXILIARY_BUS), expect(dead_code))]
|
||||
pub(crate) fn parent(&self) -> Option<&Self> {
|
||||
pub(crate) fn parent(&self) -> Option<&Device> {
|
||||
// SAFETY:
|
||||
// - By the type invariant `self.as_raw()` is always valid.
|
||||
// - The parent device is only ever set at device creation.
|
||||
@@ -264,7 +264,7 @@ impl<Ctx: DeviceContext> Device<Ctx> {
|
||||
// - Since `parent` is not NULL, it must be a valid pointer to a `struct device`.
|
||||
// - `parent` is valid for the lifetime of `self`, since a `struct device` holds a
|
||||
// reference count of its parent.
|
||||
Some(unsafe { Self::from_raw(parent) })
|
||||
Some(unsafe { Device::from_raw(parent) })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ struct Inner<T: Send> {
|
||||
///
|
||||
/// # Invariants
|
||||
///
|
||||
/// [`Self::inner`] is guaranteed to be initialized and is always accessed read-only.
|
||||
/// `Self::inner` is guaranteed to be initialized and is always accessed read-only.
|
||||
#[pin_data(PinnedDrop)]
|
||||
pub struct Devres<T: Send> {
|
||||
dev: ARef<Device>,
|
||||
|
||||
@@ -36,7 +36,7 @@ pub use new_condvar;
|
||||
/// spuriously.
|
||||
///
|
||||
/// Instances of [`CondVar`] need a lock class and to be pinned. The recommended way to create such
|
||||
/// instances is with the [`pin_init`](crate::pin_init!) and [`new_condvar`] macros.
|
||||
/// instances is with the [`pin_init`](pin_init::pin_init!) and [`new_condvar`] macros.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user