From bf7d7e851b604d8414a7960fb9137b59fc42421d Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Wed, 18 Sep 2024 14:44:40 +0000 Subject: [PATCH] gpio: fix clippy warnings Signed-off-by: Muminul Islam --- examples/gpio/pci.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gpio/pci.rs b/examples/gpio/pci.rs index bcfb32b..3475b55 100644 --- a/examples/gpio/pci.rs +++ b/examples/gpio/pci.rs @@ -505,7 +505,7 @@ impl PciConfiguration { .ok_or(Error::BarAddressInvalid(config.addr, config.size))?; match config.region_type { PciBarRegionType::Memory32BitRegion | PciBarRegionType::IoRegion => { - if end_addr > u64::from(u32::max_value()) { + if end_addr > u64::from(u32::MAX) { return Err(Error::BarAddressInvalid(config.addr, config.size)); } } @@ -515,7 +515,7 @@ impl PciConfiguration { return Err(Error::BarInvalid64(config.bar_idx)); } - if end_addr > u64::max_value() { + if end_addr > u64::from(u32::MAX) { return Err(Error::BarAddressInvalid(config.addr, config.size)); }