ia64: fix EFI_DEBUG build
PATCH 1/1 ia64: fix EFI_DEBUG build
When enabled local debugging via #define EFI_DEBUG 1 noticed build failure:
ia64/kernel/efi.c:564:8: error: 'i' undeclared (first use in this function)
564 | for (i = 0, p = efi_map_start; p < efi_map_end;
| ^
--- arch/ia64/kernel/efi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
arch/ia64/kernel/efi.c +6 -5
@@ -415,10 +415,10 @@ efi_get_pal_addr (void) mask = ~((1 <<IA64_GRANULE_SHIFT ) -1 );printk (KERN_INFO "CPU %d: mapping PAL code " -"[0x%lx-0x%lx) into [0x%lx-0x%lx)\n" , -smp_processor_id (), md->phys_addr, - md->phys_addr +efi_md_size (md), - vaddr & mask, (vaddr & mask) +IA64_GRANULE_SIZE ); +"[0x%llx-0x%llx) into [0x%llx-0x%llx)\n" , +smp_processor_id (), md->phys_addr, + md->phys_addr +efi_md_size (md), + vaddr & mask, (vaddr & mask) +IA64_GRANULE_SIZE );#endif return __va (md->phys_addr); }
@@ -560,6 +560,7 @@ efi_init (void) {efi_memory_desc_t *md;void *p; +unsigned int i;for (i =0 , p = efi_map_start; p < efi_map_end; ++i, p += efi_desc_size)
@@ -586,7 +587,7 @@ efi_init (void) }printk ("mem%02d: %s " -"range=[0x%016lx-0x%016lx) (%4lu%s)\n" , +"range=[0x%016llx-0x%016llx) (%4lu%s)\n" , i,efi_md_typeattr_format (buf,sizeof (buf), md), md->phys_addr, md->phys_addr +efi_md_size (md), size, unit);
Signature · 1 line
2.31.0
Ard Biesheuvel
maintainerQuoted 4 lines · Sergei Trofimovich
When enabled local debugging via
#define EFI_DEBUG 1noticed build failure:
Quoted 8 lines
ia64/kernel/efi.c:564:8: error: 'i' undeclared (first use in this function)
564 | for (i = 0, p =efi_map_start; p <efi_map_end;
| ^CC Ard Biesheuvel <[email protected]>Signed-off-by Sergei Trofimovich <[email protected]>
What are the other changes for?
Quoted 43 lines
--- arch/ia64/kernel/efi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)arch/ia64/kernel/efi.c +6
-6@@ -415,10 +415,10 @@ efi_get_pal_addr (void) mask = ~((1 <<IA64_GRANULE_SHIFT ) -1 );printk (KERN_INFO "CPU %d: mapping PAL code " -"[0x%lx-0x%lx) into [0x%lx-0x%lx)\n" , -smp_processor_id (), md->phys_addr, - md->phys_addr +efi_md_size (md), - vaddr & mask, (vaddr & mask) +IA64_GRANULE_SIZE ); +"[0x%llx-0x%llx) into [0x%llx-0x%llx)\n" , +smp_processor_id (), md->phys_addr, + md->phys_addr +efi_md_size (md), + vaddr & mask, (vaddr & mask) +IA64_GRANULE_SIZE );#endif return __va (md->phys_addr); }@@ -560,6 +560,7 @@ efi_init (void) {efi_memory_desc_t *md;void *p; +unsigned int i;for (i =0 , p = efi_map_start; p < efi_map_end; ++i, p += efi_desc_size)@@ -586,7 +587,7 @@ efi_init (void) }printk ("mem%02d: %s " -"range=[0x%016lx-0x%016lx) (%4lu%s)\n" , +"range=[0x%016llx-0x%016llx) (%4lu%s)\n" , i,efi_md_typeattr_format (buf,sizeof (buf), md), md->phys_addr, md->phys_addr +efi_md_size (md), size, unit); --2.31.0
Quoted 9 lines · Ard Biesheuvel
Quoted 8 lines · Sergei Trofimovich
When enabled local debugging via
#define EFI_DEBUG 1noticed build failure:
ia64/kernel/efi.c:564:8: error: 'i' undeclared (first use in this function)
564 | for (i = 0, p =efi_map_start; p <efi_map_end;
| ^
Quoted 6 lines
Quoted 4 lines
CC Ard Biesheuvel <[email protected]>Signed-off-by Sergei Trofimovich <[email protected]>What are the other changes for?
The rest are fixes for format string mismatch in %lx / unsigned long long. Should I resend with updated comment or split it to another commit?
They all are hiding under EFI_DEBUG and are not visible by default.
Quoted 43 lines
Quoted 43 lines
--- arch/ia64/kernel/efi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)arch/ia64/kernel/efi.c +6
-6@@ -415,10 +415,10 @@ efi_get_pal_addr (void) mask = ~((1 <<IA64_GRANULE_SHIFT ) -1 );printk (KERN_INFO "CPU %d: mapping PAL code " -"[0x%lx-0x%lx) into [0x%lx-0x%lx)\n" , -smp_processor_id (), md->phys_addr, - md->phys_addr +efi_md_size (md), - vaddr & mask, (vaddr & mask) +IA64_GRANULE_SIZE ); +"[0x%llx-0x%llx) into [0x%llx-0x%llx)\n" , +smp_processor_id (), md->phys_addr, + md->phys_addr +efi_md_size (md), + vaddr & mask, (vaddr & mask) +IA64_GRANULE_SIZE );#endif return __va (md->phys_addr); }@@ -560,6 +560,7 @@ efi_init (void) {efi_memory_desc_t *md;void *p; +unsigned int i;for (i =0 , p = efi_map_start; p < efi_map_end; ++i, p += efi_desc_size)@@ -586,7 +587,7 @@ efi_init (void) }printk ("mem%02d: %s " -"range=[0x%016lx-0x%016lx) (%4lu%s)\n" , +"range=[0x%016llx-0x%016llx) (%4lu%s)\n" , i,efi_md_typeattr_format (buf,sizeof (buf), md), md->phys_addr, md->phys_addr +efi_md_size (md), size, unit); --2.31.0
Signature · 1 line
Sergei
Ard Biesheuvel
maintainerQuoted 16 lines · Sergei Trofimovich
Quoted 14 lines · Ard Biesheuvel
Quoted 12 lines · Sergei Trofimovich
When enabled local debugging via
#define EFI_DEBUG 1noticed build failure:
ia64/kernel/efi.c:564:8: error: 'i' undeclared (first use in this function)
564 | for (i = 0, p =efi_map_start; p <efi_map_end;
| ^CC Ard Biesheuvel <[email protected]>Signed-off-by Sergei Trofimovich <[email protected]>
Quoted 7 lines
Quoted 1 line
What are the other changes for?
The rest are fixes for format string mismatch in %lx / unsigned long long. Should I resend with updated comment or split it to another commit?
They all are hiding under
EFI_DEBUGand are not visible by default.
OK, but please describe the purpose of *all* changes in the commit log.
Also, the breakage seems to be caused by
commit 14fb4209094355928d5a742e35afabdf7b404c17
Author: Ard Biesheuvel <[email protected]> Date: Mon Jan 20 10:49:11 2020 +0100
efi: Merge EFI system table revision and vendor checks
so you can include a line in the signoff area saying
vendor checks")
Quoted 47 lines
Quoted 34 lines
Quoted 34 lines
--- arch/ia64/kernel/efi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)arch/ia64/kernel/efi.c +5
-4@@ -415,10 +415,10 @@ efi_get_pal_addr (void) mask = ~((1 <<IA64_GRANULE_SHIFT ) -1 );printk (KERN_INFO "CPU %d: mapping PAL code " -"[0x%lx-0x%lx) into [0x%lx-0x%lx)\n" , -smp_processor_id (), md->phys_addr, - md->phys_addr +efi_md_size (md), - vaddr & mask, (vaddr & mask) +IA64_GRANULE_SIZE ); +"[0x%llx-0x%llx) into [0x%llx-0x%llx)\n" , +smp_processor_id (), md->phys_addr, + md->phys_addr +efi_md_size (md), + vaddr & mask, (vaddr & mask) +IA64_GRANULE_SIZE );#endif return __va (md->phys_addr); }@@ -560,6 +560,7 @@ efi_init (void) {efi_memory_desc_t *md;void *p; +unsigned int i;for (i =0 , p = efi_map_start; p < efi_map_end; ++i, p += efi_desc_size)@@ -586,7 +587,7 @@ efi_init (void) }Quoted 9 lines
Quoted 9 lines
arch/ia64/kernel/efi.c +1
-2printk ("mem%02d: %s " -"range=[0x%016lx-0x%016lx) (%4lu%s)\n" , +"range=[0x%016llx-0x%016llx) (%4lu%s)\n" , i,efi_md_typeattr_format (buf,sizeof (buf), md), md->phys_addr, md->phys_addr +efi_md_size (md), size, unit); --2.31.0
--
Sergei
PATCH v2 1/1 ia64: fix EFI_DEBUG build
When enabled local debugging via #define EFI_DEBUG 1 noticed
build failure:
arch/ia64/kernel/efi.c:564:8: error: 'i' undeclared (first use in this function)
While at it fixed benign string format mismatches visible only when EFI_DEBUG is enabled:
arch/ia64/kernel/efi.c:589:11:
warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'u64' {aka 'long long unsigned int'} [-Wformat=]
---
Change since v1: mention explicitly format string change
arch/ia64/kernel/efi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
arch/ia64/kernel/efi.c +6 -5
@@ -415,10 +415,10 @@ efi_get_pal_addr (void) mask = ~((1 <<IA64_GRANULE_SHIFT ) -1 );printk (KERN_INFO "CPU %d: mapping PAL code " -"[0x%lx-0x%lx) into [0x%lx-0x%lx)\n" , -smp_processor_id (), md->phys_addr, - md->phys_addr +efi_md_size (md), - vaddr & mask, (vaddr & mask) +IA64_GRANULE_SIZE ); +"[0x%llx-0x%llx) into [0x%llx-0x%llx)\n" , +smp_processor_id (), md->phys_addr, + md->phys_addr +efi_md_size (md), + vaddr & mask, (vaddr & mask) +IA64_GRANULE_SIZE );#endif return __va (md->phys_addr); }
@@ -560,6 +560,7 @@ efi_init (void) {efi_memory_desc_t *md;void *p; +unsigned int i;for (i =0 , p = efi_map_start; p < efi_map_end; ++i, p += efi_desc_size)
@@ -586,7 +587,7 @@ efi_init (void) }printk ("mem%02d: %s " -"range=[0x%016lx-0x%016lx) (%4lu%s)\n" , +"range=[0x%016llx-0x%016llx) (%4lu%s)\n" , i,efi_md_typeattr_format (buf,sizeof (buf), md), md->phys_addr, md->phys_addr +efi_md_size (md), size, unit);
Signature · 1 line
2.31.1