From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28E93C77B7C for ; Wed, 26 Apr 2023 01:22:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 79F676B0074; Tue, 25 Apr 2023 21:22:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 750736B0075; Tue, 25 Apr 2023 21:22:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 63E5A6B0078; Tue, 25 Apr 2023 21:22:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 54A226B0074 for ; Tue, 25 Apr 2023 21:22:15 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 206941C6784 for ; Wed, 26 Apr 2023 01:22:15 +0000 (UTC) X-FDA: 80721791430.12.C1DF7D5 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf28.hostedemail.com (Postfix) with ESMTP id E108EC0003 for ; Wed, 26 Apr 2023 01:22:12 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="lOr2OXs/"; spf=pass (imf28.hostedemail.com: domain of lkp@intel.com designates 134.134.136.20 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682472133; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rnt5xD80XdIJDK2SIWMkLManCml1HfH6Rjvm89wyh4Y=; b=aSh7oL+OAUb9nbiKyJl3FQZiB+sV69MagdNTuVa3/7ai3+v3ZuFP2S7JQwZvv4P7+BXUeN N8TSF5xriRpNzO4bxDwA8P4NG+xKGfzliwTp0cFlsobSfbYqr6vwfsJQcPcLlPjbessml9 hf5gJZUe/O7RkKKYli1IaytfMJODsJg= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="lOr2OXs/"; spf=pass (imf28.hostedemail.com: domain of lkp@intel.com designates 134.134.136.20 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682472133; a=rsa-sha256; cv=none; b=CXtVADhPn98sZiR+mu+k8K/AFtiEifZ7OZp9LY6VQDi4KJKlqpUNxh2zUEUgq5yosslnUi IBBQi/WlqvWPE9Bl/XEBCEYtEZNqMpg5r0gk3SWfcoN3w74F3GnT4sLQBpRU2/XlO/f4ph PKTX/a+4qfnNnwTMy0aqCjTtVwCPqK4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682472133; x=1714008133; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3AcK52L7rx9goG6cAWOkQxklzraiSoyB+m6ahkCeIqc=; b=lOr2OXs/QzhW+ggiGv9lN42qnfKaQ9E07rMx6DGpN4JXh1kzdSpSMHYg tidc2jkfTlWle9AxInncef3Px2FjlqebDKMKkhzlRYp/KTsBjN0YRApJY e612vSFt+YPR0K9qnDJQYlVnashyibNVmwZ5BThy+Cz2xPa3h7ETHl44U RMguQrG0QdwA77I31+swHKxJlOqiHmUkGWsv4W+msXsCCII8zG7l9ouI4 Qh7YcOBI0/eqeO4UtP0SikCkMNC9Nd+AsntaoFOLxKh4qtlOo6/LzXYgi QHOfihDL+rk86OzAY1qf21sptJkT5zgSAg8yvsPE5l3hBkwKeL/iXnAzf g==; X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="335857575" X-IronPort-AV: E=Sophos;i="5.99,227,1677571200"; d="scan'208";a="335857575" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2023 18:22:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="817928243" X-IronPort-AV: E=Sophos;i="5.99,227,1677571200"; d="scan'208";a="817928243" Received: from lkp-server01.sh.intel.com (HELO b613635ddfff) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 25 Apr 2023 18:22:08 -0700 Received: from kbuild by b613635ddfff with local (Exim 4.96) (envelope-from ) id 1prTrE-000jwa-0c; Wed, 26 Apr 2023 01:22:08 +0000 Date: Wed, 26 Apr 2023 09:21:12 +0800 From: kernel test robot To: "Liam R. Howlett" , Andrew Morton Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, "Liam R. Howlett" Subject: Re: [PATCH 27/34] maple_tree: Introduce mas_next_slot() interface Message-ID: <202304260907.iHgOR74J-lkp@intel.com> References: <20230425140955.3834476-28-Liam.Howlett@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230425140955.3834476-28-Liam.Howlett@oracle.com> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: E108EC0003 X-Stat-Signature: fbusczagrqph8qohpt5nhufthbxepu8s X-Rspam-User: X-HE-Tag: 1682472132-819171 X-HE-Meta: U2FsdGVkX1/bsyRcvykw0yDfC5+9XjbIHe1e//nhWV24u7wxpV48TyGrKvl6+yZVrioA6vaFbL1iYZcvL5+s6ojuLWPVU2nRu0GS8C6kmCFyYsaJBacLY8vPTj09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ytU5JKZeKGVt0hvPveysm9qcapwb8olmVKrg4zj85pqpgTeMXni4sGt3QTp+WEFvjQxqBt4nJxWXV3FW6yAtcMYoFx1aEc8IvcWH2zTZpwILFOk4dSkOmsdfW0uosfOjfnG4UwDrRxG1jXHksWuUeHnRqbX47wApbhS5/wsQ15vKjSJA9U+y9ACmQo5azw98kcHqzS/ttkLbTS9gV1ap9LkrlmTA+H/bK5LK8S2uf7tkUsegUj64JIKxBe3WvnIXB8U1jtbPqehmHxe7FTAAFszkuE/kKLGDzg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Liam, kernel test robot noticed the following build warnings: [auto build test WARNING on akpm-mm/mm-everything] [also build test WARNING on linus/master v6.3 next-20230425] [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: x86_64-randconfig-a003-20230424 (https://download.01.org/0day-ci/archive/20230426/202304260907.iHgOR74J-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=x86_64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202304260907.iHgOR74J-lkp@intel.com/ All 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 +4710 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 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests