HV: treewide: fix violations of coding guideline C-TY-12

The coding guideline rule C-TY-12 requires that 'all type conversions shall
be explicit'. Especially implicit cases on the signedness of variables
shall be avoided.

This patch either adds explicit type casts or adjust local variable types
to make sure that Booleans, signed and unsigned integers are not used
mixedly.

This patch has no semantic changes.

Tracked-On: #6776
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Junjie Mao
2021-10-29 14:58:39 +08:00
committed by wenlingz
parent db20e277b6
commit 9781873e77
10 changed files with 14 additions and 16 deletions

View File

@@ -293,7 +293,7 @@ build_bitmap_testandclear(bitmap32_test_and_clear_lock, "l", uint32_t, BUS_LOCK)
static inline uint16_t bitmap_weight(uint64_t bits)
{
return __builtin_popcountl(bits);
return (uint16_t)__builtin_popcountl(bits);
}
#endif /* BITS_H*/