From: kernel test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-kernel@vger.kernel.org, Robin Murphy <robin.murphy@arm.com>
Subject: arch/mips/bmips/dma.c:55:13: warning: no previous prototype for function 'dma_to_phys'
Date: Thu, 7 Jan 2021 08:17:57 +0800 [thread overview]
Message-ID: <202101070847.9Omo5dNf-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3473 bytes --]
Hi Christoph,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62
commit: 7bc5c428a660d4d1bc95ba54bf4cb6bccf8c3029 dma-direct: remove __dma_to_phys
date: 4 months ago
config: mips-randconfig-r021-20210107 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5c951623bc8965fa1e89660f2f5f4a2944e4981a)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7bc5c428a660d4d1bc95ba54bf4cb6bccf8c3029
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7bc5c428a660d4d1bc95ba54bf4cb6bccf8c3029
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
arch/mips/bmips/dma.c:43:12: warning: no previous prototype for function '__phys_to_dma' [-Wmissing-prototypes]
dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t pa)
^
arch/mips/bmips/dma.c:43:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t pa)
^
static
>> arch/mips/bmips/dma.c:55:13: warning: no previous prototype for function 'dma_to_phys' [-Wmissing-prototypes]
phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr)
^
arch/mips/bmips/dma.c:55:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr)
^
static
arch/mips/bmips/dma.c:67:6: warning: no previous prototype for function 'arch_sync_dma_for_cpu_all' [-Wmissing-prototypes]
void arch_sync_dma_for_cpu_all(void)
^
arch/mips/bmips/dma.c:67:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void arch_sync_dma_for_cpu_all(void)
^
static
3 warnings generated.
vim +/dma_to_phys +55 arch/mips/bmips/dma.c
42
> 43 dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t pa)
44 {
45 struct bmips_dma_range *r;
46
47 for (r = bmips_dma_ranges; r && r->size; r++) {
48 if (pa >= r->child_addr &&
49 pa < (r->child_addr + r->size))
50 return pa - r->child_addr + r->parent_addr;
51 }
52 return pa;
53 }
54
> 55 phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dma_addr)
56 {
57 struct bmips_dma_range *r;
58
59 for (r = bmips_dma_ranges; r && r->size; r++) {
60 if (dma_addr >= r->parent_addr &&
61 dma_addr < (r->parent_addr + r->size))
62 return dma_addr - r->parent_addr + r->child_addr;
63 }
64 return dma_addr;
65 }
66
---
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: 31966 bytes --]
reply other threads:[~2021-01-07 0:19 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=202101070847.9Omo5dNf-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=hch@lst.de \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
/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