* [PATCH] mm/vmalloc: fix a compile warning in mm
@ 2019-06-24 5:09 Weitao Hou
2019-06-24 9:41 ` Uladzislau Rezki
0 siblings, 1 reply; 2+ messages in thread
From: Weitao Hou @ 2019-06-24 5:09 UTC (permalink / raw)
To: akpm, urezki, rpenyaev, guro, rick.p.edgecombe, rppt, aryabinin
Cc: linux-mm, linux-kernel, Weitao Hou
mm/vmalloc.c: In function ‘pcpu_get_vm_areas’:
mm/vmalloc.c:976:4: warning: ‘lva’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
insert_vmap_area_augment(lva, &va->rb_node,
Signed-off-by: Weitao Hou <houweitaoo@gmail.com>
---
mm/vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 4c9e150e5ad3..78c5617fdf3f 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -913,7 +913,7 @@ adjust_va_to_fit_type(struct vmap_area *va,
unsigned long nva_start_addr, unsigned long size,
enum fit_type type)
{
- struct vmap_area *lva;
+ struct vmap_area *lva = NULL;
if (type == FL_FIT_TYPE) {
/*
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mm/vmalloc: fix a compile warning in mm
2019-06-24 5:09 [PATCH] mm/vmalloc: fix a compile warning in mm Weitao Hou
@ 2019-06-24 9:41 ` Uladzislau Rezki
0 siblings, 0 replies; 2+ messages in thread
From: Uladzislau Rezki @ 2019-06-24 9:41 UTC (permalink / raw)
To: Weitao Hou
Cc: Andrew Morton, Roman Penyaev, Roman Gushchin, Rick Edgecombe,
Mike Rapoport, Andrey Ryabinin, Linux Memory Management List,
LKML
Hello, Hou.
It has already been fixed. Please have a look at:
https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmalloc-avoid-bogus-wmaybe-uninitialized-warning.patch
https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmalloc-avoid-bogus-wmaybe-uninitialized-warning-fix.patch
--
Vlad Rezki
On Mon, Jun 24, 2019 at 7:09 AM Weitao Hou <houweitaoo@gmail.com> wrote:
>
> mm/vmalloc.c: In function ‘pcpu_get_vm_areas’:
> mm/vmalloc.c:976:4: warning: ‘lva’ may be used uninitialized in
> this function [-Wmaybe-uninitialized]
> insert_vmap_area_augment(lva, &va->rb_node,
>
> Signed-off-by: Weitao Hou <houweitaoo@gmail.com>
> ---
> mm/vmalloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 4c9e150e5ad3..78c5617fdf3f 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -913,7 +913,7 @@ adjust_va_to_fit_type(struct vmap_area *va,
> unsigned long nva_start_addr, unsigned long size,
> enum fit_type type)
> {
> - struct vmap_area *lva;
> + struct vmap_area *lva = NULL;
>
> if (type == FL_FIT_TYPE) {
> /*
> --
> 2.18.0
>
--
Uladzislau Rezki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-24 9:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-24 5:09 [PATCH] mm/vmalloc: fix a compile warning in mm Weitao Hou
2019-06-24 9:41 ` Uladzislau Rezki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).