mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 23:57:10 +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*/
|
||||
|
||||
@@ -282,7 +282,7 @@ struct hc_api_version {
|
||||
uint32_t minor_version;
|
||||
} __aligned(8);
|
||||
|
||||
#define ACRN_PLATFORM_LAPIC_IDS_MAX 64
|
||||
#define ACRN_PLATFORM_LAPIC_IDS_MAX 64U
|
||||
/**
|
||||
* Hypervisor API, return it for HC_GET_PLATFORM_INFO hypercall
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user