Re: [PATCH 12/31] btrfs: move the core extent_io_tree code into extent-io-tree.c

kernel test robot
2022-09-03T06:30:02Z

Hi Josef,

I love your patch! Perhaps something to improve:

[auto build test WARNING on kdave/for-next]
[also build test WARNING on next-20220901]
[cannot apply to rostedt-trace/for-next linus/master v6.0-rc3]
[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/Josef-Bacik/btrfs-move-extent_io_tree-code-and-cleanups/20220903-042359
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220903/202209031411.pvUL5nPj-lkp@intel.com/config)
compiler: alpha-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://github.com/intel-lab-lkp/linux/commit/9fa98f420ce2ac5220d35bedf881d5e6bbd18e9d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Josef-Bacik/btrfs-move-extent_io_tree-code-and-cleanups/20220903-042359
git checkout 9fa98f420ce2ac5220d35bedf881d5e6bbd18e9d
# 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=alpha SHELL=/bin/bash fs/btrfs/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> fs/btrfs/extent-io-tree.c:237: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Search @tree for an entry that contains @offset. Such entry would have
fs/btrfs/extent-io-tree.c:298: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Search offset in the tree or fill neighbor rbtree node pointers.
fs/btrfs/extent-io-tree.c:1393: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Find a contiguous area of bits
fs/btrfs/extent-io-tree.c:1431: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Find the first range that has @bits not set. This range could start before

vim +237 fs/btrfs/extent-io-tree.c

235
236 /**
> 237 * Search @tree for an entry that contains @offset. Such entry would have
238 * entry->start <= offset && entry->end >= offset.
239 *
240 * @tree: the tree to search
241 * @offset: offset that should fall within an entry in @tree
242 * @node_ret: pointer where new node should be anchored (used when inserting an
243 * entry in the tree)
244 * @parent_ret: points to entry which would have been the parent of the entry,
245 * containing @offset
246 *
247 * Return a pointer to the entry that contains @offset byte address and don't change
248 * @node_ret and @parent_ret.
249 *
250 * If no such entry exists, return pointer to entry that ends before @offset
251 * and fill parameters @node_ret and @parent_ret, ie. does not return NULL.
252 */
253 static inline struct rb_node *tree_search_for_insert(struct extent_io_tree *tree,
254 u64 offset,
255 struct rb_node ***node_ret,
256 struct rb_node **parent_ret)
257 {
258 struct rb_root *root = &tree->state;
259 struct rb_node **node = &root->rb_node;
260 struct rb_node *prev = NULL;
261 struct tree_entry *entry;
262
263 while (*node) {
264 prev = *node;
265 entry = rb_entry(prev, struct tree_entry, rb_node);
266
267 if (offset < entry->start)
268 node = &(*node)->rb_left;
269 else if (offset > entry->end)
270 node = &(*node)->rb_right;
271 else
272 return *node;
273 }
274
275 if (node_ret)
276 *node_ret = node;
277 if (parent_ret)
278 *parent_ret = prev;
279
280 /* Search neighbors until we find the first one past the end */
281 while (prev && offset > entry->end) {
282 prev = rb_next(prev);
283 entry = rb_entry(prev, struct tree_entry, rb_node);
284 }
285
286 return prev;
287 }
288

--
0-DAY CI Kernel Test Service