From: kernel test robot <lkp@intel.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: oe-kbuild-all@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [akpm-mm:mm-unstable 72/80] lib/maple_tree.c:4606:7: warning: no previous prototype for 'mas_prev_slot'
Date: Sat, 6 May 2023 20:54:21 +0800 [thread overview]
Message-ID: <202305062052.NZOXSlsE-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head: f96b65aa15baec616fffdb8f1d4fa3222aa56467
commit: 6a63ac4851b007cce284142f5da19ea4b31a2eee [72/80] maple_tree: introduce mas_prev_slot() interface
config: arc-randconfig-r043-20230502 (https://download.01.org/0day-ci/archive/20230506/202305062052.NZOXSlsE-lkp@intel.com/config)
compiler: arceb-elf-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://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=6a63ac4851b007cce284142f5da19ea4b31a2eee
git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git
git fetch --no-tags akpm-mm mm-unstable
git checkout 6a63ac4851b007cce284142f5da19ea4b31a2eee
# 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=arc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash
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/202305062052.NZOXSlsE-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> lib/maple_tree.c:4606:7: warning: no previous prototype for 'mas_prev_slot' [-Wmissing-prototypes]
4606 | void *mas_prev_slot(struct ma_state *mas, unsigned long min, bool empty)
| ^~~~~~~~~~~~~
lib/maple_tree.c:4758:7: warning: no previous prototype for 'mas_next_slot' [-Wmissing-prototypes]
4758 | void *mas_next_slot(struct ma_state *mas, unsigned long max, bool empty)
| ^~~~~~~~~~~~~
vim +/mas_prev_slot +4606 lib/maple_tree.c
4597
4598 /*
4599 * mas_prev_slot() - Get the entry in the previous slot
4600 *
4601 * @mas: The maple state
4602 * @max: The minimum starting range
4603 *
4604 * Return: The entry in the previous slot which is possibly NULL
4605 */
> 4606 void *mas_prev_slot(struct ma_state *mas, unsigned long min, bool empty)
4607 {
4608 void *entry;
4609 void __rcu **slots;
4610 unsigned long pivot;
4611 enum maple_type type;
4612 unsigned long *pivots;
4613 struct maple_node *node;
4614 unsigned long save_point = mas->index;
4615
4616 retry:
4617 node = mas_mn(mas);
4618 type = mte_node_type(mas->node);
4619 pivots = ma_pivots(node, type);
4620 if (unlikely(mas_rewalk_if_dead(mas, node, save_point)))
4621 goto retry;
4622
4623 again:
4624 if (mas->min <= min) {
4625 pivot = mas_safe_min(mas, pivots, mas->offset);
4626
4627 if (unlikely(mas_rewalk_if_dead(mas, node, save_point)))
4628 goto retry;
4629
4630 if (pivot <= min)
4631 return NULL;
4632 }
4633
4634 if (likely(mas->offset)) {
4635 mas->offset--;
4636 mas->last = mas->index - 1;
4637 mas->index = mas_safe_min(mas, pivots, mas->offset);
4638 } else {
4639 if (mas_prev_node(mas, min)) {
4640 mas_rewalk(mas, save_point);
4641 goto retry;
4642 }
4643
4644 if (mas_is_none(mas))
4645 return NULL;
4646
4647 mas->last = mas->max;
4648 node = mas_mn(mas);
4649 type = mte_node_type(mas->node);
4650 pivots = ma_pivots(node, type);
4651 mas->index = pivots[mas->offset - 1] + 1;
4652 }
4653
4654 slots = ma_slots(node, type);
4655 entry = mas_slot(mas, slots, mas->offset);
4656 if (unlikely(mas_rewalk_if_dead(mas, node, save_point)))
4657 goto retry;
4658
4659 if (likely(entry))
4660 return entry;
4661
4662 if (!empty)
4663 goto again;
4664
4665 return entry;
4666 }
4667
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-05-06 12:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202305062052.NZOXSlsE-lkp@intel.com \
--to=lkp@intel.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.