Browse Source

fix: code format

jakezhu9 1 year ago
parent
commit
c9fe23766a
2 changed files with 5 additions and 5 deletions
  1. 4 4
      src/instance.rs
  2. 1 1
      src/susp.rs

+ 4 - 4
src/instance.rs

@@ -357,10 +357,10 @@ impl<T: Timer, I: Ipi, R: Fence, H: Hsm, S: Reset, P: Pmu, C: Console, SU: Susp,
                     };
                     let [param0, param1, param2] = [param[0], param[1], param[2]];
                     match function {
-                        spec::cppc::PROBE => cppc.probe(param0),
-                        spec::cppc::READ => cppc.read(param0),
-                        spec::cppc::READ_HI => cppc.read_hi(param0),
-                        spec::cppc::WRITE => cppc.write(param0, concat_u32(param2, param1)),
+                        spec::cppc::PROBE => cppc.probe(param0 as _),
+                        spec::cppc::READ => cppc.read(param0 as _),
+                        spec::cppc::READ_HI => cppc.read_hi(param0 as _),
+                        spec::cppc::WRITE => cppc.write(param0 as _, concat_u32(param2, param1)),
                         _ => SbiRet::not_supported(),
                     }
                 }

+ 1 - 1
src/susp.rs

@@ -76,7 +76,7 @@ pub trait Susp: Send + Sync {
     /// | `SbiRet::invalid_param()`   | `sleep_type` is reserved or is platform-specific and unimplemented.
     /// | `SbiRet::not_supported()`   | `sleep_type` is not reserved and is implemented, but the platform does not support it due to one or more missing dependencies.
     /// | `SbiRet::invalid_address()` | `resume_addr` is not valid, possibly due to the following reasons: * It is not a valid physical address. * Executable access to the address is prohibited by a physical memory protection mechanism or H-extension G-stage for supervisor mode.
-    /// | `SbiRet::failed()`          | The suspend request failed for unspecified or unknown other reasons. 
+    /// | `SbiRet::failed()`          | The suspend request failed for unspecified or unknown other reasons.
     fn system_suspend(&self, sleep_type: u32, resume_addr: usize, opaque: usize) -> SbiRet;
 }