* [chrome-os:chromeos-5.4 87/99] kernel/dma/swiotlb.c:796:3: warning: ISO C90 forbids mixed declarations and code
@ 2021-03-03 22:26 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-03 22:26 UTC (permalink / raw)
To: kbuild-all
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-03 22:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 22:26 [chrome-os:chromeos-5.4 87/99] kernel/dma/swiotlb.c:796:3: warning: ISO C90 forbids mixed declarations and code 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.