Skip to content

Commit 53eaaeb

Browse files
Swchexitroypat
authored andcommitted
chore: remove useless conversion in fdt.rs
After changing the type of `MMIODeviceInfo::irq` from `Option<NonZeroU32>` to `Option<u32>`, we don't need to convert NonZeroU32 to u32 with .into() anymore. Thus any occurance is removed. Signed-off-by: Sheng-Wei (Way) Chen <[email protected]>
1 parent c139a76 commit 53eaaeb

File tree

1 file changed

+2
-2
lines changed
  • src/vmm/src/arch/aarch64

1 file changed

+2
-2
lines changed

src/vmm/src/arch/aarch64/fdt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ fn create_virtio_node(fdt: &mut FdtWriter, dev_info: &MMIODeviceInfo) -> Result<
362362
"interrupts",
363363
&[
364364
GIC_FDT_IRQ_TYPE_SPI,
365-
dev_info.irq.unwrap().into(),
365+
dev_info.irq.unwrap(),
366366
IRQ_TYPE_EDGE_RISING,
367367
],
368368
)?;
@@ -383,7 +383,7 @@ fn create_serial_node(fdt: &mut FdtWriter, dev_info: &MMIODeviceInfo) -> Result<
383383
"interrupts",
384384
&[
385385
GIC_FDT_IRQ_TYPE_SPI,
386-
dev_info.irq.unwrap().into(),
386+
dev_info.irq.unwrap(),
387387
IRQ_TYPE_EDGE_RISING,
388388
],
389389
)?;

0 commit comments

Comments
 (0)