Re: [linux-next:master 9793/10134] drivers/of/of_reserved_mem.c:465:6: warning: variable 'nomap' is uninitialized when used here

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rob,

On 5/1/2024 6:45 AM, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   f68868ba718e30594165879cc3020607165b0761
> commit: 2acef04ad57cab44b33001542791fc93f81cadf1 [9793/10134] of: reserved_mem: Remove the use of phandle from the reserved_mem APIs
> config: arm-allnoconfig (https://download.01.org/0day-ci/archive/20240501/202405012148.1dCXzomq-lkp@xxxxxxxxx/config)
> compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 37ae4ad0eef338776c7e2cffb3896153d43dcd90)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240501/202405012148.1dCXzomq-lkp@xxxxxxxxx/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202405012148.1dCXzomq-lkp@xxxxxxxxx/
>
> All warnings (new ones prefixed by >>):
>
>    In file included from drivers/of/of_reserved_mem.c:19:
>    In file included from include/linux/mm.h:2208:
>    include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
>      522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
>          |                               ~~~~~~~~~~~ ^ ~~~
>>> drivers/of/of_reserved_mem.c:465:6: warning: variable 'nomap' is uninitialized when used here [-Wuninitialized]
>      465 |                                         nomap ? "nomap" : "map",
>          |                                         ^~~~~
>    include/linux/printk.h:530:34: note: expanded from macro 'pr_info'
>      530 |         printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
>          |                                         ^~~~~~~~~~~
>    include/linux/printk.h:457:60: note: expanded from macro 'printk'
>      457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
>          |                                                            ^~~~~~~~~~~
>    include/linux/printk.h:429:19: note: expanded from macro 'printk_index_wrap'
>      429 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
>          |                                 ^~~~~~~~~~~
>    drivers/of/of_reserved_mem.c:441:13: note: initialize the variable 'nomap' to silence this warning
>      441 |                 bool nomap;
>          |                           ^
>          |                            = 0
>    2 warnings generated.
Would you like me to upload another version to fix this error?
Should just need to undo a one line change I made while I was
restructuring the code.

Regards,

Oreoluwa




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux