All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-5.4 9996/9999] arch/sh/kernel/dma-coherent.c:41:31: error: implicit declaration of function 'translate_phys_to_dma'
@ 2022-02-05  5:11 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-02-05  5:11 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head:   a458b617a5e36fc7d7cd9d8b95b480e57a4b3331
commit: 8d65ae5e3cd6200ea6f8bdf431e11037e123bf2c [9996/9999] FIXUP: BACKPORT: dma-mapping: introduce DMA range map, supplanting dma_pfn_offset
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220205/202202051337.LhkRf6AB-lkp(a)intel.com/config)
compiler: sh4-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
        git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
        git fetch --no-tags chrome-os chromeos-5.4
        git checkout 8d65ae5e3cd6200ea6f8bdf431e11037e123bf2c
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash

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 >>):

   arch/sh/kernel/dma-coherent.c: In function 'arch_dma_alloc':
>> arch/sh/kernel/dma-coherent.c:41:31: error: implicit declaration of function 'translate_phys_to_dma' [-Werror=implicit-function-declaration]
      41 |                 *dma_handle = translate_phys_to_dma(dev, *dma_handle);
         |                               ^~~~~~~~~~~~~~~~~~~~~
   arch/sh/kernel/dma-coherent.c: In function 'arch_dma_free':
   arch/sh/kernel/dma-coherent.c:54:27: error: 'struct device' has no member named 'dma_pfn_offset'
      54 |                 pfn += dev->dma_pfn_offset;
         |                           ^~
   cc1: all warnings being treated as errors


vim +/translate_phys_to_dma +41 arch/sh/kernel/dma-coherent.c

    11	
    12	void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
    13			gfp_t gfp, unsigned long attrs)
    14	{
    15		void *ret, *ret_nocache;
    16		int order = get_order(size);
    17	
    18		gfp |= __GFP_ZERO;
    19	
    20		ret = (void *)__get_free_pages(gfp, order);
    21		if (!ret)
    22			return NULL;
    23	
    24		/*
    25		 * Pages from the page allocator may have data present in
    26		 * cache. So flush the cache before using uncached memory.
    27		 */
    28		arch_sync_dma_for_device(virt_to_phys(ret), size,
    29				DMA_BIDIRECTIONAL);
    30	
    31		ret_nocache = (void __force *)ioremap_nocache(virt_to_phys(ret), size);
    32		if (!ret_nocache) {
    33			free_pages((unsigned long)ret, order);
    34			return NULL;
    35		}
    36	
    37		split_page(pfn_to_page(virt_to_phys(ret) >> PAGE_SHIFT), order);
    38	
    39		*dma_handle = virt_to_phys(ret);
    40		if (!WARN_ON(!dev) && dev->dma_range_map)
  > 41			*dma_handle = translate_phys_to_dma(dev, *dma_handle);
    42	
    43		return ret_nocache;
    44	}
    45	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-05  5:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-05  5:11 [chrome-os:chromeos-5.4 9996/9999] arch/sh/kernel/dma-coherent.c:41:31: error: implicit declaration of function 'translate_phys_to_dma' kernel test robot

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.