mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-24 01:11:47 +00:00
hv:treewide:fix multiple MISRAC violations
MISRAC has requirements about literal value requires a U suffix and signed/unsigned conversion with cast. This patch is used to solve these violations. v1->v2 *Drop the cast of sz from uint32_t to int32_t, the signed/unsigned violation of nchars will be solved by other patch together with printf/sprintf/console/vuart/uart code. *Delete the unnecessary L suffix of shifting operand. Tracked-On: #861 Signed-off-by: Junjun Shan <junjun.shan@intel.com> Reviewed by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -138,7 +138,7 @@ static inline uint64_t ffz64_ex(const uint64_t *addr, uint64_t size)
|
||||
{
|
||||
uint64_t idx;
|
||||
|
||||
for (idx = 0; (idx << 6U) < size; idx++) {
|
||||
for (idx = 0UL; (idx << 6U) < size; idx++) {
|
||||
if (addr[idx] != ~0UL)
|
||||
return (idx << 6U) + ffz64(addr[idx]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user