public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Sterba <dsterba@suse.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Qu Wenruo <wqu@suse.com>
Subject: [btrfs:ci-kvm-misc-next 143/160] fs/btrfs/ioctl.c:4179:6: warning: unused variable 'ret'
Date: Thu, 16 Apr 2026 21:27:45 +0200	[thread overview]
Message-ID: <202604162130.a7ymx66r-lkp@intel.com> (raw)

tree:   https://github.com/btrfs/linux.git ci-kvm-misc-next
head:   8e37b8ffd9d4e4c1e43f45dd91f5c53e19520811
commit: ef0c33ef0f4020b31bca106645340968f1a497bb [143/160] btrfs: convert ioctl handlers to AUTO_KFREE
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260416/202604162130.a7ymx66r-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260416/202604162130.a7ymx66r-lkp@intel.com/reproduce)

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/202604162130.a7ymx66r-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/btrfs/ioctl.c:4179:6: warning: unused variable 'ret' [-Wunused-variable]
    4179 |         int ret;
         |             ^~~
   1 warning generated.


vim +/ret +4179 fs/btrfs/ioctl.c

2eaa055fab4e31 Jeff Mahoney   2013-11-15  4175  
4e043cd196c85b David Sterba   2025-03-03  4176  static int _btrfs_ioctl_send(struct btrfs_root *root, void __user *argp, bool compat)
2351f431f72722 Josef Bacik    2017-09-27  4177  {
ef0c33ef0f4020 David Sterba   2026-04-14  4178  	struct btrfs_ioctl_send_args AUTO_KFREE(arg);
2351f431f72722 Josef Bacik    2017-09-27 @4179  	int ret;
2351f431f72722 Josef Bacik    2017-09-27  4180  
2351f431f72722 Josef Bacik    2017-09-27  4181  	if (compat) {
2351f431f72722 Josef Bacik    2017-09-27  4182  #if defined(CONFIG_64BIT) && defined(CONFIG_COMPAT)
9147b9ded499d9 Josef Bacik    2023-09-26  4183  		struct btrfs_ioctl_send_args_32 args32 = { 0 };
2351f431f72722 Josef Bacik    2017-09-27  4184  
2351f431f72722 Josef Bacik    2017-09-27  4185  		ret = copy_from_user(&args32, argp, sizeof(args32));
2351f431f72722 Josef Bacik    2017-09-27  4186  		if (ret)
2351f431f72722 Josef Bacik    2017-09-27  4187  			return -EFAULT;
bf4afc53b77aea Linus Torvalds 2026-02-21  4188  		arg = kzalloc_obj(*arg);
2351f431f72722 Josef Bacik    2017-09-27  4189  		if (!arg)
2351f431f72722 Josef Bacik    2017-09-27  4190  			return -ENOMEM;
2351f431f72722 Josef Bacik    2017-09-27  4191  		arg->send_fd = args32.send_fd;
2351f431f72722 Josef Bacik    2017-09-27  4192  		arg->clone_sources_count = args32.clone_sources_count;
2351f431f72722 Josef Bacik    2017-09-27  4193  		arg->clone_sources = compat_ptr(args32.clone_sources);
2351f431f72722 Josef Bacik    2017-09-27  4194  		arg->parent_root = args32.parent_root;
2351f431f72722 Josef Bacik    2017-09-27  4195  		arg->flags = args32.flags;
5de0434bc06460 David Sterba   2023-11-14  4196  		arg->version = args32.version;
2351f431f72722 Josef Bacik    2017-09-27  4197  		memcpy(arg->reserved, args32.reserved,
2351f431f72722 Josef Bacik    2017-09-27  4198  		       sizeof(args32.reserved));
2351f431f72722 Josef Bacik    2017-09-27  4199  #else
2351f431f72722 Josef Bacik    2017-09-27  4200  		return -ENOTTY;
2351f431f72722 Josef Bacik    2017-09-27  4201  #endif
2351f431f72722 Josef Bacik    2017-09-27  4202  	} else {
2351f431f72722 Josef Bacik    2017-09-27  4203  		arg = memdup_user(argp, sizeof(*arg));
2351f431f72722 Josef Bacik    2017-09-27  4204  		if (IS_ERR(arg))
2351f431f72722 Josef Bacik    2017-09-27  4205  			return PTR_ERR(arg);
2351f431f72722 Josef Bacik    2017-09-27  4206  	}
ef0c33ef0f4020 David Sterba   2026-04-14  4207  	return btrfs_ioctl_send(root, arg);
2351f431f72722 Josef Bacik    2017-09-27  4208  }
2351f431f72722 Josef Bacik    2017-09-27  4209  

:::::: The code at line 4179 was first introduced by commit
:::::: 2351f431f727223b4d82851ee8fc045bf51edd34 btrfs: fix send ioctl on 32bit with 64bit kernel

:::::: TO: Josef Bacik <josef@toxicpanda.com>
:::::: CC: David Sterba <dsterba@suse.com>

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

             reply	other threads:[~2026-04-16 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16 19:27 kernel test robot [this message]
2026-04-16 21:37 ` [btrfs:ci-kvm-misc-next 143/160] fs/btrfs/ioctl.c:4179:6: warning: unused variable 'ret' David Sterba

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=202604162130.a7ymx66r-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dsterba@suse.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=wqu@suse.com \
    /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