* Re: [PATCH] dma-mapping: fix dma_addressing_limited if dma_range_map is scanned [not found] <20230912084002.2168-1-justin.he@arm.com> @ 2023-09-12 18:28 ` kernel test robot 2023-09-15 8:10 ` Justin He 2023-09-12 19:43 ` kernel test robot 1 sibling, 1 reply; 3+ messages in thread From: kernel test robot @ 2023-09-12 18:28 UTC (permalink / raw) To: Jia He, Christoph Hellwig, Marek Szyprowski, Robin Murphy, iommu Cc: llvm, oe-kbuild-all, linux-kernel, Jia He Hi Jia, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on v6.6-rc1 next-20230912] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Jia-He/dma-mapping-fix-dma_addressing_limited-if-dma_range_map-is-scanned/20230912-164126 base: linus/master patch link: https://lore.kernel.org/r/20230912084002.2168-1-justin.he%40arm.com patch subject: [PATCH] dma-mapping: fix dma_addressing_limited if dma_range_map is scanned config: um-allyesconfig (https://download.01.org/0day-ci/archive/20230913/202309130234.COIfUg9W-lkp@intel.com/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230913/202309130234.COIfUg9W-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202309130234.COIfUg9W-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from init/main.c:21: In file included from include/linux/syscalls.h:90: In file included from include/trace/syscall.h:7: In file included from include/linux/trace_events.h:9: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from init/main.c:21: In file included from include/linux/syscalls.h:90: In file included from include/trace/syscall.h:7: In file included from include/linux/trace_events.h:9: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from init/main.c:21: In file included from include/linux/syscalls.h:90: In file included from include/trace/syscall.h:7: In file included from include/linux/trace_events.h:9: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ In file included from init/main.c:102: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:28: >> include/linux/dma-mapping.h:483:10: error: implicit declaration of function 'all_ram_in_dma_range_map' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return !all_ram_in_dma_range_map(dev); ^ 12 warnings and 1 error generated. -- In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:28: >> include/linux/dma-mapping.h:483:10: error: implicit declaration of function 'all_ram_in_dma_range_map' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return !all_ram_in_dma_range_map(dev); ^ arch/um/os-Linux/drivers/ethertap_kern.c:66:5: warning: no previous prototype for function 'ethertap_setup' [-Wmissing-prototypes] int ethertap_setup(char *str, char **mac_out, void *data) ^ arch/um/os-Linux/drivers/ethertap_kern.c:66:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int ethertap_setup(char *str, char **mac_out, void *data) ^ static 13 warnings and 1 error generated. -- In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:28: >> include/linux/dma-mapping.h:483:10: error: implicit declaration of function 'all_ram_in_dma_range_map' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return !all_ram_in_dma_range_map(dev); ^ arch/um/os-Linux/drivers/tuntap_kern.c:56:5: warning: no previous prototype for function 'tuntap_setup' [-Wmissing-prototypes] int tuntap_setup(char *str, char **mac_out, void *data) ^ arch/um/os-Linux/drivers/tuntap_kern.c:56:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int tuntap_setup(char *str, char **mac_out, void *data) ^ static 13 warnings and 1 error generated. -- In file included from net/ipv4/route.c:67: In file included from include/linux/memblock.h:13: In file included from arch/um/include/asm/dma.h:5: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) ^ In file included from net/ipv4/route.c:67: In file included from include/linux/memblock.h:13: In file included from arch/um/include/asm/dma.h:5: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) ^ In file included from net/ipv4/route.c:67: In file included from include/linux/memblock.h:13: In file included from arch/um/include/asm/dma.h:5: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writeb(value, PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] readsl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesb(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesw(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] writesl(PCI_IOBASE + addr, buffer, count); ~~~~~~~~~~ ^ In file included from net/ipv4/route.c:71: In file included from include/linux/inet.h:42: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:28: >> include/linux/dma-mapping.h:483:10: error: implicit declaration of function 'all_ram_in_dma_range_map' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return !all_ram_in_dma_range_map(dev); ^ net/ipv4/route.c:880:6: warning: variable 'log_martians' set but not used [-Wunused-but-set-variable] int log_martians; ^ 13 warnings and 1 error generated. .. vim +/all_ram_in_dma_range_map +483 include/linux/dma-mapping.h 468 469 /** 470 * dma_addressing_limited - return if the device is addressing limited 471 * @dev: device to check 472 * 473 * Return %true if the devices DMA mask is too small to address all memory in 474 * the system, else %false. Lack of addressing bits is the prime reason for 475 * bounce buffering, but might not be the only one. 476 */ 477 static inline bool dma_addressing_limited(struct device *dev) 478 { 479 if (min_not_zero(dma_get_mask(dev), dev->bus_dma_limit) < 480 dma_get_required_mask(dev)) 481 return true; 482 > 483 return !all_ram_in_dma_range_map(dev); 484 } 485 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] dma-mapping: fix dma_addressing_limited if dma_range_map is scanned 2023-09-12 18:28 ` [PATCH] dma-mapping: fix dma_addressing_limited if dma_range_map is scanned kernel test robot @ 2023-09-15 8:10 ` Justin He 0 siblings, 0 replies; 3+ messages in thread From: Justin He @ 2023-09-15 8:10 UTC (permalink / raw) To: kernel test robot, Christoph Hellwig, Marek Szyprowski, Robin Murphy, iommu@lists.linux.dev Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, nd > -----Original Message----- > From: kernel test robot <lkp@intel.com> > Sent: Wednesday, September 13, 2023 2:28 AM > To: Justin He <Justin.He@arm.com>; Christoph Hellwig <hch@lst.de>; Marek > Szyprowski <m.szyprowski@samsung.com>; Robin Murphy > <Robin.Murphy@arm.com>; iommu@lists.linux.dev > Cc: llvm@lists.linux.dev; oe-kbuild-all@lists.linux.dev; > linux-kernel@vger.kernel.org; Justin He <Justin.He@arm.com> > Subject: Re: [PATCH] dma-mapping: fix dma_addressing_limited if > dma_range_map is scanned > > Hi Jia, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on linus/master] > [also build test ERROR on v6.6-rc1 next-20230912] [If your patch is applied to > the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commits/Jia-He/dma-mapping-fix-dma_ > addressing_limited-if-dma_range_map-is-scanned/20230912-164126 > base: linus/master > patch link: > https://lore.kernel.org/r/20230912084002.2168-1-justin.he%40arm.com > patch subject: [PATCH] dma-mapping: fix dma_addressing_limited if > dma_range_map is scanned > config: um-allyesconfig > (https://download.01.org/0day-ci/archive/20230913/202309130234.COIfUg9 > W-lkp@intel.com/config) > compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git > f28c006a5895fc0e329fe15fead81e37457cb1d1) > reproduce (this is a W=1 build): > (https://download.01.org/0day-ci/archive/20230913/202309130234.COIfUg9 > W-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot <lkp@intel.com> > | Closes: > | https://lore.kernel.org/oe-kbuild-all/202309130234.COIfUg9W-lkp@intel. > | com/ > > All errors (new ones prefixed by >>): > > In file included from init/main.c:21: > In file included from include/linux/syscalls.h:90: > In file included from include/trace/syscall.h:7: > In file included from include/linux/trace_events.h:9: > In file included from include/linux/hardirq.h:11: > In file included from arch/um/include/asm/hardirq.h:5: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:547:31: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __raw_readb(PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:560:61: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + > addr)); > > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from > macro '__le16_to_cpu' > #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) > ^ > In file included from init/main.c:21: > In file included from include/linux/syscalls.h:90: > In file included from include/trace/syscall.h:7: > In file included from include/linux/trace_events.h:9: > In file included from include/linux/hardirq.h:11: > In file included from arch/um/include/asm/hardirq.h:5: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:573:61: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + > addr)); > > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from > macro '__le32_to_cpu' > #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) > ^ > In file included from init/main.c:21: > In file included from include/linux/syscalls.h:90: > In file included from include/trace/syscall.h:7: > In file included from include/linux/trace_events.h:9: > In file included from include/linux/hardirq.h:11: > In file included from arch/um/include/asm/hardirq.h:5: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:584:33: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writeb(value, PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:594:59: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + > addr); > ~~~~~~~~~~ > ^ > include/asm-generic/io.h:604:59: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + > addr); > ~~~~~~~~~~ > ^ > include/asm-generic/io.h:692:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsb(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:700:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsw(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:708:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsl(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:717:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesb(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:726:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesw(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:735:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesl(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > In file included from init/main.c:102: > In file included from include/net/net_namespace.h:43: > In file included from include/linux/skbuff.h:28: > >> include/linux/dma-mapping.h:483:10: error: implicit declaration of > >> function 'all_ram_in_dma_range_map' is invalid in C99 > >> [-Werror,-Wimplicit-function-declaration] > return !all_ram_in_dma_range_map(dev); Seems I need to define a stub when DMA Kconfig is disabled. Thanks -- Cheers, Justin (Jia He) > ^ > 12 warnings and 1 error generated. > -- > In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: > In file included from include/linux/netdevice.h:38: > In file included from include/net/net_namespace.h:43: > In file included from include/linux/skbuff.h:17: > In file included from include/linux/bvec.h:10: > In file included from include/linux/highmem.h:12: > In file included from include/linux/hardirq.h:11: > In file included from arch/um/include/asm/hardirq.h:5: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:547:31: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __raw_readb(PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:560:61: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + > addr)); > > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from > macro '__le16_to_cpu' > #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) > ^ > In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: > In file included from include/linux/netdevice.h:38: > In file included from include/net/net_namespace.h:43: > In file included from include/linux/skbuff.h:17: > In file included from include/linux/bvec.h:10: > In file included from include/linux/highmem.h:12: > In file included from include/linux/hardirq.h:11: > In file included from arch/um/include/asm/hardirq.h:5: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:573:61: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + > addr)); > > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from > macro '__le32_to_cpu' > #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) > ^ > In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: > In file included from include/linux/netdevice.h:38: > In file included from include/net/net_namespace.h:43: > In file included from include/linux/skbuff.h:17: > In file included from include/linux/bvec.h:10: > In file included from include/linux/highmem.h:12: > In file included from include/linux/hardirq.h:11: > In file included from arch/um/include/asm/hardirq.h:5: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:584:33: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writeb(value, PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:594:59: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + > addr); > ~~~~~~~~~~ > ^ > include/asm-generic/io.h:604:59: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + > addr); > ~~~~~~~~~~ > ^ > include/asm-generic/io.h:692:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsb(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:700:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsw(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:708:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsl(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:717:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesb(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:726:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesw(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:735:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesl(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: > In file included from include/linux/netdevice.h:38: > In file included from include/net/net_namespace.h:43: > In file included from include/linux/skbuff.h:28: > >> include/linux/dma-mapping.h:483:10: error: implicit declaration of > >> function 'all_ram_in_dma_range_map' is invalid in C99 > >> [-Werror,-Wimplicit-function-declaration] > return !all_ram_in_dma_range_map(dev); > ^ > arch/um/os-Linux/drivers/ethertap_kern.c:66:5: warning: no previous > prototype for function 'ethertap_setup' [-Wmissing-prototypes] > int ethertap_setup(char *str, char **mac_out, void *data) > ^ > arch/um/os-Linux/drivers/ethertap_kern.c:66:1: note: declare 'static' if the > function is not intended to be used outside of this translation unit > int ethertap_setup(char *str, char **mac_out, void *data) > ^ > static > 13 warnings and 1 error generated. > -- > In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: > In file included from include/linux/netdevice.h:38: > In file included from include/net/net_namespace.h:43: > In file included from include/linux/skbuff.h:17: > In file included from include/linux/bvec.h:10: > In file included from include/linux/highmem.h:12: > In file included from include/linux/hardirq.h:11: > In file included from arch/um/include/asm/hardirq.h:5: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:547:31: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __raw_readb(PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:560:61: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + > addr)); > > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from > macro '__le16_to_cpu' > #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) > ^ > In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: > In file included from include/linux/netdevice.h:38: > In file included from include/net/net_namespace.h:43: > In file included from include/linux/skbuff.h:17: > In file included from include/linux/bvec.h:10: > In file included from include/linux/highmem.h:12: > In file included from include/linux/hardirq.h:11: > In file included from arch/um/include/asm/hardirq.h:5: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:573:61: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + > addr)); > > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from > macro '__le32_to_cpu' > #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) > ^ > In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: > In file included from include/linux/netdevice.h:38: > In file included from include/net/net_namespace.h:43: > In file included from include/linux/skbuff.h:17: > In file included from include/linux/bvec.h:10: > In file included from include/linux/highmem.h:12: > In file included from include/linux/hardirq.h:11: > In file included from arch/um/include/asm/hardirq.h:5: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:584:33: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writeb(value, PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:594:59: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + > addr); > ~~~~~~~~~~ > ^ > include/asm-generic/io.h:604:59: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + > addr); > ~~~~~~~~~~ > ^ > include/asm-generic/io.h:692:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsb(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:700:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsw(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:708:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsl(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:717:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesb(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:726:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesw(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:735:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesl(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: > In file included from include/linux/netdevice.h:38: > In file included from include/net/net_namespace.h:43: > In file included from include/linux/skbuff.h:28: > >> include/linux/dma-mapping.h:483:10: error: implicit declaration of > >> function 'all_ram_in_dma_range_map' is invalid in C99 > >> [-Werror,-Wimplicit-function-declaration] > return !all_ram_in_dma_range_map(dev); > ^ > arch/um/os-Linux/drivers/tuntap_kern.c:56:5: warning: no previous > prototype for function 'tuntap_setup' [-Wmissing-prototypes] > int tuntap_setup(char *str, char **mac_out, void *data) > ^ > arch/um/os-Linux/drivers/tuntap_kern.c:56:1: note: declare 'static' if the > function is not intended to be used outside of this translation unit > int tuntap_setup(char *str, char **mac_out, void *data) > ^ > static > 13 warnings and 1 error generated. > -- > In file included from net/ipv4/route.c:67: > In file included from include/linux/memblock.h:13: > In file included from arch/um/include/asm/dma.h:5: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:547:31: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __raw_readb(PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:560:61: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + > addr)); > > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from > macro '__le16_to_cpu' > #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) > ^ > In file included from net/ipv4/route.c:67: > In file included from include/linux/memblock.h:13: > In file included from arch/um/include/asm/dma.h:5: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:573:61: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + > addr)); > > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from > macro '__le32_to_cpu' > #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) > ^ > In file included from net/ipv4/route.c:67: > In file included from include/linux/memblock.h:13: > In file included from arch/um/include/asm/dma.h:5: > In file included from arch/um/include/asm/io.h:24: > include/asm-generic/io.h:584:33: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writeb(value, PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:594:59: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + > addr); > ~~~~~~~~~~ > ^ > include/asm-generic/io.h:604:59: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + > addr); > ~~~~~~~~~~ > ^ > include/asm-generic/io.h:692:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsb(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:700:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsw(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:708:20: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > readsl(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:717:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesb(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:726:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesw(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:735:21: warning: performing pointer arithmetic > on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > writesl(PCI_IOBASE + addr, buffer, count); > ~~~~~~~~~~ ^ > In file included from net/ipv4/route.c:71: > In file included from include/linux/inet.h:42: > In file included from include/net/net_namespace.h:43: > In file included from include/linux/skbuff.h:28: > >> include/linux/dma-mapping.h:483:10: error: implicit declaration of > >> function 'all_ram_in_dma_range_map' is invalid in C99 > >> [-Werror,-Wimplicit-function-declaration] > return !all_ram_in_dma_range_map(dev); > ^ > net/ipv4/route.c:880:6: warning: variable 'log_martians' set but not used > [-Wunused-but-set-variable] > int log_martians; > ^ > 13 warnings and 1 error generated. > .. > > > vim +/all_ram_in_dma_range_map +483 include/linux/dma-mapping.h > > 468 > 469 /** > 470 * dma_addressing_limited - return if the device is addressing > limited > 471 * @dev: device to check > 472 * > 473 * Return %true if the devices DMA mask is too small to address all > memory in > 474 * the system, else %false. Lack of addressing bits is the prime > reason for > 475 * bounce buffering, but might not be the only one. > 476 */ > 477 static inline bool dma_addressing_limited(struct device *dev) > 478 { > 479 if (min_not_zero(dma_get_mask(dev), dev->bus_dma_limit) < > 480 dma_get_required_mask(dev)) > 481 return true; > 482 > > 483 return !all_ram_in_dma_range_map(dev); > 484 } > 485 > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dma-mapping: fix dma_addressing_limited if dma_range_map is scanned [not found] <20230912084002.2168-1-justin.he@arm.com> 2023-09-12 18:28 ` [PATCH] dma-mapping: fix dma_addressing_limited if dma_range_map is scanned kernel test robot @ 2023-09-12 19:43 ` kernel test robot 1 sibling, 0 replies; 3+ messages in thread From: kernel test robot @ 2023-09-12 19:43 UTC (permalink / raw) To: Jia He, Christoph Hellwig, Marek Szyprowski, Robin Murphy, iommu Cc: llvm, oe-kbuild-all, linux-kernel, Jia He Hi Jia, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on hch-configfs/for-next v6.6-rc1 next-20230912] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Jia-He/dma-mapping-fix-dma_addressing_limited-if-dma_range_map-is-scanned/20230912-164126 base: linus/master patch link: https://lore.kernel.org/r/20230912084002.2168-1-justin.he%40arm.com patch subject: [PATCH] dma-mapping: fix dma_addressing_limited if dma_range_map is scanned config: um-randconfig-r012-20230912 (https://download.01.org/0day-ci/archive/20230913/202309130345.xV6bouV1-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230913/202309130345.xV6bouV1-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202309130345.xV6bouV1-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from block/blk-settings.c:8: In file included from include/linux/bio.h:10: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 547 | val = __raw_readb(PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ In file included from block/blk-settings.c:8: In file included from include/linux/bio.h:10: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' 35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) | ^ In file included from block/blk-settings.c:8: In file included from include/linux/bio.h:10: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 584 | __raw_writeb(value, PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 692 | readsb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 700 | readsw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 708 | readsl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 717 | writesb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 726 | writesw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 735 | writesl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ In file included from block/blk-settings.c:16: >> include/linux/dma-mapping.h:483:10: error: call to undeclared function 'all_ram_in_dma_range_map'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 483 | return !all_ram_in_dma_range_map(dev); | ^ 12 warnings and 1 error generated. -- In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 547 | val = __raw_readb(PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' 35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) | ^ In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 584 | __raw_writeb(value, PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 692 | readsb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 700 | readsw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 708 | readsl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 717 | writesb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 726 | writesw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 735 | writesl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ In file included from arch/um/os-Linux/drivers/tuntap_kern.c:6: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:28: >> include/linux/dma-mapping.h:483:10: error: call to undeclared function 'all_ram_in_dma_range_map'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 483 | return !all_ram_in_dma_range_map(dev); | ^ arch/um/os-Linux/drivers/tuntap_kern.c:56:5: warning: no previous prototype for function 'tuntap_setup' [-Wmissing-prototypes] 56 | int tuntap_setup(char *str, char **mac_out, void *data) | ^ arch/um/os-Linux/drivers/tuntap_kern.c:56:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 56 | int tuntap_setup(char *str, char **mac_out, void *data) | ^ | static 13 warnings and 1 error generated. -- In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 547 | val = __raw_readb(PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' 35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) | ^ In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 584 | __raw_writeb(value, PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 692 | readsb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 700 | readsw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 708 | readsl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 717 | writesb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 726 | writesw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 735 | writesl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ In file included from arch/um/os-Linux/drivers/ethertap_kern.c:10: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:28: >> include/linux/dma-mapping.h:483:10: error: call to undeclared function 'all_ram_in_dma_range_map'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 483 | return !all_ram_in_dma_range_map(dev); | ^ arch/um/os-Linux/drivers/ethertap_kern.c:66:5: warning: no previous prototype for function 'ethertap_setup' [-Wmissing-prototypes] 66 | int ethertap_setup(char *str, char **mac_out, void *data) | ^ arch/um/os-Linux/drivers/ethertap_kern.c:66:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 66 | int ethertap_setup(char *str, char **mac_out, void *data) | ^ | static 13 warnings and 1 error generated. -- In file included from net/ipv4/igmp.c:79: In file included from include/linux/inet.h:42: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 547 | val = __raw_readb(PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ In file included from net/ipv4/igmp.c:79: In file included from include/linux/inet.h:42: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr)); | ~~~~~~~~~~ ^ include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu' 35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) | ^ In file included from net/ipv4/igmp.c:79: In file included from include/linux/inet.h:42: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/um/include/asm/hardirq.h:5: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/um/include/asm/io.h:24: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 584 | __raw_writeb(value, PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 692 | readsb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 700 | readsw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 708 | readsl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 717 | writesb(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 726 | writesw(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 735 | writesl(PCI_IOBASE + addr, buffer, count); | ~~~~~~~~~~ ^ In file included from net/ipv4/igmp.c:79: In file included from include/linux/inet.h:42: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:28: >> include/linux/dma-mapping.h:483:10: error: call to undeclared function 'all_ram_in_dma_range_map'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 483 | return !all_ram_in_dma_range_map(dev); | ^ net/ipv4/igmp.c:1913:6: warning: variable 'changerec' set but not used [-Wunused-but-set-variable] 1913 | int changerec = 0; | ^ 13 warnings and 1 error generated. .. vim +/all_ram_in_dma_range_map +483 include/linux/dma-mapping.h 468 469 /** 470 * dma_addressing_limited - return if the device is addressing limited 471 * @dev: device to check 472 * 473 * Return %true if the devices DMA mask is too small to address all memory in 474 * the system, else %false. Lack of addressing bits is the prime reason for 475 * bounce buffering, but might not be the only one. 476 */ 477 static inline bool dma_addressing_limited(struct device *dev) 478 { 479 if (min_not_zero(dma_get_mask(dev), dev->bus_dma_limit) < 480 dma_get_required_mask(dev)) 481 return true; 482 > 483 return !all_ram_in_dma_range_map(dev); 484 } 485 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-15 8:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230912084002.2168-1-justin.he@arm.com>
2023-09-12 18:28 ` [PATCH] dma-mapping: fix dma_addressing_limited if dma_range_map is scanned kernel test robot
2023-09-15 8:10 ` Justin He
2023-09-12 19:43 ` kernel test robot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox