Skip to content

Commit e8f3a2d

Browse files
lifeixwenlingz
authored andcommitted
hv: use uint64_t replace "unsigned long"
Since it's typedef in "include/lib/types.h" Tracked-On: #861 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
1 parent 473d871 commit e8f3a2d

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

hypervisor/bsp/uefi/efi/boot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ EFI_STATUS construct_mbi(EFI_PHYSICAL_ADDRESS hv_hpa)
126126
EFI_MEMORY_DESCRIPTOR *d;
127127
uint32_t e820_type = 0;
128128

129-
d = (EFI_MEMORY_DESCRIPTOR *)((unsigned long)map_buf + (i * desc_size));
129+
d = (EFI_MEMORY_DESCRIPTOR *)((uint64_t)map_buf + (i * desc_size));
130130
switch(d->Type) {
131131
case EfiReservedMemoryType:
132132
case EfiRuntimeServicesCode:

hypervisor/common/schedule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <hypervisor.h>
88
#include <schedule.h>
99

10-
static unsigned long pcpu_used_bitmap;
10+
static uint64_t pcpu_used_bitmap;
1111

1212
void init_scheduler(void)
1313
{

hypervisor/include/lib/bits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static inline uint16_t fls64(uint64_t value)
105105
* ffs64 (0x8000000000000001) = 0
106106
* ffs64 (0xf000000000000000) = 60
107107
*
108-
* @param value: 'unsigned long' type value
108+
* @param value: 'uint64_t' type value
109109
*
110110
* @return value: zero-based bit index, INVALID_BIT_INDEX means
111111
* when 'value' was zero, bit operations function can't find bit

hypervisor/lib/crypto/mbedtls/ChangeLog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2267,7 +2267,7 @@ Changes
22672267
* Generalized external private key implementation handling (like PKCS#11)
22682268
in SSL/TLS
22692269
* Revamped x509_verify() and the SSL f_vrfy callback implementations
2270-
* Moved from unsigned long to fixed width uint32_t types throughout code
2270+
* Moved from uint64_t to fixed width uint32_t types throughout code
22712271
* Renamed ciphersuites naming scheme to IANA reserved names
22722272

22732273
Bugfix

hypervisor/lib/sprintf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static void print_pow2(struct print_param *param,
252252
uint64_t v_arg, uint32_t shift)
253253
{
254254
uint64_t v = v_arg;
255-
/* max buffer required for octal representation of unsigned long long */
255+
/* max buffer required for octal representation of uint64_t long */
256256
char digitbuff[22];
257257
/* Insert position for the next character+1 */
258258
char *pos = digitbuff + sizeof(digitbuff);
@@ -305,7 +305,7 @@ static void print_pow2(struct print_param *param,
305305

306306
static void print_decimal(struct print_param *param, int64_t value)
307307
{
308-
/* max. required buffer for unsigned long long in decimal format */
308+
/* max. required buffer for uint64_t long in decimal format */
309309
char digitbuff[20];
310310
/* pointer to the next character position (+1) */
311311
char *pos = digitbuff + sizeof(digitbuff);

0 commit comments

Comments
 (0)