smbios: changed for "smbios_build_type_17_table()" to take 'uint64_t'
PATCH v2 1/1 smbios: changed for "smbios_build_type_17_table()" to take 'uint64_t'
"smbios_build_type_17_table()" should take 'uint64_t' instead of 'ram_addr_t' because it should be able to handle (16ll * GiB). Otherwise, clang (>= 3.4) produces compilation warning in "smbios_get_tables()".
--- hw/i386/smbios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/smbios.c +1 -1
@@ -669,7 +669,7 @@ static void smbios_build_type_16_table(unsigned dimm_cnt)#define MAX_T17_STD_SZ 0x7FFF/* (32G - 1M), in Megabytes */ #define MAX_T17_EXT_SZ 0x80000000/* 2P, in Megabytes */ -static void smbios_build_type_17_table (unsigned instance,ram_addr_t size) +static void smbios_build_type_17_table (unsigned instance,uint64_t size) {char loc_str[128 ];ram_addr_t size_mb;
Signature · 1 line
2.1.0
Quoted 14 lines · SeokYeon Hwang
"
smbios_build_type_17_table()" should take 'uint64_t' instead of 'ram_addr_t' because it should be able to handle (16ll * GiB). Otherwise, clang (>= 3.4) produces compilation warning in "smbios_get_tables()".Signed-off-by SeokYeon Hwang <[email protected]>--- hw/i386/smbios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/i386/smbios.c +0
-0
hw/i386/smbios.c static void smbios_build_type_16_table(unsigned dimm_cnt) · line 675
Quoted 8 lines
hw/i386/smbios.c +1
-1@@ -669,7 +669,7 @@ static void smbios_build_type_16_table(unsigned dimm_cnt)#define MAX_T17_STD_SZ 0x7FFF/* (32G - 1M), in Megabytes */ #define MAX_T17_EXT_SZ 0x80000000/* 2P, in Megabytes */ -static void smbios_build_type_17_table (unsigned instance,ram_addr_t size) +static void smbios_build_type_17_table (unsigned instance,uint64_t size) {char loc_str[128 ];ram_addr_t size_mb;
Can you make a patch that replaces _all_ occurrences in hw/i386/smbios.c instead?
Thanks,
Paolo
Quoted 42 lines
-----Original Message-----
From: Paolo Bonzini [mailto:[email protected]] On Behalf Of Paolo Bonzini
Sent: Tuesday, November 04, 2014 5:42 PM
To: SeokYeon Hwang; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2] smbios: changed for "smbios_build_type_17_table()" to take 'uint64_t'Quoted 1 line · SeokYeon Hwang
"
smbios_build_type_17_table()" should take 'uint64_t' instead of'
ram_addr_t' because it should be able to handle (16ll * GiB).Quoted 1 line
Otherwise, clang (>= 3.4) produces compilation warning in
"
smbios_get_tables()".Quoted 17 lines
Signed-off-by SeokYeon Hwang <[email protected]>--- hw/i386/smbios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/i386/smbios.c index renamed from hw/i386/smbios.c +0
-08a7ad48..4ad42ae 100644
hw/i386/smbios.c +0
-0@@ -669,7 +669,7 @@ static void smbios_build_type_16_table(unsigned
dimm_cnt) #defineMAX_T17_STD_SZ0x7FFF/* (32G - 1M), in Megabytes */ #defineMAX_T17_EXT_SZ0x80000000/* 2P, in Megabytes */-static void
smbios_build_type_17_table(unsigned instance, ram_addr_t size)hw/i386/smbios.c static void smbios_build_type_16_table(unsigned dimm_cnt) · line 675
Quoted 5 lines
hw/i386/smbios.c +2
-0+static void smbios_build_type_17_table (unsigned instance,uint64_t +size) {char loc_str[128 ];ram_addr_t size_mb;Can you make a patch that replaces _all_ occurrences in
hw/i386/smbios.cinstead?
Quoted 3 lines
Thanks,
Paolo
I just posted patch v3 that is applied your suggestion. Thank you for your advice.