All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [hch-misc:dma_alloc_pages /6] kernel/dma/mapping.c:399:2: error: implicit declaration of function 'dma_free_contiguous'; did you mean 'set_zone_contiguous'?
Date: Tue, 01 Oct 2019 01:47:52 +0800	[thread overview]
Message-ID: <201910010147.IfAmGmiC%lkp@intel.com> (raw)

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

tree:   git://git.infradead.org/users/hch/misc.git dma_alloc_pages
head:   9321e87b6405e6a6af978c0221fac97faef5a5e3
commit: aadd1578979b47af197cf5acedc2a63d068e357e [/6] dma-mapping: add a new dma_alloc_pages API
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout aadd1578979b47af197cf5acedc2a63d068e357e
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=powerpc 

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

Note: the hch-misc/dma_alloc_pages HEAD 9321e87b6405e6a6af978c0221fac97faef5a5e3 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   kernel/dma/mapping.c: In function 'dma_alloc_pages':
   kernel/dma/mapping.c:387:9: error: implicit declaration of function 'dma_alloc_contiguous'; did you mean 'dma_alloc_coherent'? [-Werror=implicit-function-declaration]
     return dma_alloc_contiguous(dev, size, gfp);
            ^~~~~~~~~~~~~~~~~~~~
            dma_alloc_coherent
   kernel/dma/mapping.c:387:9: warning: return makes pointer from integer without a cast [-Wint-conversion]
     return dma_alloc_contiguous(dev, size, gfp);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/dma/mapping.c: In function 'dma_free_pages':
>> kernel/dma/mapping.c:399:2: error: implicit declaration of function 'dma_free_contiguous'; did you mean 'set_zone_contiguous'? [-Werror=implicit-function-declaration]
     dma_free_contiguous(dev, page, size);
     ^~~~~~~~~~~~~~~~~~~
     set_zone_contiguous
   cc1: some warnings being treated as errors

vim +399 kernel/dma/mapping.c

   347	
   348	/**
   349	 * dma_alloc_pages - allocate memory that is DMA addressable by a device
   350	 * @dev:	device the memory is allocated for
   351	 * @size:	size of the memory to be allocated
   352	 * @gfp:	GFP_* mask for the memory allocation
   353	 *
   354	 * This function allocates memory which is guaranteed to be DMA addressable
   355	 * by @dev when later mapped for DMA using the dma_map_page(), dma_map_single(),
   356	 * or dma_map_sg() functions.
   357	 */
   358	struct page *dma_alloc_pages(struct device *dev, size_t size, gfp_t gfp)
   359	{
   360		const struct dma_map_ops *ops = get_dma_ops(dev);
   361	
   362		/* let the implementation decide on the zone to allocate from: */
   363		if (WARN_ON_ONCE(gfp & (__GFP_DMA | __GFP_DMA32)))
   364			return NULL;
   365	
   366		/* we must zero all memory to avoid information leaks */
   367		gfp |= __GFP_ZERO;
   368	
   369		if (dma_is_direct(ops))
   370			return dma_direct_alloc_pages(dev, size, gfp);
   371	
   372		/*
   373		 * Must return a page from the page allocator or CMA.
   374		 */
   375		if (ops->alloc_pages)
   376			return ops->alloc_pages(dev, size, gfp);
   377	
   378		/*
   379		 * Everything that looks remotely like an IOMMU should be able to map
   380		 * any system memory into at least 32-bit of dma_addr_t.
   381		 */
   382		if (dev->coherent_dma_mask < 32) {
   383			dev_warn(dev, "can't support DMA page allocation for DMA mask < 32-bit\n");
   384			return NULL;
   385		}
   386	
 > 387		return dma_alloc_contiguous(dev, size, gfp);
   388	}
   389	EXPORT_SYMBOL_GPL(dma_alloc_pages);
   390	
   391	/**
   392	 * dma_free_pages - free memory allocated by dma_alloc_pages()
   393	 * @dev:	device the memory is allocated for
   394	 * @page:	the memory to be freed
   395	 * @size:	size of the memory to be freed
   396	 */
   397	void dma_free_pages(struct device *dev, struct page *page, size_t size)
   398	{
 > 399		dma_free_contiguous(dev, page, size);
   400	}
   401	EXPORT_SYMBOL_GPL(dma_free_pages);
   402	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

                 reply	other threads:[~2019-09-30 17:47 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=201910010147.IfAmGmiC%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.