Skip to content

Commit

Permalink
gpio: fix clippy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Muminul Islam <[email protected]>
  • Loading branch information
russell-islam authored and rbradford committed Sep 18, 2024
1 parent e2f2bf0 commit bf7d7e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/gpio/pci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
Expand All @@ -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));
}

Expand Down

0 comments on commit bf7d7e8

Please sign in to comment.