Skip to content

Commit

Permalink
Fix clippy errors
Browse files Browse the repository at this point in the history
Fix #641

Signed-off-by: Wei Liu <wei3.liu@intel.com>
  • Loading branch information
liuw1 authored and jyao1 committed Dec 27, 2023
1 parent 8637a1a commit f7f1f1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion td-payload/src/bin/example/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub extern "C" fn main() -> ! {

#[cfg(feature = "benches")]
{
stack::bench_stack(memory_layout);
stack::bench_stack();
}

#[cfg(feature = "tdx")]
Expand Down
3 changes: 2 additions & 1 deletion td-payload/src/bin/example/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.
// This function will cause page fault by memory protection.

use core::arch::asm;
use td_benchmark::StackProfiling;
use td_payload::{mm::layout::DEFAULT_STACK_SIZE, println};

Expand All @@ -29,7 +30,7 @@ fn test_stack() {
let b = vec![1u8, 2, 3, 4];
}

pub fn bench_stack(memory_layout: RuntimeMemoryLayout) {
pub fn bench_stack() {
StackProfiling::init(0x5a5a_5a5a_5a5a_5a5a, 0x20_0000);
test_stack();
let stack_usage = StackProfiling::stack_usage().unwrap();
Expand Down

0 comments on commit f7f1f1e

Please sign in to comment.