Commit 0ff8f3f0 authored by Michael Vetter's avatar Michael Vetter Committed by Miguel Ojeda

rust: kernel: fix typos in code comments

Fix spelling mistakes in code comments.
Signed-off-by: default avatarMichael Vetter <jubalh@iodoru.org>
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Reviewed-by: default avatarBenno Lossin <benno.lossin@proton.me>
Link: https://lore.kernel.org/r/20240819205731.2163-1-jubalh@iodoru.org
[ Reworded slightly. - Miguel ]
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 5d88f98b
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
//! } //! }
//! } //! }
//! // Implement the internal `PinData` trait that marks the pin-data struct as a pin-data //! // Implement the internal `PinData` trait that marks the pin-data struct as a pin-data
//! // struct. This is important to ensure that no user can implement a rouge `__pin_data` //! // struct. This is important to ensure that no user can implement a rogue `__pin_data`
//! // function without using `unsafe`. //! // function without using `unsafe`.
//! unsafe impl<T> ::kernel::init::__internal::PinData for __ThePinData<T> { //! unsafe impl<T> ::kernel::init::__internal::PinData for __ThePinData<T> {
//! type Datee = Bar<T>; //! type Datee = Bar<T>;
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
//! // case no such fields exist, hence this is almost empty. The two phantomdata fields exist //! // case no such fields exist, hence this is almost empty. The two phantomdata fields exist
//! // for two reasons: //! // for two reasons:
//! // - `__phantom`: every generic must be used, since we cannot really know which generics //! // - `__phantom`: every generic must be used, since we cannot really know which generics
//! // are used, we declere all and then use everything here once. //! // are used, we declare all and then use everything here once.
//! // - `__phantom_pin`: uses the `'__pin` lifetime and ensures that this struct is invariant //! // - `__phantom_pin`: uses the `'__pin` lifetime and ensures that this struct is invariant
//! // over it. The lifetime is needed to work around the limitation that trait bounds must //! // over it. The lifetime is needed to work around the limitation that trait bounds must
//! // not be trivial, e.g. the user has a `#[pin] PhantomPinned` field -- this is //! // not be trivial, e.g. the user has a `#[pin] PhantomPinned` field -- this is
......
...@@ -491,7 +491,7 @@ impl<T: Driver> Adapter<T> { ...@@ -491,7 +491,7 @@ impl<T: Driver> Adapter<T> {
pub struct DriverVTable(Opaque<bindings::phy_driver>); pub struct DriverVTable(Opaque<bindings::phy_driver>);
// SAFETY: `DriverVTable` doesn't expose any &self method to access internal data, so it's safe to // SAFETY: `DriverVTable` doesn't expose any &self method to access internal data, so it's safe to
// share `&DriverVTable` across execution context boundries. // share `&DriverVTable` across execution context boundaries.
unsafe impl Sync for DriverVTable {} unsafe impl Sync for DriverVTable {}
/// Creates a [`DriverVTable`] instance from [`Driver`]. /// Creates a [`DriverVTable`] instance from [`Driver`].
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment