Skip to content

Commit 2bc7ede

Browse files
Alexandra Iordachelauralt
authored andcommitted
fix clippy lints
Signed-off-by: Alexandra Iordache <aghecen@amazon.com>
1 parent 57146f6 commit 2bc7ede

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/loader/x86_64/elf/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl KernelLoader for Elf {
224224
// Sanity checks.
225225
Self::validate_header(&ehdr)?;
226226
if let Some(addr) = highmem_start_address {
227-
if (ehdr.e_entry as u64) < addr.raw_value() {
227+
if (ehdr.e_entry) < addr.raw_value() {
228228
return Err(Error::InvalidEntryAddress.into());
229229
}
230230
}
@@ -234,10 +234,10 @@ impl KernelLoader for Elf {
234234
Some(k_offset) => GuestAddress(
235235
k_offset
236236
.raw_value()
237-
.checked_add(ehdr.e_entry as u64)
237+
.checked_add(ehdr.e_entry)
238238
.ok_or(Error::Overflow)?,
239239
),
240-
None => GuestAddress(ehdr.e_entry as u64),
240+
None => GuestAddress(ehdr.e_entry),
241241
},
242242
..Default::default()
243243
};
@@ -282,9 +282,9 @@ impl KernelLoader for Elf {
282282
// load it to the physical address p_paddr for each segment.
283283
let mem_offset = match kernel_offset {
284284
Some(k_offset) => k_offset
285-
.checked_add(phdr.p_paddr as u64)
285+
.checked_add(phdr.p_paddr)
286286
.ok_or(Error::InvalidProgramHeaderAddress)?,
287-
None => GuestAddress(phdr.p_paddr as u64),
287+
None => GuestAddress(phdr.p_paddr),
288288
};
289289

290290
guest_mem

0 commit comments

Comments
 (0)