arch/i386/kernel/efi.c: fixing uninitialised variable
Subsystems (2)
PATCH 1/1 arch/i386/kernel/efi.c: fixing uninitialised variable
Hello All,
I'm going to try and work through some of the gcc warnings generated from building the kernel. I've included my first patch below but have a question first.
Having looking in MAINTAINERS I wasn't sure who the appropriate person would be to CC this to. The closest thing I could find was FIRMWARE LOADER header which is listed as an orphan. In this case should I just CC to LKML?
The patch initialises the prev struct as it gets checked before being initialised later in the code. This removes the warning generated by gcc.
Any feedback welcome.
Thanks
---
arch/i386/kernel/efi.c +1 -1
@@ -278,7 +278,7 @@ void efi_memmap_walk(efi_freemem_callbacstruct range {unsigned long start;unsigned long end; - } prev, curr; + } prev={}, curr;efi_memory_desc_t *md;unsigned long start, end;void *p;
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
thompsy <[email protected]> wrote:
[arch/i386/kernel/efi.c:efi_memmap_walk() uninitialized access]
Quoted 2 lines
The patch initialises the prev struct as it gets checked before being initialised later in the code. This removes the warning generated by gcc.
Please provide a description where/when uninitialized access occurs. I looked at the code and couldn't find any.
Florian
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
Quoted 6 lines · Florian Westphal
thompsy <[email protected]> wrote:
[arch/i386/kernel/efi.c:efi_memmap_walk() uninitialized access]Quoted 2 lines
The patch initialises the prev struct as it gets checked before being initialised later in the code. This removes the warning generated by gcc.
Quoted 9 lines
Please provide a description where/when uninitialized access occurs. I looked at the code and couldn't find any.
Florian
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
I just looked again and noticed my mistake. I missed the initialisation from curr, d'oh. I'll try to be more careful next time.
Thanks for looking
--
Andrew Thompson
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors