mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: fs/bcachefs/alloc_background.c:200:5-8: Unneeded variable: "ret". Return "  0" on line 208
Date: Fri, 5 Jan 2024 04:25:25 +0800	[thread overview]
Message-ID: <202401050409.VH31aFND-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ac865f00af293d081356bec56eea90815094a60e
commit: b65db750e2bb9252321fd54c284edd73c1595a09 bcachefs: Enumerate fsck errors
date:   9 weeks ago
config: x86_64-randconfig-r064-20231231 (https://download.01.org/0day-ci/archive/20240105/202401050409.VH31aFND-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0

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/202401050409.VH31aFND-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> fs/bcachefs/alloc_background.c:200:5-8: Unneeded variable: "ret". Return "  0" on line 208
   fs/bcachefs/alloc_background.c:216:5-8: Unneeded variable: "ret". Return "  0" on line 222
   fs/bcachefs/alloc_background.c:230:5-8: Unneeded variable: "ret". Return "  0" on line 236
   fs/bcachefs/alloc_background.c:243:5-8: Unneeded variable: "ret". Return "  0" on line 297
   fs/bcachefs/alloc_background.c:523:5-8: Unneeded variable: "ret". Return "  0" on line 530
--
>> fs/bcachefs/lru.c:17:5-8: Unneeded variable: "ret". Return "  0" on line 23
--
>> fs/bcachefs/quota.c:66:5-8: Unneeded variable: "ret". Return "  0" on line 73
--
>> fs/bcachefs/subvolume.c:104:5-8: Unneeded variable: "ret". Return "  0" on line 111

vim +200 fs/bcachefs/alloc_background.c

   194	
   195	int bch2_alloc_v1_invalid(struct bch_fs *c, struct bkey_s_c k,
   196				  enum bkey_invalid_flags flags,
   197				  struct printbuf *err)
   198	{
   199		struct bkey_s_c_alloc a = bkey_s_c_to_alloc(k);
 > 200		int ret = 0;
   201	
   202		/* allow for unknown fields */
   203		bkey_fsck_err_on(bkey_val_u64s(a.k) < bch_alloc_v1_val_u64s(a.v), c, err,
   204				 alloc_v1_val_size_bad,
   205				 "incorrect value size (%zu < %u)",
   206				 bkey_val_u64s(a.k), bch_alloc_v1_val_u64s(a.v));
   207	fsck_err:
 > 208		return ret;
   209	}
   210	

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

                 reply	other threads:[~2024-01-04 20:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202401050409.VH31aFND-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kent.overstreet@linux.dev \
    --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®