Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp101608rwr; Tue, 25 Apr 2023 18:25:50 -0700 (PDT) X-Google-Smtp-Source: AKy350aLM/cgI+csNYKzBTq8zdgAG6XPhww7pyCfIvPgiHi3itBOK+1uNdMRyQ6ZMPXxSyqiYLSm X-Received: by 2002:a05:6a00:c94:b0:627:f9ac:8a33 with SMTP id a20-20020a056a000c9400b00627f9ac8a33mr23905486pfv.13.1682472349947; Tue, 25 Apr 2023 18:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682472349; cv=none; d=google.com; s=arc-20160816; b=IDq4kV0hxH7WF4QbgjLDF9jb1qkbxvEYWQt0mOqEAlHd13Q2Yh4qC1sJ5vNSf9icTe cmZjg9XwSm0hNJWv2EHliwlOAEPyWnR/Kt9mrdtooKPVk0G94An9IuCrzi25FOyGo6jm fgNH2ciiOeWqta2eipvtdLL1XC7XbfGIce2bQBP96v8eD53ORdPqcWRgt/LfSD2vQGYG Eta0I3O1yknvLaL/BszEkMY+9eM378QVVzNiPnOj5dq74FI05+Iwvi9rbWxhjVQ2jHhi wifag8znIrS3MfgoAExUCvaI7D70orV/nag/6og4NK2AaMwMGckbp/TCTtbvC0ELr7zJ SLvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rnt5xD80XdIJDK2SIWMkLManCml1HfH6Rjvm89wyh4Y=; b=VKsemQDMo6aGk25K8pZFFU9Go6WGuAxhJyMtL+DUt8kNIOMTzFv2cRy1zw2NqAQ+6F HOBtsBUlDnXD1spRpBhiAm7mpfk9ts5jX2YPX4O5ellXE1EoI452nAwaRWVMGbGV8hgM aBAZUA7Jp2W9+Z8Nq7WIW/wFVG9ghV71LtaJT6IVeguQfCq2nLMxkScONhevIgP3H43H PLraKQ7CQ5Ir3TlTmf54cMdlVLI7Rfe1aRMhVnfv4lfQX8hAQoUlfNTIlpKD9jI890af j2ReFh8eMEph4lwRsHz7rJIHJYbBf0n8tRjARbPARt8tG77PbQtro9wvaBe2J+zudnWW QGSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="E/m6B/1u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020aa79ae9000000b0062d9eed7d25si14886444pfp.57.2023.04.25.18.25.39; Tue, 25 Apr 2023 18:25:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="E/m6B/1u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238459AbjDZBWO (ORCPT + 99 others); Tue, 25 Apr 2023 21:22:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233421AbjDZBWN (ORCPT ); Tue, 25 Apr 2023 21:22:13 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 662B1977A for ; Tue, 25 Apr 2023 18:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682472131; x=1714008131; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3AcK52L7rx9goG6cAWOkQxklzraiSoyB+m6ahkCeIqc=; b=E/m6B/1uN2DGMt6lHHb0UXoupnXO6wJ9cDZfcI86r6TzAjM1sIRvAHeM 2NZ3TLRorh2fNEHrkks99sw350IOE8vUs5zzmmTmEKgRljqxX/myws35C eRL3du4WOWnweIM/Pv8v7osfE3BUIzFdtExZYxdhaNAmfJ0006MxchuvU ytD7ZTaQF2O3SEAfgGOlwkMolk8OeF4bITM0ko0b/dIcgEnzuW5wO04Cy morD++9NCbfNLeUMUohccGApCMis82yPlw5QDh0tKRqlohDur4rcEFQ1Y IA2kBhL3m3fug3uLxRZT4OBTx+KooO6uKp+aoCNnyUpsHKHKdVC7aLvkP w==; X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="335857573" X-IronPort-AV: E=Sophos;i="5.99,227,1677571200"; d="scan'208";a="335857573" 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-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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