Skip to content

Commit 3925423

Browse files
junjiemao1NanlinXie
authored andcommitted
HV: treewide: convert suffix ULL to UL
It is already assumed that ''long'' has 8-bytes, and thus there is no need to use ULL to indicate a 8-byte unsigned constant. This patch changes all ULL suffixes found in the hypervisor to UL. Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 9beb1b9 commit 3925423

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

hypervisor/arch/x86/guest/guest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,8 @@ uint64_t create_guest_initial_paging(struct vm *vm)
801801
/* The GDT defined below compatible with linux kernel */
802802
#define GUEST_INIT_GDT_DESC_0 (0x0)
803803
#define GUEST_INIT_GDT_DESC_1 (0x0)
804-
#define GUEST_INIT_GDT_DESC_2 (0x00CF9B000000FFFFULL) /* Linear Code */
805-
#define GUEST_INIT_GDT_DESC_3 (0x00CF93000000FFFFULL) /* Linear Data */
804+
#define GUEST_INIT_GDT_DESC_2 (0x00CF9B000000FFFFUL) /* Linear Code */
805+
#define GUEST_INIT_GDT_DESC_3 (0x00CF93000000FFFFUL) /* Linear Data */
806806

807807
static const uint64_t guest_init_gdt[] = {
808808
GUEST_INIT_GDT_DESC_0,

hypervisor/include/arch/x86/trusty.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define BUP_MKHI_BOOTLOADER_SEED_LEN 64
1414

1515
/* Trusty EPT rebase gpa: 511G */
16-
#define TRUSTY_EPT_REBASE_GPA (511ULL*1024ULL*1024ULL*1024ULL)
16+
#define TRUSTY_EPT_REBASE_GPA (511UL * 1024UL * 1024UL * 1024UL)
1717
#define TRUSTY_MEMORY_SIZE 0x01000000
1818

1919
/* Structure of seed info */
@@ -122,4 +122,3 @@ void destroy_secure_world(struct vm *vm);
122122
void trusty_set_dseed(void *dseed, uint8_t seed_num);
123123

124124
#endif /* TRUSTY_H_ */
125-

hypervisor/lib/div.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ int udiv64(uint64_t dividend, uint64_t divisor, struct udiv_result *res)
9696
/* align divisor and dividend. */
9797
bits = clz64(divisor) - clz64(dividend);
9898
divisor <<= bits;
99-
mask = 1ULL << bits;
99+
mask = 1UL << bits;
100100
/* division loop */
101101
do {
102102
if (dividend >= divisor) {

hypervisor/lib/sprintf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ static int print_pow2(struct print_param *param,
273273
int ret;
274274

275275
/* calculate mask */
276-
mask = (1ULL << shift) - 1;
276+
mask = (1UL << shift) - 1;
277277

278278
/* determine digit translation table */
279279
digits = ((param->vars.flags & PRINT_FLAG_UPPER) != 0) ?
@@ -469,7 +469,7 @@ int do_print(const char *fmt, struct print_param *param,
469469

470470
/* initialize the variables for the next argument */
471471
memset(&(param->vars), 0, sizeof(param->vars));
472-
param->vars.mask = 0xFFFFFFFFFFFFFFFFULL;
472+
param->vars.mask = 0xFFFFFFFFFFFFFFFFUL;
473473

474474
/*
475475
* analyze the format specification:

0 commit comments

Comments
 (0)