All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: linux-btrfs@vger.kernel.org
Cc: Boris Burkov <boris@bur.io>,
	oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	David Sterba <dsterba@suse.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: fs/btrfs/send.c:6877:5-8: Unneeded variable: "ret". Return "0" on line 6883
Date: Thu, 10 Oct 2024 13:53:28 +0200	[thread overview]
Message-ID: <20241010115328.GP1609@suse.cz> (raw)
In-Reply-To: <202410092305.WbyqspH8-lkp@intel.com>

On Thu, Oct 10, 2024 at 12:04:53AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   75b607fab38d149f232f01eae5e6392b394dd659
> commit: 38622010a6de3a62cc72688348548854ed82dcf5 btrfs: send: add support for fs-verity
> date:   2 years ago
> config: i386-randconfig-052-20241009 (https://download.01.org/0day-ci/archive/20241009/202410092305.WbyqspH8-lkp@intel.com/config)
> compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
> 
> 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
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202410092305.WbyqspH8-lkp@intel.com/
> 
> cocci warnings: (new ones prefixed by >>)
> >> fs/btrfs/send.c:6877:5-8: Unneeded variable: "ret". Return "0" on line 6883
> 
> vim +6877 fs/btrfs/send.c
> 
>   6874	
>   6875	static int changed_verity(struct send_ctx *sctx, enum btrfs_compare_tree_result result)
>   6876	{
> > 6877		int ret = 0;
>   6878	
>   6879		if (!sctx->cur_inode_new_gen && !sctx->cur_inode_deleted) {
>   6880			if (result == BTRFS_COMPARE_TREE_NEW)
>   6881				sctx->cur_inode_needs_verity = true;
>   6882		}
> > 6883		return ret;

Trivial fix if somebody wants to take it. All changed_ callbacks must
return a value but here the verity status is passed via the context so
this should be 'return 0'.

      reply	other threads:[~2024-10-10 11:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 16:04 fs/btrfs/send.c:6877:5-8: Unneeded variable: "ret". Return "0" on line 6883 kernel test robot
2024-10-10 11:53 ` David Sterba [this message]

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=20241010115328.GP1609@suse.cz \
    --to=dsterba@suse.cz \
    --cc=boris@bur.io \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --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 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.