From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [chrome-os:chromeos-5.4 87/99] kernel/dma/swiotlb.c:796:3: warning: ISO C90 forbids mixed declarations and code
Date: Thu, 04 Mar 2021 06:26:16 +0800 [thread overview]
Message-ID: <202103040611.rQLR8pAX-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2735 bytes --]
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: f48859423bcc5a5dc65f30eb1dd540af19cf5ebe
commit: 90482b41670aad6b7552228721b32566cd8cb75c [87/99] BACKPORT: FROMLIST: swiotlb: Add restricted DMA pool
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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 90482b41670aad6b7552228721b32566cd8cb75c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 >>):
kernel/dma/swiotlb.c:292:1: warning: no previous prototype for 'swiotlb_late_init_with_default_size' [-Wmissing-prototypes]
292 | swiotlb_late_init_with_default_size(size_t default_size)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/dma/swiotlb.c: In function 'rmem_swiotlb_device_init':
>> kernel/dma/swiotlb.c:796:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
796 | unsigned long pfn = PHYS_PFN(rmem->base);
| ^~~~~~~~
vim +796 kernel/dma/swiotlb.c
776
777 #ifdef CONFIG_DMA_RESTRICTED_POOL
778 static int rmem_swiotlb_device_init(struct reserved_mem *rmem,
779 struct device *dev)
780 {
781 struct swiotlb *swiotlb = rmem->priv;
782 int ret;
783
784 if (dev->dev_swiotlb)
785 return -EBUSY;
786
787 /* Since multiple devices can share the same pool, the private data,
788 * swiotlb struct, will be initialized by the first device attached
789 * to it.
790 */
791 if (!swiotlb) {
792 swiotlb = kzalloc(sizeof(*swiotlb), GFP_KERNEL);
793 if (!swiotlb)
794 return -ENOMEM;
795 #ifdef CONFIG_ARM
> 796 unsigned long pfn = PHYS_PFN(rmem->base);
797
798 if (!PageHighMem(pfn_to_page(pfn))) {
799 ret = -EINVAL;
800 goto cleanup;
801 }
802 #endif /* CONFIG_ARM */
803
804 ret = swiotlb_init_tlb_pool(swiotlb, rmem->base, rmem->size);
805 if (ret)
806 goto cleanup;
807
808 rmem->priv = swiotlb;
809 }
810
---
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: 73541 bytes --]
reply other threads:[~2021-03-03 22:26 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=202103040611.rQLR8pAX-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.