All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [bcache:nvdimm-meta 4/8] drivers/md/bcache/nvm-pages.c:185:7: error: redefinition of 'bch_nvm_alloc_pages'
Date: Fri, 08 Jan 2021 17:07:05 +0800	[thread overview]
Message-ID: <202101081758.Xi7YASHq-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git nvdimm-meta
head:   cafe7a7d88c5585454eb1285218db1e60a174797
commit: 47a0cdd59b4c55f2c9379c2d5ae03aeb97c587b7 [4/8] bcache: bch_nvm_alloc_pages() of the buddy
config: arc-randconfig-s031-20210108 (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git/commit/?id=47a0cdd59b4c55f2c9379c2d5ae03aeb97c587b7
        git remote add bcache https://git.kernel.org/pub/scm/linux/kernel/git/colyli/linux-bcache.git
        git fetch --no-tags bcache nvdimm-meta
        git checkout 47a0cdd59b4c55f2c9379c2d5ae03aeb97c587b7
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arc 

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

All errors (new ones prefixed by >>):

>> drivers/md/bcache/nvm-pages.c:185:7: error: redefinition of 'bch_nvm_alloc_pages'
     185 | void *bch_nvm_alloc_pages(int order, const char *owner_uuid)
         |       ^~~~~~~~~~~~~~~~~~~
   In file included from drivers/md/bcache/nvm-pages.c:14:
   drivers/md/bcache/nvm-pages.h:93:21: note: previous definition of 'bch_nvm_alloc_pages' was here
      93 | static inline void *bch_nvm_alloc_pages(int order, const char *owner_uuid)
         |                     ^~~~~~~~~~~~~~~~~~~
   drivers/md/bcache/nvm-pages.c:432:27: error: redefinition of 'bch_register_namespace'
     432 | struct bch_nvm_namespace *bch_register_namespace(const char *dev_path)
         |                           ^~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/md/bcache/nvm-pages.c:14:
   drivers/md/bcache/nvm-pages.h:83:41: note: previous definition of 'bch_register_namespace' was here
      83 | static inline struct bch_nvm_namespace *bch_register_namespace(const char *dev_path)
         |                                         ^~~~~~~~~~~~~~~~~~~~~~
   drivers/md/bcache/nvm-pages.c:528:12: error: redefinition of 'bch_nvm_init'
     528 | int __init bch_nvm_init(void)
         |            ^~~~~~~~~~~~
   In file included from drivers/md/bcache/nvm-pages.c:14:
   drivers/md/bcache/nvm-pages.h:87:19: note: previous definition of 'bch_nvm_init' was here
      87 | static inline int bch_nvm_init(void)
         |                   ^~~~~~~~~~~~
   drivers/md/bcache/nvm-pages.c:544:6: error: redefinition of 'bch_nvm_exit'
     544 | void bch_nvm_exit(void)
         |      ^~~~~~~~~~~~
   In file included from drivers/md/bcache/nvm-pages.c:14:
   drivers/md/bcache/nvm-pages.h:91:20: note: previous definition of 'bch_nvm_exit' was here
      91 | static inline void bch_nvm_exit(void) { }
         |                    ^~~~~~~~~~~~
   In file included from drivers/md/bcache/nvm-pages.h:6,
                    from drivers/md/bcache/nvm-pages.c:14:
   include/uapi/linux/bcache-nvm.h:105:19: warning: 'nvm_pages_pgalloc_magic' defined but not used [-Wunused-const-variable=]
     105 | static const char nvm_pages_pgalloc_magic[] = {
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/bcache-nvm.h:102:19: warning: 'nvm_pages_magic' defined but not used [-Wunused-const-variable=]
     102 | static const char nvm_pages_magic[] = {
         |                   ^~~~~~~~~~~~~~~


vim +/bch_nvm_alloc_pages +185 drivers/md/bcache/nvm-pages.c

   184	
 > 185	void *bch_nvm_alloc_pages(int order, const char *owner_uuid)
   186	{
   187		void *kaddr = NULL;
   188		struct bch_owner_list *owner_list;
   189		struct bch_nvm_alloced_recs *alloced_recs;
   190		int i, j;
   191	
   192		mutex_lock(&only_set->lock);
   193		owner_list = find_owner_list(owner_uuid, true);
   194	
   195		for (j = 0; j < only_set->total_namespaces_nr; j++) {
   196			struct bch_nvm_namespace *ns = only_set->nss[j];
   197	
   198			if (!ns || (ns->free < (1 << order)))
   199				continue;
   200	
   201			for (i = order; i < MAX_ORDER; i++) {
   202				struct list_head *list;
   203				struct page *page, *buddy_page;
   204	
   205				if (list_empty(&ns->free_area[i]))
   206					continue;
   207	
   208				list = ns->free_area[i].next;
   209				page = container_of((void *)list, struct page, zone_device_data);
   210	
   211				list_del(list);
   212	
   213				while (i != order) {
   214					buddy_page = nvm_vaddr_to_page(ns,
   215						nvm_pgoff_to_vaddr(ns, page->index + (1 << (i - 1))));
   216					buddy_page->private = i - 1;
   217					buddy_page->index = page->index + (1 << (i - 1));
   218					__SetPageBuddy(buddy_page);
   219					list_add((struct list_head *)&buddy_page->zone_device_data,
   220						&ns->free_area[i - 1]);
   221					i--;
   222				}
   223	
   224				page->private = order;
   225				__ClearPageBuddy(page);
   226				ns->free -= 1 << order;
   227				kaddr = nvm_pgoff_to_vaddr(ns, page->index);
   228				break;
   229			}
   230	
   231			if (i != MAX_ORDER) {
   232				alloced_recs = find_nvm_alloced_recs(owner_list, ns, true);
   233				add_extent(alloced_recs, kaddr, order);
   234				break;
   235			}
   236		}
   237	
   238		mutex_unlock(&only_set->lock);
   239		return kaddr;
   240	}
   241	EXPORT_SYMBOL_GPL(bch_nvm_alloc_pages);
   242	

---
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: 20675 bytes --]

                 reply	other threads:[~2021-01-08  9:07 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=202101081758.Xi7YASHq-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.