From: Liam Howlett <liam.howlett@oracle.com>
To: kernel test robot <lkp@intel.com>
Cc: "llvm@lists.linux.dev" <llvm@lists.linux.dev>,
"kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [linux-next:master 14545/14705] mm/nommu.c:1081:28: warning: variable 'vma' is uninitialized when used here
Date: Thu, 2 Jun 2022 13:41:00 +0000 [thread overview]
Message-ID: <20220602134053.cyuvw7ema33voakf@revolver> (raw)
In-Reply-To: <202206022121.RYk2Zgc9-lkp@intel.com>
* kernel test robot <lkp@intel.com> [220602 09:24]:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 2e776ccffa840ce53ee1c21bde54cbe4bc102c3b
> commit: 32355b99dd92f9751a482463d7e239fa06302bc9 [14545/14705] mm/nommu: move preallocations and limit other allocations
> config: arm-buildonly-randconfig-r004-20220531 (https://download.01.org/0day-ci/archive/20220602/202206022121.RYk2Zgc9-lkp@intel.com/config)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project b364c76683f8ef241025a9556300778c07b590c2)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install arm cross compiling tool for clang build
> # apt-get install binutils-arm-linux-gnueabi
> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=32355b99dd92f9751a482463d7e239fa06302bc9
> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> git fetch --no-tags linux-next master
> git checkout 32355b99dd92f9751a482463d7e239fa06302bc9
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> mm/nommu.c:593:18: error: incompatible pointer types passing 'struct ma_state **' to parameter of type 'struct ma_state *'; remove & [-Werror,-Wincompatible-pointer-types]
> prev = mas_prev(&mas, 0);
> ^~~~
> include/linux/maple_tree.h:468:33: note: passing argument to parameter 'mas' here
> void *mas_prev(struct ma_state *mas, unsigned long min);
> ^
> mm/nommu.c:594:12: error: incompatible pointer types passing 'struct ma_state **' to parameter of type 'struct ma_state *'; remove & [-Werror,-Wincompatible-pointer-types]
> mas_reset(&mas);
> ^~~~
> include/linux/maple_tree.h:505:47: note: passing argument to parameter 'mas' here
> static inline void mas_reset(struct ma_state *mas)
> ^
> >> mm/nommu.c:1081:28: warning: variable 'vma' is uninitialized when used here [-Wuninitialized]
> if (mas_preallocate(&mas, vma, GFP_KERNEL))
mas_preallocate does not currently use this variable, but in the future
it may be that you are storing a NULL which could affect the
preallocations as an optimization. I will fix this by relocating it
below the vma allocation.
> ^~~
> mm/nommu.c:1055:28: note: initialize the variable 'vma' to silence this warning
> struct vm_area_struct *vma;
> ^
> = NULL
> 1 warning and 2 errors generated.
next prev parent reply other threads:[~2022-06-02 13:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 13:24 kernel test robot
2022-06-02 13:41 ` Liam Howlett [this message]
2022-06-02 14:11 ` Liam Howlett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220602134053.cyuvw7ema33voakf@revolver \
--to=liam.howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox