CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Masami Hiramatsu <[email protected]>
CC: "Steven Rostedt (VMware)" <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   2376e5fe91bcad74b997d2cc0535abff79ec73c5
commit: f3668cde8562997b47a9edbc915da32279d4a743 [6034/11483] bootconfig: Split 
parse-tree part from xbc_init
:::::: branch date: 6 hours ago
:::::: commit date: 2 weeks ago
config: openrisc-randconfig-m031-20211019 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
lib/bootconfig.c:851 xbc_parse_tree() error: uninitialized symbol 'ret'.

Old smatch warnings:
lib/bootconfig.c:853 xbc_parse_tree() error: uninitialized symbol 'ret'.

vim +/ret +851 lib/bootconfig.c

76db5a27a827c2 Masami Hiramatsu 2020-01-11  803  
f3668cde856299 Masami Hiramatsu 2021-09-17  804  /* Need to setup xbc_data and 
xbc_nodes before call this. */
f3668cde856299 Masami Hiramatsu 2021-09-17  805  static int __init 
xbc_parse_tree(void)
f3668cde856299 Masami Hiramatsu 2021-09-17  806  {
f3668cde856299 Masami Hiramatsu 2021-09-17  807         char *p, *q;
f3668cde856299 Masami Hiramatsu 2021-09-17  808         int ret, c;
f3668cde856299 Masami Hiramatsu 2021-09-17  809  
f3668cde856299 Masami Hiramatsu 2021-09-17  810         last_parent = NULL;
f3668cde856299 Masami Hiramatsu 2021-09-17  811         p = xbc_data;
f3668cde856299 Masami Hiramatsu 2021-09-17  812         do {
f3668cde856299 Masami Hiramatsu 2021-09-17  813                 q = strpbrk(p, 
"{}=+;:\n#");
f3668cde856299 Masami Hiramatsu 2021-09-17  814                 if (!q) {
f3668cde856299 Masami Hiramatsu 2021-09-17  815                         p = 
skip_spaces(p);
f3668cde856299 Masami Hiramatsu 2021-09-17  816                         if (*p 
!= '\0')
f3668cde856299 Masami Hiramatsu 2021-09-17  817                                 
ret = xbc_parse_error("No delimiter", p);
f3668cde856299 Masami Hiramatsu 2021-09-17  818                         break;
f3668cde856299 Masami Hiramatsu 2021-09-17  819                 }
f3668cde856299 Masami Hiramatsu 2021-09-17  820  
f3668cde856299 Masami Hiramatsu 2021-09-17  821                 c = *q;
f3668cde856299 Masami Hiramatsu 2021-09-17  822                 *q++ = '\0';
f3668cde856299 Masami Hiramatsu 2021-09-17  823                 switch (c) {
f3668cde856299 Masami Hiramatsu 2021-09-17  824                 case ':':
f3668cde856299 Masami Hiramatsu 2021-09-17  825                 case '+':
f3668cde856299 Masami Hiramatsu 2021-09-17  826                         if 
(*q++ != '=') {
f3668cde856299 Masami Hiramatsu 2021-09-17  827                                 
ret = xbc_parse_error(c == '+' ?
f3668cde856299 Masami Hiramatsu 2021-09-17  828                                 
                "Wrong '+' operator" :
f3668cde856299 Masami Hiramatsu 2021-09-17  829                                 
                "Wrong ':' operator",
f3668cde856299 Masami Hiramatsu 2021-09-17  830                                 
                        q - 2);
f3668cde856299 Masami Hiramatsu 2021-09-17  831                                 
break;
f3668cde856299 Masami Hiramatsu 2021-09-17  832                         }
f3668cde856299 Masami Hiramatsu 2021-09-17  833                         
fallthrough;
f3668cde856299 Masami Hiramatsu 2021-09-17  834                 case '=':
f3668cde856299 Masami Hiramatsu 2021-09-17  835                         ret = 
xbc_parse_kv(&p, q, c);
f3668cde856299 Masami Hiramatsu 2021-09-17  836                         break;
f3668cde856299 Masami Hiramatsu 2021-09-17  837                 case '{':
f3668cde856299 Masami Hiramatsu 2021-09-17  838                         ret = 
xbc_open_brace(&p, q);
f3668cde856299 Masami Hiramatsu 2021-09-17  839                         break;
f3668cde856299 Masami Hiramatsu 2021-09-17  840                 case '#':
f3668cde856299 Masami Hiramatsu 2021-09-17  841                         q = 
skip_comment(q);
f3668cde856299 Masami Hiramatsu 2021-09-17  842                         
fallthrough;
f3668cde856299 Masami Hiramatsu 2021-09-17  843                 case ';':
f3668cde856299 Masami Hiramatsu 2021-09-17  844                 case '\n':
f3668cde856299 Masami Hiramatsu 2021-09-17  845                         ret = 
xbc_parse_key(&p, q);
f3668cde856299 Masami Hiramatsu 2021-09-17  846                         break;
f3668cde856299 Masami Hiramatsu 2021-09-17  847                 case '}':
f3668cde856299 Masami Hiramatsu 2021-09-17  848                         ret = 
xbc_close_brace(&p, q);
f3668cde856299 Masami Hiramatsu 2021-09-17  849                         break;
f3668cde856299 Masami Hiramatsu 2021-09-17  850                 }
f3668cde856299 Masami Hiramatsu 2021-09-17 @851         } while (!ret);
f3668cde856299 Masami Hiramatsu 2021-09-17  852  
f3668cde856299 Masami Hiramatsu 2021-09-17  853         return ret;
f3668cde856299 Masami Hiramatsu 2021-09-17  854  }
f3668cde856299 Masami Hiramatsu 2021-09-17  855  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to