From: kernel test robot <lkp@intel.com>
To: Lin Chun Yeh <r09921093@g.ntu.edu.tw>, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Lin Chun Yeh <r09921093@g.ntu.edu.tw>
Subject: Re: [PATCH] include/linux/rbtree.h: move the declaration of c in rb_find_add()
Date: Wed, 19 Apr 2023 02:00:05 +0800 [thread overview]
Message-ID: <202304190113.SlgVhTbO-lkp@intel.com> (raw)
In-Reply-To: <20230418145712.20620-1-r09921093@g.ntu.edu.tw>
Hi Lin,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on v6.3-rc7 next-20230417]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Lin-Chun-Yeh/include-linux-rbtree-h-move-the-declaration-of-c-in-rb_find_add/20230418-230031
patch link: https://lore.kernel.org/r/20230418145712.20620-1-r09921093%40g.ntu.edu.tw
patch subject: [PATCH] include/linux/rbtree.h: move the declaration of c in rb_find_add()
config: riscv-randconfig-r042-20230416 (https://download.01.org/0day-ci/archive/20230419/202304190113.SlgVhTbO-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 12.1.0
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
# https://github.com/intel-lab-lkp/linux/commit/9348e5c71c46a8d88c805acf5dd56c1785bc04e8
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Lin-Chun-Yeh/include-linux-rbtree-h-move-the-declaration-of-c-in-rb_find_add/20230418-230031
git checkout 9348e5c71c46a8d88c805acf5dd56c1785bc04e8
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash lib/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304190113.SlgVhTbO-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/mm_types.h:11,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from lib/test_bitops.c:9:
include/linux/rbtree.h: In function 'rb_find_add':
>> include/linux/rbtree.h:231:17: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
231 | int c = cmp(node, parent);
| ^~~
cc1: all warnings being treated as errors
vim +231 include/linux/rbtree.h
212
213 /**
214 * rb_find_add() - find equivalent @node in @tree, or add @node
215 * @node: node to look-for / insert
216 * @tree: tree to search / modify
217 * @cmp: operator defining the node order
218 *
219 * Returns the rb_node matching @node, or NULL when no match is found and @node
220 * is inserted.
221 */
222 static __always_inline struct rb_node *
223 rb_find_add(struct rb_node *node, struct rb_root *tree,
224 int (*cmp)(struct rb_node *, const struct rb_node *))
225 {
226 struct rb_node **link = &tree->rb_node;
227 struct rb_node *parent = NULL;
228
229 while (*link) {
230 parent = *link;
> 231 int c = cmp(node, parent);
232
233 if (c < 0)
234 link = &parent->rb_left;
235 else if (c > 0)
236 link = &parent->rb_right;
237 else
238 return parent;
239 }
240
241 rb_link_node(node, parent, link);
242 rb_insert_color(node, tree);
243 return NULL;
244 }
245
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-04-18 18:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 14:57 [PATCH] include/linux/rbtree.h: move the declaration of c in rb_find_add() Lin Chun Yeh
2023-04-18 17:49 ` kernel test robot
2023-04-18 17:49 ` kernel test robot
2023-04-18 18:00 ` kernel test robot [this message]
2023-04-18 19:12 ` kernel test robot
2023-04-19 3:54 ` kernel test robot
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=202304190113.SlgVhTbO-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=r09921093@g.ntu.edu.tw \
/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