From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3006215C8 for ; Sun, 5 Feb 2023 04:05:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675569912; x=1707105912; h=date:from:to:cc:subject:message-id:mime-version; bh=P/EVP7WCyB67Np8wJ0RlWi2rZzsKwgCYu+b8oqpVQE4=; b=CjAuRkZh2pukFaJHLYstSTa4mQhWPuUbxiLSmfw5+ORkeoNa7/yYZC9u c3yO9/PxXqzMrF4uOb3TdaL4F/wY37lxKZUxaxPIyh8esfRujUjvNBzpk 7SyYG2k6f71aWMgGHDRqx5AOXLVphByExwg/wDQ/bxTGNbzdi79KaypTe yvHfnl2BCwn6bzDt/hzaRdqOQ8k4Jl4vjaL/tx9op4LNfUXNkzDGrMdhU strJpHAPww8RMtdVWLz64CnwmlvWqV15YgA1IAj3jdJVTc+bJ1GZ78xld wBGhOX/JNiVXpFTy7NJWTgEwAukTVMVL+dWH+R77HdTvnKSFlbDB2r+kR Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10611"; a="309351245" X-IronPort-AV: E=Sophos;i="5.97,274,1669104000"; d="scan'208";a="309351245" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2023 20:05:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10611"; a="698501844" X-IronPort-AV: E=Sophos;i="5.97,274,1669104000"; d="scan'208";a="698501844" Received: from lkp-server01.sh.intel.com (HELO 4455601a8d94) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 04 Feb 2023 20:05:07 -0800 Received: from kbuild by 4455601a8d94 with local (Exim 4.96) (envelope-from ) id 1pOWH5-0001j2-0V; Sun, 05 Feb 2023 04:05:07 +0000 Date: Sun, 5 Feb 2023 12:05:03 +0800 From: kernel test robot To: Luciano Coelho , Golan Ben Ami , Michael Golant , Johannes Berg Cc: oe-kbuild-all@lists.linux.dev Subject: drivers/md/dm-bow.c:97:10: warning: no previous prototype for 'range_top' Message-ID: <202302051114.OUU8nmUN-lkp@intel.com> Precedence: bulk X-Mailing-List: oe-kbuild-all@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Paul, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/chromeos.git chromeos-5.10__release/core59-42 head: e3fe4ac2447d89b8dca61663851e12d2f1247b56 commit: 184f0876d5a9e629ebf1bcb3398c74a310c02b3e ANDROID: dm-bow: Add dm-bow feature date: 2 years, 2 months ago config: nds32-buildonly-randconfig-r001-20230205 (https://download.01.org/0day-ci/archive/20230205/202302051114.OUU8nmUN-lkp@intel.com/config) compiler: nds32le-linux-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/iwlwifi/chromeos.git/commit/?id=184f0876d5a9e629ebf1bcb3398c74a310c02b3e git remote add iwlwifi-chromeos https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/chromeos.git git fetch --no-tags iwlwifi-chromeos chromeos-5.10__release/core59-42 git checkout 184f0876d5a9e629ebf1bcb3398c74a310c02b3e # 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=nds32 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/md/ fs/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/md/dm-bow.c:97:10: warning: no previous prototype for 'range_top' [-Wmissing-prototypes] 97 | sector_t range_top(struct bow_range *br) | ^~~~~~~~~ >> drivers/md/dm-bow.c:103:5: warning: no previous prototype for 'range_size' [-Wmissing-prototypes] 103 | u64 range_size(struct bow_range *br) | ^~~~~~~~~~ >> drivers/md/dm-bow.c:148:6: warning: no previous prototype for 'add_before' [-Wmissing-prototypes] 148 | void add_before(struct rb_root *ranges, struct bow_range *new_br, | ^~~~~~~~~~ >> drivers/md/dm-bow.c:1093:5: warning: no previous prototype for 'remap_unless_illegal_trim' [-Wmissing-prototypes] 1093 | int remap_unless_illegal_trim(struct bow_context *bc, struct bio *bio) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/md/dm-bow.c: In function 'dm_bow_map': >> drivers/md/dm-bow.c:1129:51: warning: suggest braces around empty body in an 'else' statement [-Wempty-body] 1129 | /* pass-through */; | ^ drivers/md/dm-bow.c:1136:51: warning: suggest braces around empty body in an 'else' statement [-Wempty-body] 1136 | /* pass-through */; | ^ drivers/md/dm-bow.c: At top level: >> drivers/md/dm-bow.c:1248:5: warning: no previous prototype for 'dm_bow_prepare_ioctl' [-Wmissing-prototypes] 1248 | int dm_bow_prepare_ioctl(struct dm_target *ti, struct block_device **bdev) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/md/dm-bow.c:1279:12: warning: no previous prototype for 'dm_bow_init' [-Wmissing-prototypes] 1279 | int __init dm_bow_init(void) | ^~~~~~~~~~~ >> drivers/md/dm-bow.c:1288:6: warning: no previous prototype for 'dm_bow_exit' [-Wmissing-prototypes] 1288 | void dm_bow_exit(void) | ^~~~~~~~~~~ vim +/range_top +97 drivers/md/dm-bow.c 96 > 97 sector_t range_top(struct bow_range *br) 98 { 99 return container_of(rb_next(&br->node), struct bow_range, node) 100 ->sector; 101 } 102 > 103 u64 range_size(struct bow_range *br) 104 { 105 return (range_top(br) - br->sector) * SECTOR_SIZE; 106 } 107 108 static sector_t bvec_top(struct bvec_iter *bi_iter) 109 { 110 return bi_iter->bi_sector + bi_iter->bi_size / SECTOR_SIZE; 111 } 112 113 /* 114 * Find the first range that overlaps with bi_iter 115 * bi_iter is set to the size of the overlapping sub-range 116 */ 117 static struct bow_range *find_first_overlapping_range(struct rb_root *ranges, 118 struct bvec_iter *bi_iter) 119 { 120 struct rb_node *node = ranges->rb_node; 121 struct bow_range *br; 122 123 while (node) { 124 br = container_of(node, struct bow_range, node); 125 126 if (br->sector <= bi_iter->bi_sector 127 && bi_iter->bi_sector < range_top(br)) 128 break; 129 130 if (bi_iter->bi_sector < br->sector) 131 node = node->rb_left; 132 else 133 node = node->rb_right; 134 } 135 136 WARN_ON(!node); 137 if (!node) 138 return NULL; 139 140 if (range_top(br) - bi_iter->bi_sector 141 < bi_iter->bi_size >> SECTOR_SHIFT) 142 bi_iter->bi_size = (range_top(br) - bi_iter->bi_sector) 143 << SECTOR_SHIFT; 144 145 return br; 146 } 147 > 148 void add_before(struct rb_root *ranges, struct bow_range *new_br, 149 struct bow_range *existing) 150 { 151 struct rb_node *parent = &(existing->node); 152 struct rb_node **link = &(parent->rb_left); 153 154 while (*link) { 155 parent = *link; 156 link = &((*link)->rb_right); 157 } 158 159 rb_link_node(&new_br->node, parent, link); 160 rb_insert_color(&new_br->node, ranges); 161 } 162 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests