coding guidelines: comply with MISRA C:2012 Rule 7.2
MISRA C:2012 Rule 7.2 (A `u' or `U' suffix shall be applied to all integer constants that are represented in an unsigned type) Added missing `U' suffixes in constants that are involved in the analyzed build, plus a few more not to introduce inconsistencies with respect to nearby constants that are either unused in the build (but implicitly unsigned) or are used and are immediately converted to unsigned. Signed-off-by: Abramo Bagnara <abramo.bagnara@bugseng.com>
This commit is contained in:
parent
e68913567d
commit
ada9ca4c93
4 changed files with 18 additions and 18 deletions
|
@ -85,7 +85,7 @@ uint32_t pcie_get_ext_cap(pcie_bdf_t bdf, uint32_t cap_id)
|
|||
|
||||
while (reg) {
|
||||
data = pcie_conf_read(bdf, reg);
|
||||
if (!data || data == 0xffffffff) {
|
||||
if (!data || data == 0xffffffffU) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ bool pcie_get_mbar(pcie_bdf_t bdf,
|
|||
return false;
|
||||
}
|
||||
|
||||
pcie_conf_write(bdf, reg, 0xFFFFFFFF);
|
||||
pcie_conf_write(bdf, reg, 0xFFFFFFFFU);
|
||||
size = pcie_conf_read(bdf, reg);
|
||||
pcie_conf_write(bdf, reg, (uint32_t)phys_addr);
|
||||
|
||||
|
@ -153,7 +153,7 @@ bool pcie_get_mbar(pcie_bdf_t bdf,
|
|||
return false;
|
||||
}
|
||||
|
||||
pcie_conf_write(bdf, reg, 0xFFFFFFFF);
|
||||
pcie_conf_write(bdf, reg, 0xFFFFFFFFU);
|
||||
size |= ((uint64_t)pcie_conf_read(bdf, reg)) << 32;
|
||||
pcie_conf_write(bdf, reg, (uint32_t)((uint64_t)phys_addr >> 32));
|
||||
} else if (PCIE_CONF_BAR_ADDR(phys_addr) == PCIE_CONF_BAR_INVAL ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue