mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 12:34:31 +00:00
devices: pci: remove unreachable 64-bit BAR check
end_addr is a u64, so its value cannot be greater than the max u64 value. The compiler doesn't warn about this when using the legacy u64::max_value() function, but it becomes a warning when this is replaced with the u64::MAX constant. BUG=None TEST=tools/dev_container tools/presumbit Change-Id: I05ed36027718d62782ea2f2c597fe391fe9f0fae Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5690373 Reviewed-by: Dennis Kempin <denniskempin@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
59b8077f58
commit
da353a0dbf
1 changed files with 0 additions and 4 deletions
|
@ -714,10 +714,6 @@ impl PciConfiguration {
|
|||
return Err(Error::BarInvalid64(config.bar_idx));
|
||||
}
|
||||
|
||||
if end_addr > u64::max_value() {
|
||||
return Err(Error::BarAddressInvalid(config.addr, config.size));
|
||||
}
|
||||
|
||||
if self.bar_used[config.bar_idx + 1] {
|
||||
return Err(Error::BarInUse64(config.bar_idx));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue