* [btrfs:ci-kvm-misc-next 143/160] fs/btrfs/ioctl.c:4179:6: warning: unused variable 'ret'
@ 2026-04-16 19:27 kernel test robot
2026-04-16 21:37 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-04-16 19:27 UTC (permalink / raw)
To: David Sterba; +Cc: llvm, oe-kbuild-all, Qu Wenruo
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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [btrfs:ci-kvm-misc-next 143/160] fs/btrfs/ioctl.c:4179:6: warning: unused variable 'ret'
2026-04-16 19:27 [btrfs:ci-kvm-misc-next 143/160] fs/btrfs/ioctl.c:4179:6: warning: unused variable 'ret' kernel test robot
@ 2026-04-16 21:37 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2026-04-16 21:37 UTC (permalink / raw)
To: kernel test robot; +Cc: David Sterba, llvm, oe-kbuild-all, Qu Wenruo
On Thu, Apr 16, 2026 at 09:27:45PM +0200, kernel test robot wrote:
> 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)
CONFIG_COMPAT is not defined so 'ret' is indeed not used.
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-16 21:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16 19:27 [btrfs:ci-kvm-misc-next 143/160] fs/btrfs/ioctl.c:4179:6: warning: unused variable 'ret' kernel test robot
2026-04-16 21:37 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox