Skip to content

Commit c256e53

Browse files
committed
rust: fix English typos found by checkpatch.pl
Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 180d33a commit c256e53

File tree

10 files changed

+11
-11
lines changed

10 files changed

+11
-11
lines changed

drivers/android/process.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,12 @@ impl Process {
287287
Ok(process.into())
288288
}
289289

290-
/// Attemps to fetch a work item from the process queue.
290+
/// Attempts to fetch a work item from the process queue.
291291
pub(crate) fn get_work(&self) -> Option<Ref<dyn DeliverToRead>> {
292292
self.inner.lock().work.pop_front()
293293
}
294294

295-
/// Attemps to fetch a work item from the process queue. If none is available, it registers the
295+
/// Attempts to fetch a work item from the process queue. If none is available, it registers the
296296
/// given thread as ready to receive work directly.
297297
///
298298
/// This must only be called when the thread is not participating in a transaction chain; when

drivers/android/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ impl Thread {
245245
process,
246246
// SAFETY: `inner` is initialised in the call to `spinlock_init` below.
247247
inner: unsafe { SpinLock::new(InnerThread::new()) },
248-
// SAFETY: `work_condvar` is initalised in the call to `condvar_init` below.
248+
// SAFETY: `work_condvar` is initialised in the call to `condvar_init` below.
249249
work_condvar: unsafe { CondVar::new() },
250250
links: Links::new(),
251251
})?);

rust/kernel/amba.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<T: Driver> driver::DriverOps for Adapter<T> {
7777
name: &'static CStr,
7878
module: &'static ThisModule,
7979
) -> Result {
80-
// SAFETY: By the safety requirements of this function (defined in the trait defintion),
80+
// SAFETY: By the safety requirements of this function (defined in the trait definition),
8181
// `reg` is non-null and valid.
8282
let amba = unsafe { &mut *reg };
8383
amba.drv.name = name.as_char_ptr();

rust/kernel/clk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Drop for Clk {
4747
}
4848
}
4949

50-
// SAFETY: `Clk` is not restricted to a single thread so it it safe
50+
// SAFETY: `Clk` is not restricted to a single thread so it is safe
5151
// to move it between threads.
5252
unsafe impl Send for Clk {}
5353

rust/kernel/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pub struct KParamGuard<'a> {
178178
impl<'a> Drop for KParamGuard<'a> {
179179
fn drop(&mut self) {
180180
// SAFETY: `kernel_param_lock` will check if the pointer is null and
181-
// use the built-in mutex in that case. The existance of `self`
181+
// use the built-in mutex in that case. The existence of `self`
182182
// guarantees that the lock is held.
183183
unsafe { bindings::kernel_param_unlock(self.this_module.0) }
184184
}

rust/kernel/module_param.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pub trait ModuleParam: core::fmt::Display + core::marker::Sized {
118118

119119
/// Trait for parsing integers.
120120
///
121-
/// Strings begining with `0x`, `0o`, or `0b` are parsed as hex, octal, or
121+
/// Strings beginning with `0x`, `0o`, or `0b` are parsed as hex, octal, or
122122
/// binary respectively. Strings beginning with `0` otherwise are parsed as
123123
/// octal. Anything else is parsed as decimal. A leading `+` or `-` is also
124124
/// permitted. Any string parsed by [`kstrtol()`] or [`kstrtoul()`] will be

rust/kernel/pages.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl<const ORDER: u32> Pages<ORDER> {
7979
Ok(())
8080
}
8181

82-
/// Maps the pages and writes into them from the given bufer.
82+
/// Maps the pages and writes into them from the given buffer.
8383
///
8484
/// # Safety
8585
///

rust/kernel/platform.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl<T: Driver> driver::DriverOps for Adapter<T> {
3232
name: &'static CStr,
3333
module: &'static ThisModule,
3434
) -> Result {
35-
// SAFETY: By the safety requirements of this function (defined in the trait defintion),
35+
// SAFETY: By the safety requirements of this function (defined in the trait definition),
3636
// `reg` is non-null and valid.
3737
let pdrv = unsafe { &mut *reg };
3838

rust/kernel/sync/guard.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl LockInfo for WriteLock {
9494
/// may access the protected data once the lock is held, that is, between calls to `lock_noguard`
9595
/// and `unlock`.
9696
/// - Implementers of all other markers must ensure that a mutable reference to the protected data
97-
/// is not active in any thread/CPU because at least one shared refence is active between calls
97+
/// is not active in any thread/CPU because at least one shared reference is active between calls
9898
/// to `lock_noguard` and `unlock`.
9999
pub unsafe trait Lock<I: LockInfo = WriteLock> {
100100
/// The type of the data protected by the lock.

rust/kernel/sync/revocable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22

3-
//! Synchronisation primitives where acccess to their contents can be revoked at runtime.
3+
//! Synchronisation primitives where access to their contents can be revoked at runtime.
44
55
use crate::{
66
bindings,

0 commit comments

Comments
 (0)