mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
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:
@@ -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*/
|
||||
|
Reference in New Issue
Block a user