mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Juergen Gross <jgross@suse.com>,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Juergen Gross <jgross@suse.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH] xen/balloon: rename alloc/free_xenballooned_pages
Date: Sat, 30 Oct 2021 18:27:57 +0800	[thread overview]
Message-ID: <202110301843.7Wg3e0aV-lkp@intel.com> (raw)
In-Reply-To: <20211029142219.25357-1-jgross@suse.com>

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

Hi Juergen,

I love your patch! Yet something to improve:

[auto build test ERROR on xen-tip/linux-next]
[also build test ERROR on linux/master linus/master v5.15-rc7 next-20211029]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Juergen-Gross/xen-balloon-rename-alloc-free_xenballooned_pages/20211029-222901
base:   https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git linux-next
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
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
        # https://github.com/0day-ci/linux/commit/4db6d782d7d5ef16ced6f4e54161bd8f1148d39b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Juergen-Gross/xen-balloon-rename-alloc-free_xenballooned_pages/20211029-222901
        git checkout 4db6d782d7d5ef16ced6f4e54161bd8f1148d39b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64 

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/xen/balloon.c:612:5: error: conflicting types for 'xen_alloc_unpopulated_pages'; have 'int(int,  struct page **)'
     612 | int xen_alloc_unpopulated_pages(int nr_pages, struct page **pages)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/xen/balloon.c:68:
   include/xen/xen.h:55:5: note: previous declaration of 'xen_alloc_unpopulated_pages' with type 'int(unsigned int,  struct page **)'
      55 | int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages);
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from include/linux/list.h:9,
                    from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from drivers/xen/balloon.c:41:
   drivers/xen/balloon.c:658:15: error: conflicting types for 'xen_alloc_unpopulated_pages'; have 'int(int,  struct page **)'
     658 | EXPORT_SYMBOL(xen_alloc_unpopulated_pages);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
      98 |         extern typeof(sym) sym;                                                 \
         |                            ^~~
   include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec)        __EXPORT_SYMBOL(sym, sec, "")
         |                                         ^~~~~~~~~~~~~~~
   include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
     163 | #define EXPORT_SYMBOL(sym)              _EXPORT_SYMBOL(sym, "")
         |                                         ^~~~~~~~~~~~~~
   drivers/xen/balloon.c:658:1: note: in expansion of macro 'EXPORT_SYMBOL'
     658 | EXPORT_SYMBOL(xen_alloc_unpopulated_pages);
         | ^~~~~~~~~~~~~
   In file included from drivers/xen/balloon.c:68:
   include/xen/xen.h:55:5: note: previous declaration of 'xen_alloc_unpopulated_pages' with type 'int(unsigned int,  struct page **)'
      55 | int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages);
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/xen/balloon.c:665:6: error: conflicting types for 'xen_free_unpopulated_pages'; have 'void(int,  struct page **)'
     665 | void xen_free_unpopulated_pages(int nr_pages, struct page **pages)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/xen/balloon.c:68:
   include/xen/xen.h:56:6: note: previous declaration of 'xen_free_unpopulated_pages' with type 'void(unsigned int,  struct page **)'
      56 | void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages);
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from include/linux/list.h:9,
                    from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from drivers/xen/balloon.c:41:
   drivers/xen/balloon.c:684:15: error: conflicting types for 'xen_free_unpopulated_pages'; have 'void(int,  struct page **)'
     684 | EXPORT_SYMBOL(xen_free_unpopulated_pages);
         |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:28: note: in definition of macro '___EXPORT_SYMBOL'
      98 |         extern typeof(sym) sym;                                                 \
         |                            ^~~
   include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec)        __EXPORT_SYMBOL(sym, sec, "")
         |                                         ^~~~~~~~~~~~~~~
   include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
     163 | #define EXPORT_SYMBOL(sym)              _EXPORT_SYMBOL(sym, "")
         |                                         ^~~~~~~~~~~~~~
   drivers/xen/balloon.c:684:1: note: in expansion of macro 'EXPORT_SYMBOL'
     684 | EXPORT_SYMBOL(xen_free_unpopulated_pages);
         | ^~~~~~~~~~~~~
   In file included from drivers/xen/balloon.c:68:
   include/xen/xen.h:56:6: note: previous declaration of 'xen_free_unpopulated_pages' with type 'void(unsigned int,  struct page **)'
      56 | void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages);
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +612 drivers/xen/balloon.c

   605	
   606	/**
   607	 * xen_alloc_unpopulated_pages - get pages that have been ballooned out
   608	 * @nr_pages: Number of pages to get
   609	 * @pages: pages returned
   610	 * @return 0 on success, error otherwise
   611	 */
 > 612	int xen_alloc_unpopulated_pages(int nr_pages, struct page **pages)
   613	{
   614		int pgno = 0;
   615		struct page *page;
   616		int ret;
   617	
   618		mutex_lock(&balloon_mutex);
   619	
   620		balloon_stats.target_unpopulated += nr_pages;
   621	
   622		while (pgno < nr_pages) {
   623			page = balloon_retrieve(true);
   624			if (page) {
   625				pages[pgno++] = page;
   626	#ifdef CONFIG_XEN_HAVE_PVMMU
   627				/*
   628				 * We don't support PV MMU when Linux and Xen is using
   629				 * different page granularity.
   630				 */
   631				BUILD_BUG_ON(XEN_PAGE_SIZE != PAGE_SIZE);
   632	
   633				if (!xen_feature(XENFEAT_auto_translated_physmap)) {
   634					ret = xen_alloc_p2m_entry(page_to_pfn(page));
   635					if (ret < 0)
   636						goto out_undo;
   637				}
   638	#endif
   639			} else {
   640				ret = add_ballooned_pages(nr_pages - pgno);
   641				if (ret < 0)
   642					goto out_undo;
   643			}
   644		}
   645		mutex_unlock(&balloon_mutex);
   646		return 0;
   647	 out_undo:
   648		mutex_unlock(&balloon_mutex);
   649		xen_free_unpopulated_pages(pgno, pages);
   650		/*
   651		 * NB: free_xenballooned_pages will only subtract pgno pages, but since
   652		 * target_unpopulated is incremented with nr_pages at the start we need
   653		 * to remove the remaining ones also, or accounting will be screwed.
   654		 */
   655		balloon_stats.target_unpopulated -= nr_pages - pgno;
   656		return ret;
   657	}
   658	EXPORT_SYMBOL(xen_alloc_unpopulated_pages);
   659	
   660	/**
   661	 * xen_free_unpopulated_pages - return pages retrieved with get_ballooned_pages
   662	 * @nr_pages: Number of pages
   663	 * @pages: pages to return
   664	 */
 > 665	void xen_free_unpopulated_pages(int nr_pages, struct page **pages)
   666	{
   667		int i;
   668	
   669		mutex_lock(&balloon_mutex);
   670	
   671		for (i = 0; i < nr_pages; i++) {
   672			if (pages[i])
   673				balloon_append(pages[i]);
   674		}
   675	
   676		balloon_stats.target_unpopulated -= nr_pages;
   677	
   678		/* The balloon may be too large now. Shrink it if needed. */
   679		if (current_credit())
   680			wake_up(&balloon_thread_wq);
   681	
   682		mutex_unlock(&balloon_mutex);
   683	}
   684	EXPORT_SYMBOL(xen_free_unpopulated_pages);
   685	

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

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

      reply	other threads:[~2021-10-30 10:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 14:22 Juergen Gross
2021-10-30 10:27 ` kernel test robot [this message]

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=202110301843.7Wg3e0aV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®