All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [chrome-os:chromeos-5.4 23/34] include/linux/dma-direct.h:67:23: error: implicit declaration of function 'phys_to_dma'; did you mean 'phys_to_virt'?
Date: Wed, 27 Oct 2021 04:50:24 +0800	[thread overview]
Message-ID: <202110270416.bjgO3Taa-lkp@intel.com> (raw)

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

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head:   0ffc3fefa095fe3af167315342c27febc8ef1999
commit: c2daf6467d0eacb7ae780639bdb565c5aa312d64 [23/34] BACKPORT: dma-direct: rename and cleanup __phys_to_dma
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
        git fetch --no-tags chrome-os chromeos-5.4
        git checkout c2daf6467d0eacb7ae780639bdb565c5aa312d64
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

   In file included from drivers/iommu/intel/iommu.c:41:
   include/linux/dma-direct.h:58:20: error: conflicting types for 'dma_capable'
      58 | static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size,
         |                    ^~~~~~~~~~~
   In file included from include/linux/dma-direct.h:16,
                    from drivers/iommu/intel/iommu.c:41:
   arch/x86/include/asm/dma-direct.h:5:6: note: previous declaration of 'dma_capable' was here
       5 | bool dma_capable(struct device *dev, dma_addr_t addr, size_t size);
         |      ^~~~~~~~~~~
   In file included from drivers/iommu/intel/iommu.c:41:
   include/linux/dma-direct.h: In function 'dma_capable':
>> include/linux/dma-direct.h:67:23: error: implicit declaration of function 'phys_to_dma'; did you mean 'phys_to_virt'? [-Werror=implicit-function-declaration]
      67 |      min(addr, end) < phys_to_dma(dev, PFN_PHYS(min_low_pfn)))
         |                       ^~~~~~~~~~~
         |                       phys_to_virt
   include/linux/dma-direct.h: In function 'dma_direct_sync_single_for_device':
   include/linux/dma-direct.h:131:22: error: implicit declaration of function 'dma_to_phys'; did you mean 'virt_to_phys'? [-Werror=implicit-function-declaration]
     131 |  phys_addr_t paddr = dma_to_phys(dev, addr);
         |                      ^~~~~~~~~~~
         |                      virt_to_phys
   cc1: some warnings being treated as errors


vim +67 include/linux/dma-direct.h

9087c37584fb7d8 Tom Lendacky           2019-07-10  57  
5e3d879b39d714a Christoph Hellwig      2019-11-19  58  static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size,
5e3d879b39d714a Christoph Hellwig      2019-11-19  59  		bool is_ram)
f499b916beb465b Christoph Hellwig      2019-11-12  60  {
f499b916beb465b Christoph Hellwig      2019-11-12  61  	dma_addr_t end = addr + size - 1;
f499b916beb465b Christoph Hellwig      2019-11-12  62  
f499b916beb465b Christoph Hellwig      2019-11-12  63  	if (!dev->dma_mask)
f499b916beb465b Christoph Hellwig      2019-11-12  64  		return false;
f499b916beb465b Christoph Hellwig      2019-11-12  65  
5e3d879b39d714a Christoph Hellwig      2019-11-19  66  	if (is_ram && !IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT) &&
f499b916beb465b Christoph Hellwig      2019-11-12 @67  	    min(addr, end) < phys_to_dma(dev, PFN_PHYS(min_low_pfn)))
f499b916beb465b Christoph Hellwig      2019-11-12  68  		return false;
f499b916beb465b Christoph Hellwig      2019-11-12  69  
2d6f338d8e7b911 Nicolas Saenz Julienne 2019-11-21  70  	return end <= min_not_zero(*dev->dma_mask, dev->bus_dma_limit);
f499b916beb465b Christoph Hellwig      2019-11-12  71  }
f499b916beb465b Christoph Hellwig      2019-11-12  72  

:::::: The code at line 67 was first introduced by commit
:::::: f499b916beb465bb9087318982fd2676cebc32ce UPSTREAM: dma-direct: avoid a forward declaration for phys_to_dma

:::::: TO: Christoph Hellwig <hch@lst.de>
:::::: CC: Commit Bot <commit-bot@chromium.org>

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

                 reply	other threads:[~2021-10-26 20:50 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=202110270416.bjgO3Taa-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.