All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>
Subject: Re: [PATCH 27/34] maple_tree: Introduce mas_next_slot() interface
Date: Fri, 28 Apr 2023 16:39:11 +0800	[thread overview]
Message-ID: <202304281651.cfC6scj6-lkp@intel.com> (raw)
In-Reply-To: <20230425140955.3834476-28-Liam.Howlett@oracle.com>

Hi Liam,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on linus/master v6.3 next-20230427]
[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/Liam-R-Howlett/maple_tree-Fix-static-analyser-cppcheck-issue/20230425-233958
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20230425140955.3834476-28-Liam.Howlett%40oracle.com
patch subject: [PATCH 27/34] maple_tree: Introduce mas_next_slot() interface
config: i386-randconfig-a005-20230424 (https://download.01.org/0day-ci/archive/20230428/202304281651.cfC6scj6-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/0e736b8a8054e7f0b216320d2458a00b54fcd2b0
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Liam-R-Howlett/maple_tree-Fix-static-analyser-cppcheck-issue/20230425-233958
        git checkout 0e736b8a8054e7f0b216320d2458a00b54fcd2b0
        # 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=i386 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 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/202304281651.cfC6scj6-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   lib/maple_tree.c:4710:7: warning: no previous prototype for function 'mas_next_slot' [-Wmissing-prototypes]
   void *mas_next_slot(struct ma_state *mas, unsigned long max)
         ^
   lib/maple_tree.c:4710:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void *mas_next_slot(struct ma_state *mas, unsigned long max)
   ^
   static 
>> lib/maple_tree.c:4780:10: error: implicit declaration of function 'mas_next_slot_limit' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           entry = mas_next_slot_limit(mas, limit);
                   ^
   lib/maple_tree.c:4780:10: note: did you mean 'mas_next_slot'?
   lib/maple_tree.c:4710:7: note: 'mas_next_slot' declared here
   void *mas_next_slot(struct ma_state *mas, unsigned long max)
         ^
>> lib/maple_tree.c:4780:8: warning: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
           entry = mas_next_slot_limit(mas, limit);
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> lib/maple_tree.c:4787:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'void *' [-Wint-conversion]
           return mas_next_slot_limit(mas, limit);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   3 warnings and 1 error generated.


vim +/mas_next_slot_limit +4780 lib/maple_tree.c

  4701	
  4702	/*
  4703	 * mas_next_slot() - Get the entry in the next slot
  4704	 *
  4705	 * @mas: The maple state
  4706	 * @max: The maximum starting range
  4707	 *
  4708	 * Return: The entry in the next slot which is possibly NULL
  4709	 */
> 4710	void *mas_next_slot(struct ma_state *mas, unsigned long max)
  4711	{
  4712		void __rcu **slots;
  4713		unsigned long *pivots;
  4714		unsigned long pivot;
  4715		enum maple_type type;
  4716		struct maple_node *node;
  4717		unsigned char data_end;
  4718		unsigned long save_point = mas->last;
  4719		void *entry;
  4720	
  4721	retry:
  4722		node = mas_mn(mas);
  4723		type = mte_node_type(mas->node);
  4724		pivots = ma_pivots(node, type);
  4725		data_end = ma_data_end(node, type, pivots, mas->max);
  4726		pivot = mas_logical_pivot(mas, pivots, mas->offset, type);
  4727		if (unlikely(mas_rewalk_if_dead(mas, node, save_point)))
  4728			goto retry;
  4729	
  4730		if (pivot >= max)
  4731			return NULL;
  4732	
  4733		if (likely(data_end > mas->offset)) {
  4734			mas->offset++;
  4735			mas->index = mas->last + 1;
  4736		} else  {
  4737			if (mas_next_node(mas, node, max)) {
  4738				mas_rewalk(mas, save_point);
  4739				goto retry;
  4740			}
  4741	
  4742			if (mas_is_none(mas))
  4743				return NULL;
  4744	
  4745			mas->offset = 0;
  4746			mas->index = mas->min;
  4747			node = mas_mn(mas);
  4748			type = mte_node_type(mas->node);
  4749			pivots = ma_pivots(node, type);
  4750		}
  4751	
  4752		slots = ma_slots(node, type);
  4753		mas->last = mas_logical_pivot(mas, pivots, mas->offset, type);
  4754		entry = mas_slot(mas, slots, mas->offset);
  4755		if (unlikely(mas_rewalk_if_dead(mas, node, save_point)))
  4756			goto retry;
  4757	
  4758		return entry;
  4759	}
  4760	
  4761	/*
  4762	 * mas_next_entry() - Internal function to get the next entry.
  4763	 * @mas: The maple state
  4764	 * @limit: The maximum range start.
  4765	 *
  4766	 * Set the @mas->node to the next entry and the range_start to
  4767	 * the beginning value for the entry.  Does not check beyond @limit.
  4768	 * Sets @mas->index and @mas->last to the limit if it is hit.
  4769	 * Restarts on dead nodes.
  4770	 *
  4771	 * Return: the next entry or %NULL.
  4772	 */
  4773	static inline void *mas_next_entry(struct ma_state *mas, unsigned long limit)
  4774	{
  4775		void *entry = NULL;
  4776	
  4777		if (mas->last >= limit)
  4778			return NULL;
  4779	
> 4780		entry = mas_next_slot_limit(mas, limit);
  4781		if (entry)
  4782			return entry;
  4783	
  4784		if (mas_is_none(mas))
  4785			return NULL;
  4786	
> 4787		return mas_next_slot_limit(mas, limit);
  4788	}
  4789	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

  parent reply	other threads:[~2023-04-28  8:39 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 14:09 [PATCH 00/34] Maple tree mas_{next,prev}_range() and cleanup Liam R. Howlett
2023-04-25 14:09 ` [PATCH 01/34] maple_tree: Fix static analyser cppcheck issue Liam R. Howlett
2023-04-26  4:06   ` Peng Zhang
2023-04-25 14:09 ` [PATCH 02/34] maple_tree: Clean up mas_parent_enum() Liam R. Howlett
2023-04-25 16:13   ` Wei Yang
2023-04-26  4:14   ` Peng Zhang
2023-04-26 21:07     ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 03/34] maple_tree: Avoid unnecessary ascending Liam R. Howlett
2023-04-26  5:27   ` Peng Zhang
2023-04-25 14:09 ` [PATCH 04/34] maple_tree: Clean up mas_dfs_postorder() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 05/34] maple_tree: Add format option to mt_dump() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 06/34] maple_tree: Add debug BUG_ON and WARN_ON variants Liam R. Howlett
2023-04-25 14:09 ` [PATCH 07/34] maple_tree: Convert BUG_ON() to MT_BUG_ON() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 08/34] maple_tree: Change RCU checks to WARN_ON() instead of BUG_ON() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 09/34] maple_tree: Convert debug code to use MT_WARN_ON() and MAS_WARN_ON() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 10/34] maple_tree: Use MAS_BUG_ON() when setting a leaf node as a parent Liam R. Howlett
2023-04-28 10:08   ` Petr Tesařík
2023-05-03 19:31     ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 11/34] maple_tree: Use MAS_BUG_ON() in mas_set_height() Liam R. Howlett
2023-04-28 10:10   ` Petr Tesařík
2023-05-03 19:33     ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 12/34] maple_tree: Use MAS_BUG_ON() from mas_topiary_range() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 13/34] maple_tree: Use MAS_WR_BUG_ON() in mas_store_prealloc() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 14/34] maple_tree: Use MAS_BUG_ON() prior to calling mas_meta_gap() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 15/34] maple_tree: Return error on mte_pivots() out of range Liam R. Howlett
2023-04-26  9:55   ` Peng Zhang
2023-04-25 14:09 ` [PATCH 16/34] maple_tree: Make test code work without debug enabled Liam R. Howlett
2023-04-26  3:23   ` kernel test robot
2023-04-25 14:09 ` [PATCH 17/34] mm: Update validate_mm() to use vma iterator Liam R. Howlett
2023-04-25 14:09 ` [PATCH 18/34] mm: Update vma_iter_store() to use MAS_WARN_ON() Liam R. Howlett
2023-04-27  1:07   ` Sergey Senozhatsky
2023-04-27  1:17     ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 19/34] maple_tree: Add __init and __exit to test module Liam R. Howlett
2023-04-25 14:09 ` [PATCH 20/34] maple_tree: Remove unnecessary check from mas_destroy() Liam R. Howlett
2023-04-26  9:59   ` Peng Zhang
2023-04-25 14:09 ` [PATCH 21/34] maple_tree: mas_start() reset depth on dead node Liam R. Howlett
2023-04-28  2:45   ` Peng Zhang
2023-04-25 14:09 ` [PATCH 22/34] mm/mmap: Change do_vmi_align_munmap() for maple tree iterator changes Liam R. Howlett
2023-04-25 14:09 ` [PATCH 23/34] maple_tree: Try harder to keep active node after mas_next() Liam R. Howlett
2023-05-04  2:44   ` kernel test robot
2023-04-25 14:09 ` [PATCH 24/34] maple_tree: Try harder to keep active node with mas_prev() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 25/34] maple_tree: Clear up index and last setting in single entry tree Liam R. Howlett
2023-04-27 11:19   ` Peng Zhang
2023-04-27 17:25     ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 26/34] maple_tree: Update testing code for mas_{next,prev,walk} Liam R. Howlett
2023-05-04  3:33   ` Peng Zhang
2023-05-04 18:50     ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 27/34] maple_tree: Introduce mas_next_slot() interface Liam R. Howlett
2023-04-26  1:21   ` kernel test robot
2023-04-26 13:16   ` kernel test robot
2023-04-28  6:48   ` Peng Zhang
2023-05-03 19:31     ` Liam R. Howlett
2023-04-28  8:39   ` kernel test robot [this message]
2023-04-25 14:09 ` [PATCH 28/34] maple_tree: Revise limit checks in mas_empty_area{_rev}() Liam R. Howlett
2023-04-28  7:06   ` Peng Zhang
2023-04-25 14:09 ` [PATCH 29/34] maple_tree: Introduce mas_prev_slot() interface Liam R. Howlett
2023-04-28  8:27   ` Peng Zhang
2023-05-03 19:29     ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 30/34] maple_tree: Fix comments for mas_next_entry() and mas_prev_entry() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 31/34] maple_tree: Add mas_next_range() and mas_find_range() interfaces Liam R. Howlett
2023-04-25 14:09 ` [PATCH 32/34] maple_tree: Add mas_prev_range() and mas_find_range_rev interface Liam R. Howlett
2023-04-25 14:09 ` [PATCH 33/34] maple_tree: Add testing for mas_{prev,next}_range() Liam R. Howlett
2023-04-26  1:41   ` kernel test robot
2023-05-05 17:11     ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 34/34] mm: Add vma_iter_{next,prev}_range() to vma iterator Liam R. 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=202304281651.cfC6scj6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=maple-tree@lists.infradead.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.