From: kernel test robot <lkp@intel.com>
To: David Sterba <dsterba@suse.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [kdave-btrfs-devel:dev/param-const 48/48] fs/btrfs/super.c:667:41: warning: passing argument 1 of 'btrfs_check_mountopts_zoned' discards 'const' qualifier from pointer target type
Date: Sat, 25 May 2024 00:30:37 +0800 [thread overview]
Message-ID: <202405250010.UW7X5MH5-lkp@intel.com> (raw)
tree: https://github.com/kdave/btrfs-devel.git dev/param-const
head: 96da40206d7e27b71b58cca6209a17a61acff478
commit: 96da40206d7e27b71b58cca6209a17a61acff478 [48/48] constify parameters where it's ok
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240525/202405250010.UW7X5MH5-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240525/202405250010.UW7X5MH5-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/202405250010.UW7X5MH5-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/btrfs/super.c: In function 'btrfs_check_options':
>> fs/btrfs/super.c:667:41: warning: passing argument 1 of 'btrfs_check_mountopts_zoned' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
667 | if (btrfs_check_mountopts_zoned(info, mount_opt))
| ^~~~
In file included from fs/btrfs/super.c:47:
fs/btrfs/zoned.h:132:69: note: expected 'struct btrfs_fs_info *' but argument is of type 'const struct btrfs_fs_info *'
132 | static inline int btrfs_check_mountopts_zoned(struct btrfs_fs_info *info,
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
vim +667 fs/btrfs/super.c
d7407606564c59 Misono, Tomohiro 2017-12-14 643
96da40206d7e27 David Sterba 2024-05-22 644 bool btrfs_check_options(const struct btrfs_fs_info *info, unsigned long *mount_opt,
eddb1a433f2631 Josef Bacik 2023-11-22 645 unsigned long flags)
2b41b19dd6d063 Josef Bacik 2023-11-22 646 {
2b41b19dd6d063 Josef Bacik 2023-11-22 647 bool ret = true;
d7407606564c59 Misono, Tomohiro 2017-12-14 648
2b41b19dd6d063 Josef Bacik 2023-11-22 649 if (!(flags & SB_RDONLY) &&
eddb1a433f2631 Josef Bacik 2023-11-22 650 (check_ro_option(info, *mount_opt, BTRFS_MOUNT_NOLOGREPLAY, "nologreplay") ||
eddb1a433f2631 Josef Bacik 2023-11-22 651 check_ro_option(info, *mount_opt, BTRFS_MOUNT_IGNOREBADROOTS, "ignorebadroots") ||
eddb1a433f2631 Josef Bacik 2023-11-22 652 check_ro_option(info, *mount_opt, BTRFS_MOUNT_IGNOREDATACSUMS, "ignoredatacsums")))
2b41b19dd6d063 Josef Bacik 2023-11-22 653 ret = false;
d7407606564c59 Misono, Tomohiro 2017-12-14 654
2b41b19dd6d063 Josef Bacik 2023-11-22 655 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE) &&
eddb1a433f2631 Josef Bacik 2023-11-22 656 !btrfs_raw_test_opt(*mount_opt, FREE_SPACE_TREE) &&
eddb1a433f2631 Josef Bacik 2023-11-22 657 !btrfs_raw_test_opt(*mount_opt, CLEAR_CACHE)) {
2b41b19dd6d063 Josef Bacik 2023-11-22 658 btrfs_err(info, "cannot disable free-space-tree");
2b41b19dd6d063 Josef Bacik 2023-11-22 659 ret = false;
d7407606564c59 Misono, Tomohiro 2017-12-14 660 }
2b41b19dd6d063 Josef Bacik 2023-11-22 661 if (btrfs_fs_compat_ro(info, BLOCK_GROUP_TREE) &&
eddb1a433f2631 Josef Bacik 2023-11-22 662 !btrfs_raw_test_opt(*mount_opt, FREE_SPACE_TREE)) {
2b41b19dd6d063 Josef Bacik 2023-11-22 663 btrfs_err(info, "cannot disable free-space-tree with block-group-tree feature");
2b41b19dd6d063 Josef Bacik 2023-11-22 664 ret = false;
d7407606564c59 Misono, Tomohiro 2017-12-14 665 }
2b41b19dd6d063 Josef Bacik 2023-11-22 666
eddb1a433f2631 Josef Bacik 2023-11-22 @667 if (btrfs_check_mountopts_zoned(info, mount_opt))
2b41b19dd6d063 Josef Bacik 2023-11-22 668 ret = false;
2b41b19dd6d063 Josef Bacik 2023-11-22 669
2b41b19dd6d063 Josef Bacik 2023-11-22 670 if (!test_bit(BTRFS_FS_STATE_REMOUNTING, &info->fs_state)) {
eddb1a433f2631 Josef Bacik 2023-11-22 671 if (btrfs_raw_test_opt(*mount_opt, SPACE_CACHE))
2b41b19dd6d063 Josef Bacik 2023-11-22 672 btrfs_info(info, "disk space caching is enabled");
eddb1a433f2631 Josef Bacik 2023-11-22 673 if (btrfs_raw_test_opt(*mount_opt, FREE_SPACE_TREE))
2b41b19dd6d063 Josef Bacik 2023-11-22 674 btrfs_info(info, "using free-space-tree");
36350e95a2b1fe Gu Jinxiang 2018-07-12 675 }
d7407606564c59 Misono, Tomohiro 2017-12-14 676
2b41b19dd6d063 Josef Bacik 2023-11-22 677 return ret;
d7407606564c59 Misono, Tomohiro 2017-12-14 678 }
d7407606564c59 Misono, Tomohiro 2017-12-14 679
:::::: The code at line 667 was first introduced by commit
:::::: eddb1a433f2631ef211b3253ba7e7aba20310ebc btrfs: add reconfigure callback for fs_context
:::::: 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:[~2024-05-24 16:31 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=202405250010.UW7X5MH5-lkp@intel.com \
--to=lkp@intel.com \
--cc=dsterba@suse.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.