mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Amir Goldstein <amir73il@gmail.com>,
	Christoph Hellwig <hch@lst.de>
Subject: fs/ntfs/runlist.c:1953:47-52: WARNING: conversion to bool not needed here
Date: Thu, 21 May 2026 12:40:16 +0800	[thread overview]
Message-ID: <202605211248.DSL7pell-lkp@intel.com> (raw)

Hi Namjae,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8bc67e4db64aa72732c474b44ea8622062c903f0
commit: 47503f989736d6c4c9f8bfca1c28d267473ccd4b ntfs: add Kconfig and Makefile
date:   3 months ago
config: um-randconfig-r063-20260521 (https://download.01.org/0day-ci/archive/20260521/202605211248.DSL7pell-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 47503f989736 ("ntfs: add Kconfig and Makefile")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605211248.DSL7pell-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> fs/ntfs/runlist.c:1953:47-52: WARNING: conversion to bool not needed here
   fs/ntfs/runlist.c:1961:62-67: WARNING: conversion to bool not needed here
   fs/ntfs/runlist.c:1964:65-70: WARNING: conversion to bool not needed here
   fs/ntfs/runlist.c:1802:47-52: WARNING: conversion to bool not needed here
   fs/ntfs/runlist.c:1810:62-67: WARNING: conversion to bool not needed here
   fs/ntfs/runlist.c:1813:65-70: WARNING: conversion to bool not needed here
--
>> fs/ntfs/logfile.c:626:2-8: WARNING: NULL check before some freeing functions is not needed.
--
>> fs/ntfs/super.c:2519:2-8: WARNING: NULL check before some freeing functions is not needed.
   fs/ntfs/super.c:1731:2-8: WARNING: NULL check before some freeing functions is not needed.

vim +1953 fs/ntfs/runlist.c

11ccc9107dc460 Namjae Jeon 2026-02-13  1928  
11ccc9107dc460 Namjae Jeon 2026-02-13  1929  struct runlist_element *ntfs_rl_collapse_range(struct runlist_element *dst_rl, int dst_cnt,
11ccc9107dc460 Namjae Jeon 2026-02-13  1930  					s64 start_vcn, s64 len,
11ccc9107dc460 Namjae Jeon 2026-02-13  1931  					struct runlist_element **punch_rl,
11ccc9107dc460 Namjae Jeon 2026-02-13  1932  					size_t *new_rl_cnt)
11ccc9107dc460 Namjae Jeon 2026-02-13  1933  {
11ccc9107dc460 Namjae Jeon 2026-02-13  1934  	struct runlist_element *s_rl, *e_rl, *new_rl, *dst_3rd_rl;
11ccc9107dc460 Namjae Jeon 2026-02-13  1935  	s64 end_vcn;
11ccc9107dc460 Namjae Jeon 2026-02-13  1936  	int new_1st_cnt, dst_3rd_cnt, new_cnt, punch_cnt, merge_cnt, i;
11ccc9107dc460 Namjae Jeon 2026-02-13  1937  	bool begin_split, end_split, one_split_3;
11ccc9107dc460 Namjae Jeon 2026-02-13  1938  
11ccc9107dc460 Namjae Jeon 2026-02-13  1939  	if (dst_cnt < 2 ||
11ccc9107dc460 Namjae Jeon 2026-02-13  1940  	    !(dst_rl[dst_cnt - 1].lcn == LCN_ENOENT &&
11ccc9107dc460 Namjae Jeon 2026-02-13  1941  	      dst_rl[dst_cnt - 1].length == 0))
11ccc9107dc460 Namjae Jeon 2026-02-13  1942  		return ERR_PTR(-EINVAL);
11ccc9107dc460 Namjae Jeon 2026-02-13  1943  
11ccc9107dc460 Namjae Jeon 2026-02-13  1944  	end_vcn = min(start_vcn + len - 1,
11ccc9107dc460 Namjae Jeon 2026-02-13  1945  			dst_rl[dst_cnt - 1].vcn - 1);
11ccc9107dc460 Namjae Jeon 2026-02-13  1946  
11ccc9107dc460 Namjae Jeon 2026-02-13  1947  	s_rl = ntfs_rl_find_vcn_nolock(dst_rl, start_vcn);
11ccc9107dc460 Namjae Jeon 2026-02-13  1948  	if (!s_rl ||
11ccc9107dc460 Namjae Jeon 2026-02-13  1949  	    s_rl->lcn <= LCN_ENOENT ||
11ccc9107dc460 Namjae Jeon 2026-02-13  1950  	    !ntfs_rle_contain(s_rl, start_vcn))
11ccc9107dc460 Namjae Jeon 2026-02-13  1951  		return ERR_PTR(-EINVAL);
11ccc9107dc460 Namjae Jeon 2026-02-13  1952  
11ccc9107dc460 Namjae Jeon 2026-02-13 @1953  	begin_split = s_rl->vcn != start_vcn ? true : false;

:::::: The code at line 1953 was first introduced by commit
:::::: 11ccc9107dc460de28af90fac1f42404d9802735 ntfs: update runlist handling and cluster allocator

:::::: TO: Namjae Jeon <linkinjeon@kernel.org>
:::::: CC: Namjae Jeon <linkinjeon@kernel.org>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2026-05-21  4:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21  4:40 kernel test robot [this message]
2026-05-21  5:01 ` Namjae Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202605211248.DSL7pell-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=amir73il@gmail.com \
    --cc=hch@lst.de \
    --cc=linkinjeon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®