All of lore.kernel.org
 help / color / mirror / Atom feed
* fs/ntfs/runlist.c:1953:47-52: WARNING: conversion to bool not needed here
@ 2026-05-21  4:40 kernel test robot
  2026-05-21  5:01 ` Namjae Jeon
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-05-21  4:40 UTC (permalink / raw)
  To: Namjae Jeon
  Cc: oe-kbuild-all, linux-kernel, Amir Goldstein, Christoph Hellwig

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: fs/ntfs/runlist.c:1953:47-52: WARNING: conversion to bool not needed here
  2026-05-21  4:40 fs/ntfs/runlist.c:1953:47-52: WARNING: conversion to bool not needed here kernel test robot
@ 2026-05-21  5:01 ` Namjae Jeon
  0 siblings, 0 replies; 2+ messages in thread
From: Namjae Jeon @ 2026-05-21  5:01 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, linux-kernel, Amir Goldstein, Christoph Hellwig

On Thu, May 21, 2026 at 1:40 PM kernel test robot <lkp@intel.com> wrote:
>
> Hi Namjae,
Hi,
>
> 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.
Okay, I will fix them.
Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-21  5:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-21  4:40 fs/ntfs/runlist.c:1953:47-52: WARNING: conversion to bool not needed here kernel test robot
2026-05-21  5:01 ` Namjae Jeon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.