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 B56CEC77B7E for ; Fri, 28 Apr 2023 08:39:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 13F276B0071; Fri, 28 Apr 2023 04:39:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0C77C6B0072; Fri, 28 Apr 2023 04:39:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E83676B0074; Fri, 28 Apr 2023 04:39:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D56F36B0071 for ; Fri, 28 Apr 2023 04:39:35 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 8DB61AD217 for ; Fri, 28 Apr 2023 08:39:35 +0000 (UTC) X-FDA: 80730151110.19.BCBB111 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by imf26.hostedemail.com (Postfix) with ESMTP id 43118140014 for ; Fri, 28 Apr 2023 08:39:32 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=F8PsifZI; spf=pass (imf26.hostedemail.com: domain of lkp@intel.com designates 134.134.136.126 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=1682671173; 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=IUejrX9vym7Er6OJ0E258MAGPuoDY1BFHQp/wQ9DHyU=; b=joqahL0QLI32mnkhK70ff3QZtZlG21ZnRMDCmORB5dLRHDdiVYvScde8c1V/TpqLZgTKUj rFcmm6HvAe4BtsNwPsbHRtdj31LGcG/YjyO06yTq/bZjNWS9bu6e5n/WWnPpQi0kT+ja4c 3VMiKx/7ZpdXDYjZyqVWU8ky1fgGtHM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682671173; a=rsa-sha256; cv=none; b=JiOTyGdIFXXLuZYJgBkuXd9JhhMwo6vzOLwkQ3HYRCP64VIonVmn1iguzXpDrO6KvEGQyS m8r7twvwZ9qVvTqq2BC+0D95XM33TXPZVpBJKstLZXbytoBHjPwRHTR43SMFMaQhIemIwi ArpqiVdMdcWo3lGSAQOr/lalnSpOrKE= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=F8PsifZI; spf=pass (imf26.hostedemail.com: domain of lkp@intel.com designates 134.134.136.126 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682671172; x=1714207172; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Q4gh97dpYLmdt332irgmsGH23Tzt8243yUTSoJpwPEU=; b=F8PsifZIdGn1OpGMcfkkjezllyDVwDUyj1RrSkOZ/W38p2BEHmYbx34V 8WDfsMS/gETwB6jPX2S6/4ZXNWT4B3wG4X0lpgiSgwBks2EgJxVC/wTlj /NaZU0lkhKRsQ/O2wPjkb7iShJES7AZ2yAMzh4ooq9NPHGvijnJxFFAqf DJsp0mcoMA+pO1ZzblKhte0I7q57C+Qh3ckGik5TXSVjujS/vn248+pFD srrtE55RlIOVZsp32kojzs10fg0kPI3kYr5ueAV8OktD0t7WqyW8bFjF/ 8HMApH4KMZxd6c6uHLIyGMAgIv4WSeXUVhg/RFvqz/6tBAGovgdJwmft8 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="331992519" X-IronPort-AV: E=Sophos;i="5.99,234,1677571200"; d="scan'208";a="331992519" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2023 01:39:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="818924522" X-IronPort-AV: E=Sophos;i="5.99,234,1677571200"; d="scan'208";a="818924522" Received: from lkp-server01.sh.intel.com (HELO 5bad9d2b7fcb) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 28 Apr 2023 01:39:28 -0700 Received: from kbuild by 5bad9d2b7fcb with local (Exim 4.96) (envelope-from ) id 1psJdX-0000JR-1B; Fri, 28 Apr 2023 08:39:27 +0000 Date: Fri, 28 Apr 2023 16:39:11 +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: <202304281651.cfC6scj6-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-Rspam-User: X-Rspamd-Queue-Id: 43118140014 X-Rspamd-Server: rspam09 X-Stat-Signature: xsbgampqupcztu8eadkwtiansaxt3336 X-HE-Tag: 1682671172-235017 X-HE-Meta: U2FsdGVkX1+BY7l4odc3sTdv54/xmj84DP8TKa5rnjg6JC3icgxXV0n3x4ddw3bR15W1Ry38t8p4vEYH0jPKSVOS+YpQGl7Uo0H5fMDDY/rD2IKwp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dlyfrGvZt5oJTEZ4ohadiJBnT8jaZbFpqiZbDBxf4ZotNv4s8EE7WbJCvz0GxG/MHHIMX8Rqkz5ia+Fp2RY+RI0jGAZZLT1rjDscfy10Y+23BChy7x+GCLCHMU/8xTW0DmcVnS8b9hh/urhp/kdomiLNmTG34EVt7SXmgp+gVn5oPpxhzTb+q1BSMz8s6s067BYznzb+MivG4AyrhpVlVc5vLqp56O7W2JiI5mjebTIaf9a8UTmqDNZ5DhkAT3CjTrjydRGnuWSJc2ev8nJKVQ9nwXfFNGXYIGIWlJp55myWd80A== 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 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 | 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