All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-review:UPDATE-20200716-153005/Nikolay-Borisov/Convert-seed-devices-to-proper-list-API/20200715-185120 2/5] fs/btrfs/volumes.c:1029:6: warning: no previous prototype for function '__btrfs_free_extra_devids'
Date: Fri, 17 Jul 2020 07:41:22 +0800	[thread overview]
Message-ID: <202007170719.9w5kLD17%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4453 bytes --]

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20200716-153005/Nikolay-Borisov/Convert-seed-devices-to-proper-list-API/20200715-185120
head:   a4695ab8c9d28c2c826e742853afa972b713f620
commit: 7a8f87bd7d0c4c97083a1efeebc8739db85575cc [2/5] btrfs: Factor out loop logic from btrfs_free_extra_devids
config: arm64-randconfig-r004-20200716 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        git checkout 7a8f87bd7d0c4c97083a1efeebc8739db85575cc
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from fs/btrfs/volumes.c:17:
   fs/btrfs/ctree.h:2271:8: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
   size_t __const btrfs_get_num_csums(void);
          ^~~~~~~~
   In file included from fs/btrfs/volumes.c:28:
   fs/btrfs/sysfs.h:16:14: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
   const char * const btrfs_feature_set_name(enum btrfs_feature_set set);
                ^~~~~~
>> fs/btrfs/volumes.c:1029:6: warning: no previous prototype for function '__btrfs_free_extra_devids' [-Wmissing-prototypes]
   void __btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step,
        ^
   fs/btrfs/volumes.c:1029:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void __btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step,
   ^
   static 
   3 warnings generated.

vim +/__btrfs_free_extra_devids +1029 fs/btrfs/volumes.c

  1026	
  1027	
  1028	
> 1029	void __btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step,
  1030				       struct btrfs_device **latest_dev)
  1031	{
  1032		struct btrfs_device *device, *next;
  1033	
  1034		/* This is the initialized path, it is safe to release the devices. */
  1035		list_for_each_entry_safe(device, next, &fs_devices->devices, dev_list) {
  1036			if (test_bit(BTRFS_DEV_STATE_IN_FS_METADATA,
  1037				     &device->dev_state)) {
  1038				if (!test_bit(BTRFS_DEV_STATE_REPLACE_TGT,
  1039					      &device->dev_state) &&
  1040				    !test_bit(BTRFS_DEV_STATE_MISSING,
  1041					      &device->dev_state) &&
  1042				    (!*latest_dev ||
  1043				     device->generation > (*latest_dev)->generation)) {
  1044					*latest_dev = device;
  1045				}
  1046				continue;
  1047			}
  1048	
  1049			if (device->devid == BTRFS_DEV_REPLACE_DEVID) {
  1050				/*
  1051				 * In the first step, keep the device which has
  1052				 * the correct fsid and the devid that is used
  1053				 * for the dev_replace procedure.
  1054				 * In the second step, the dev_replace state is
  1055				 * read from the device tree and it is known
  1056				 * whether the procedure is really active or
  1057				 * not, which means whether this device is
  1058				 * used or whether it should be removed.
  1059				 */
  1060				if (step == 0 || test_bit(BTRFS_DEV_STATE_REPLACE_TGT,
  1061							  &device->dev_state)) {
  1062					continue;
  1063				}
  1064			}
  1065			if (device->bdev) {
  1066				blkdev_put(device->bdev, device->mode);
  1067				device->bdev = NULL;
  1068				fs_devices->open_devices--;
  1069			}
  1070			if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) {
  1071				list_del_init(&device->dev_alloc_list);
  1072				clear_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state);
  1073				if (!test_bit(BTRFS_DEV_STATE_REPLACE_TGT,
  1074					      &device->dev_state))
  1075					fs_devices->rw_devices--;
  1076			}
  1077			list_del_init(&device->dev_list);
  1078			fs_devices->num_devices--;
  1079			btrfs_free_device(device);
  1080		}
  1081	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38700 bytes --]

                 reply	other threads:[~2020-07-16 23:41 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=202007170719.9w5kLD17%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.