Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
alevy committed Nov 19, 2024
1 parent be71b16 commit 25a8066
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion chips/sam4l/src/adc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ impl Adc<'_> {
// and we solve for N
// becomes: N <= ceil(log_2(f(CLK_CPU)/1500000)) - 2
let cpu_frequency = self.pm.get_system_frequency();
let divisor = cpu_frequency.div_ceil(1500000); // ceiling of division
let divisor = cpu_frequency.div_ceil(1500000);
let divisor_pow2 = math::closest_power_of_two(divisor);
let clock_divisor = cmp::min(math::log_base_two(divisor_pow2).saturating_sub(2), 7);
self.adc_clk_freq
Expand Down
11 changes: 6 additions & 5 deletions kernel/src/processbuffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,12 +648,13 @@ impl Deref for ReadWriteProcessBufferRef<'_> {
// type so we alias it as `ReadWriteProcessBuffer`.
pub type UserspaceReadableProcessBuffer = ReadWriteProcessBuffer;

/// Equivalent of the Rust core library's.
/// Equivalent of the Rust core library's
/// [`SliceIndex`](core::slice::SliceIndex) type for process slices.
///
/// [`SliceIndex`](core::slice::SliceIndex) type for process slices. This helper
/// trait is used to abstract over indexing operators into process slices, and
/// is used to "overload" the `.get()` methods such that it can be called with
/// multiple different indexing operators.
/// This helper trait is used to abstract over indexing operators into
/// process slices, and is used to "overload" the `.get()` methods
/// such that it can be called with multiple different indexing
/// operators.
///
/// While we can use the core library's `SliceIndex` trait, parameterized over
/// our own `ProcessSlice` types, this trait includes mandatory methods that are
Expand Down

0 comments on commit 25a8066

Please sign in to comment.