Re: [PATCH 1/2] Add new flush_iotlb_range and handle freelists when using iommu_unmap_fast
by kernel test robot
Hi Tom,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tegra/for-next]
[also build test ERROR on vfio/next v5.9-rc1 next-20200817]
[cannot apply to iommu/next]
[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]
url: https://github.com/0day-ci/linux/commits/Tom-Murphy/Add-new-flush_iotlb_r...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
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
# 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(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/iommu/mtk_iommu_v1.c:526:12: error: initialization of 'size_t (*)(struct iommu_domain *, long unsigned int, size_t, struct iommu_iotlb_gather *, struct page **)' {aka 'unsigned int (*)(struct iommu_domain *, long unsigned int, unsigned int, struct iommu_iotlb_gather *, struct page **)'} from incompatible pointer type 'size_t (*)(struct iommu_domain *, long unsigned int, size_t, struct iommu_iotlb_gather *)' {aka 'unsigned int (*)(struct iommu_domain *, long unsigned int, unsigned int, struct iommu_iotlb_gather *)'} [-Werror=incompatible-pointer-types]
526 | .unmap = mtk_iommu_unmap,
| ^~~~~~~~~~~~~~~
drivers/iommu/mtk_iommu_v1.c:526:12: note: (near initialization for 'mtk_iommu_ops.unmap')
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/d64ecd192f5239ba9fbf8124e7b3069cb...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tom-Murphy/Add-new-flush_iotlb_range-and-handle-freelists-when-using-iommu_unmap_fast/20200818-052129
git checkout d64ecd192f5239ba9fbf8124e7b3069cb4145c47
vim +526 drivers/iommu/mtk_iommu_v1.c
b17336c55d8928 Honghui Zhang 2016-06-08 519
b65f501627fffc Arvind Yadav 2018-10-18 520 static const struct iommu_ops mtk_iommu_ops = {
b17336c55d8928 Honghui Zhang 2016-06-08 521 .domain_alloc = mtk_iommu_domain_alloc,
b17336c55d8928 Honghui Zhang 2016-06-08 522 .domain_free = mtk_iommu_domain_free,
b17336c55d8928 Honghui Zhang 2016-06-08 523 .attach_dev = mtk_iommu_attach_device,
b17336c55d8928 Honghui Zhang 2016-06-08 524 .detach_dev = mtk_iommu_detach_device,
b17336c55d8928 Honghui Zhang 2016-06-08 525 .map = mtk_iommu_map,
b17336c55d8928 Honghui Zhang 2016-06-08 @526 .unmap = mtk_iommu_unmap,
b17336c55d8928 Honghui Zhang 2016-06-08 527 .iova_to_phys = mtk_iommu_iova_to_phys,
57dbf81f50c82a Joerg Roedel 2020-04-29 528 .probe_device = mtk_iommu_probe_device,
57dbf81f50c82a Joerg Roedel 2020-04-29 529 .probe_finalize = mtk_iommu_probe_finalize,
57dbf81f50c82a Joerg Roedel 2020-04-29 530 .release_device = mtk_iommu_release_device,
8bbe13f52cb796 Yong Wu 2020-05-15 531 .def_domain_type = mtk_iommu_def_domain_type,
57dbf81f50c82a Joerg Roedel 2020-04-29 532 .device_group = generic_device_group,
b17336c55d8928 Honghui Zhang 2016-06-08 533 .pgsize_bitmap = ~0UL << MT2701_IOMMU_PAGE_SHIFT,
b17336c55d8928 Honghui Zhang 2016-06-08 534 };
b17336c55d8928 Honghui Zhang 2016-06-08 535
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v1 3/3] usb: early: xhci-dbc: Sort headers alphabetically
by kernel test robot
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on linus/master v5.9-rc1 next-20200817]
[cannot apply to peter.chen-usb/ci-for-usb-next]
[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]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/usb-early-xhci-d...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-randconfig-r014-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project de71b46a519db014ce906a39f8a0e1b235ef1568)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/usb/early/xhci-dbc.c:13:
include/linux/byteorder/generic.h:146:9: error: implicit declaration of function '__cpu_to_le16' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le16(le16_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:90:21: note: expanded from macro 'cpu_to_le16'
#define cpu_to_le16 __cpu_to_le16
^
include/linux/byteorder/generic.h:146:21: error: implicit declaration of function '__le16_to_cpu' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le16(le16_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^
include/linux/byteorder/generic.h:151:9: error: implicit declaration of function '__cpu_to_le32' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le32(le32_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32'
#define cpu_to_le32 __cpu_to_le32
^
include/linux/byteorder/generic.h:151:21: error: implicit declaration of function '__le32_to_cpu' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le32(le32_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:89:21: note: expanded from macro 'le32_to_cpu'
#define le32_to_cpu __le32_to_cpu
^
include/linux/byteorder/generic.h:156:9: error: implicit declaration of function '__cpu_to_le64' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le64(le64_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:86:21: note: expanded from macro 'cpu_to_le64'
#define cpu_to_le64 __cpu_to_le64
^
include/linux/byteorder/generic.h:156:21: error: implicit declaration of function '__le64_to_cpu' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le64(le64_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:87:21: note: expanded from macro 'le64_to_cpu'
#define le64_to_cpu __le64_to_cpu
^
include/linux/byteorder/generic.h:164:12: error: implicit declaration of function '__cpu_to_le16' [-Werror,-Wimplicit-function-declaration]
dst[i] = cpu_to_le16(src[i]);
^
include/linux/byteorder/generic.h:90:21: note: expanded from macro 'cpu_to_le16'
#define cpu_to_le16 __cpu_to_le16
^
include/linux/byteorder/generic.h:172:12: error: implicit declaration of function '__le16_to_cpu' [-Werror,-Wimplicit-function-declaration]
dst[i] = le16_to_cpu(src[i]);
^
include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^
>> include/linux/byteorder/generic.h:179:3: error: implicit declaration of function '__le32_to_cpus' [-Werror,-Wimplicit-function-declaration]
__le32_to_cpus(buf);
^
>> include/linux/byteorder/generic.h:187:3: error: implicit declaration of function '__cpu_to_le32s' [-Werror,-Wimplicit-function-declaration]
__cpu_to_le32s(buf);
^
>> include/linux/byteorder/generic.h:194:9: error: implicit declaration of function '__cpu_to_be16' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_be16(be16_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:96:21: note: expanded from macro 'cpu_to_be16'
#define cpu_to_be16 __cpu_to_be16
^
>> include/linux/byteorder/generic.h:194:21: error: implicit declaration of function '__be16_to_cpu' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_be16(be16_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:97:21: note: expanded from macro 'be16_to_cpu'
#define be16_to_cpu __be16_to_cpu
^
>> include/linux/byteorder/generic.h:199:9: error: implicit declaration of function '__cpu_to_be32' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_be32(be32_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:94:21: note: expanded from macro 'cpu_to_be32'
#define cpu_to_be32 __cpu_to_be32
^
>> include/linux/byteorder/generic.h:199:21: error: implicit declaration of function '__be32_to_cpu' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_be32(be32_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:95:21: note: expanded from macro 'be32_to_cpu'
#define be32_to_cpu __be32_to_cpu
^
>> include/linux/byteorder/generic.h:204:9: error: implicit declaration of function '__cpu_to_be64' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_be64(be64_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:92:21: note: expanded from macro 'cpu_to_be64'
#define cpu_to_be64 __cpu_to_be64
^
>> include/linux/byteorder/generic.h:204:21: error: implicit declaration of function '__be64_to_cpu' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_be64(be64_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:93:21: note: expanded from macro 'be64_to_cpu'
#define be64_to_cpu __be64_to_cpu
^
include/linux/byteorder/generic.h:212:12: error: implicit declaration of function '__cpu_to_be32' [-Werror,-Wimplicit-function-declaration]
dst[i] = cpu_to_be32(src[i]);
^
include/linux/byteorder/generic.h:94:21: note: expanded from macro 'cpu_to_be32'
#define cpu_to_be32 __cpu_to_be32
^
include/linux/byteorder/generic.h:220:12: error: implicit declaration of function '__be32_to_cpu' [-Werror,-Wimplicit-function-declaration]
dst[i] = be32_to_cpu(src[i]);
^
include/linux/byteorder/generic.h:95:21: note: expanded from macro 'be32_to_cpu'
#define be32_to_cpu __be32_to_cpu
^
>> drivers/usb/early/xhci-dbc.c:260:35: error: incompatible pointer types passing 'char [5]' to parameter of type 'const u16 *' (aka 'const unsigned short *') [-Werror,-Wincompatible-pointer-types]
cpu_to_le16_array(s_desc->wData, XDBC_STRING_SERIAL, strlen(XDBC_STRING_SERIAL));
^~~~~~~~~~~~~~~~~~
drivers/usb/early/xhci-dbc.h:92:29: note: expanded from macro 'XDBC_STRING_SERIAL'
#define XDBC_STRING_SERIAL "0001"
^~~~~~
include/linux/byteorder/generic.h:159:62: note: passing argument to parameter 'src' here
static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
# https://github.com/0day-ci/linux/commit/cea598a970d1425a2efd9d4e15b984bd0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/usb-early-xhci-dbc-use-readl_poll_timeout-to-simplify-code/20200818-004710
git checkout cea598a970d1425a2efd9d4e15b984bd015561c9
vim +/__le32_to_cpus +179 include/linux/byteorder/generic.h
379f669600c31f Andy Shevchenko 2020-08-17 174
9def051018c08e Andy Shevchenko 2018-03-21 175 /* XXX: this stuff can be optimized */
9def051018c08e Andy Shevchenko 2018-03-21 176 static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
9def051018c08e Andy Shevchenko 2018-03-21 177 {
9def051018c08e Andy Shevchenko 2018-03-21 178 while (words--) {
9def051018c08e Andy Shevchenko 2018-03-21 @179 __le32_to_cpus(buf);
9def051018c08e Andy Shevchenko 2018-03-21 180 buf++;
9def051018c08e Andy Shevchenko 2018-03-21 181 }
9def051018c08e Andy Shevchenko 2018-03-21 182 }
9def051018c08e Andy Shevchenko 2018-03-21 183
9def051018c08e Andy Shevchenko 2018-03-21 184 static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
9def051018c08e Andy Shevchenko 2018-03-21 185 {
9def051018c08e Andy Shevchenko 2018-03-21 186 while (words--) {
9def051018c08e Andy Shevchenko 2018-03-21 @187 __cpu_to_le32s(buf);
9def051018c08e Andy Shevchenko 2018-03-21 188 buf++;
9def051018c08e Andy Shevchenko 2018-03-21 189 }
9def051018c08e Andy Shevchenko 2018-03-21 190 }
9def051018c08e Andy Shevchenko 2018-03-21 191
8b5f6883683c91 Marcin Slusarz 2008-02-08 192 static inline void be16_add_cpu(__be16 *var, u16 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 193 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 @194 *var = cpu_to_be16(be16_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 195 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 196
8b5f6883683c91 Marcin Slusarz 2008-02-08 197 static inline void be32_add_cpu(__be32 *var, u32 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 198 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 @199 *var = cpu_to_be32(be32_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 200 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 201
8b5f6883683c91 Marcin Slusarz 2008-02-08 202 static inline void be64_add_cpu(__be64 *var, u64 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 203 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 @204 *var = cpu_to_be64(be64_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 205 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 206
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH] ACPI: ioremap: avoid redundant rounding to OS page size
by kernel test robot
Hi Ard,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pm/linux-next]
[also build test WARNING on arm64/for-next/core arm/for-next soc/for-next v5.9-rc1 next-20200817]
[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]
url: https://github.com/0day-ci/linux/commits/Ard-Biesheuvel/ACPI-ioremap-avoi...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-randconfig-m021-20200817 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/acpi/osl.c:371 acpi_os_map_iomem() error: uninitialized symbol 'virt'.
# https://github.com/0day-ci/linux/commit/a34cc34917319aed90ebf9b0fbf414666...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ard-Biesheuvel/ACPI-ioremap-avoid-redundant-rounding-to-OS-page-size/20200817-200603
git checkout a34cc34917319aed90ebf9b0fbf4146666f5f75d
vim +/virt +371 drivers/acpi/osl.c
308
309 /**
310 * acpi_os_map_iomem - Get a virtual address for a given physical address range.
311 * @phys: Start of the physical address range to map.
312 * @size: Size of the physical address range to map.
313 *
314 * Look up the given physical address range in the list of existing ACPI memory
315 * mappings. If found, get a reference to it and return a pointer to it (its
316 * virtual address). If not found, map it, add it to that list and return a
317 * pointer to it.
318 *
319 * During early init (when acpi_permanent_mmap has not been set yet) this
320 * routine simply calls __acpi_map_table() to get the job done.
321 */
322 void __iomem __ref
323 *acpi_os_map_iomem(acpi_physical_address phys, acpi_size size)
324 {
325 struct acpi_ioremap *map;
326 void __iomem *virt;
327 acpi_physical_address pg_off;
328 acpi_size pg_sz;
329
330 if (phys > ULONG_MAX) {
331 printk(KERN_ERR PREFIX "Cannot map memory that high\n");
332 return NULL;
333 }
334
335 if (!acpi_permanent_mmap)
336 return __acpi_map_table((unsigned long)phys, size);
337
338 mutex_lock(&acpi_ioremap_lock);
339 /* Check if there's a suitable mapping already. */
340 map = acpi_map_lookup(phys, size);
341 if (map) {
342 map->track.refcount++;
343 goto out;
344 }
345
346 map = kzalloc(sizeof(*map), GFP_KERNEL);
347 if (!map) {
348 mutex_unlock(&acpi_ioremap_lock);
349 return NULL;
350 }
351
352 pg_off = round_down(phys, PAGE_SIZE);
353 pg_sz = round_up(phys + size, PAGE_SIZE) - pg_off;
354 virt = acpi_map(phys, size);
355 if (!virt) {
356 mutex_unlock(&acpi_ioremap_lock);
357 kfree(map);
358 return NULL;
359 }
360
361 INIT_LIST_HEAD(&map->list);
362 map->virt = (void *)((unsigned long)virt & PAGE_MASK);
363 map->phys = pg_off;
364 map->size = pg_sz;
365 map->track.refcount = 1;
366
367 list_add_tail_rcu(&map->list, &acpi_ioremaps);
368
369 out:
370 mutex_unlock(&acpi_ioremap_lock);
> 371 return virt;
372 }
373 EXPORT_SYMBOL_GPL(acpi_os_map_iomem);
374
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
undefined reference to `start_isolate_page_range'
by kernel test robot
Hi Michal,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
commit: 2602276d3d3811b1a48c48113042cd75fcbfc27d microblaze: Wire CMA allocator
date: 7 months ago
config: microblaze-randconfig-p002-20200818 (attached as .config)
compiler: microblaze-linux-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 checkout 2602276d3d3811b1a48c48113042cd75fcbfc27d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
microblaze-linux-ld: mm/page_alloc.o: in function `alloc_contig_range':
>> (.text+0x10d70): undefined reference to `start_isolate_page_range'
>> microblaze-linux-ld: (.text+0x10e54): undefined reference to `undo_isolate_page_range'
>> microblaze-linux-ld: (.text+0x10fbc): undefined reference to `test_pages_isolated'
microblaze-linux-ld: (.text+0x11050): undefined reference to `undo_isolate_page_range'
microblaze-linux-ld: (.text+0x110b4): undefined reference to `undo_isolate_page_range'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v2 3/8] rndis_wlan: Make use of cpu_to_le16_array()
by kernel test robot
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on jkirsher-next-queue/dev-queue linuxtv-media/master staging/staging-testing v5.9-rc1 next-20200817]
[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]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/byteorder-Introd...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/net/wireless/rndis_wlan.c: In function 'rndis_set_config_parameter':
>> drivers/net/wireless/rndis_wlan.c:907:28: error: passing argument 2 of 'cpu_to_le16_array' from incompatible pointer type [-Werror=incompatible-pointer-types]
907 | cpu_to_le16_array(unibuf, param, param_len / sizeof(__le16));
| ^~~~~
| |
| char *
In file included from include/linux/byteorder/little_endian.h:11,
from arch/nios2/include/uapi/asm/byteorder.h:21,
from include/asm-generic/bitops/le.h:6,
from include/asm-generic/bitops.h:36,
from ./arch/nios2/include/generated/asm/bitops.h:1,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/net/wireless/rndis_wlan.c:16:
include/linux/byteorder/generic.h:159:62: note: expected 'const u16 *' {aka 'const short unsigned int *'} but argument is of type 'char *'
159 | static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
| ~~~~~~~~~~~^~~
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/9ad6b9bbb11c203d62f21fbf7101b8c04...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/byteorder-Introduce-cpu_to_le16_array-and-le16_to_cpu_array/20200818-024849
git checkout 9ad6b9bbb11c203d62f21fbf7101b8c04aaea958
vim +/cpu_to_le16_array +907 drivers/net/wireless/rndis_wlan.c
891
892 if (value_type == 2)
893 netdev_dbg(dev->net, "setting config parameter: %s, value: %s\n",
894 param, (u8 *)value);
895 else
896 netdev_dbg(dev->net, "setting config parameter: %s, value: %d\n",
897 param, *(u32 *)value);
898
899 infobuf->name_offs = cpu_to_le32(sizeof(*infobuf));
900 infobuf->name_length = cpu_to_le32(param_len);
901 infobuf->type = cpu_to_le32(value_type);
902 infobuf->value_offs = cpu_to_le32(sizeof(*infobuf) + param_len);
903 infobuf->value_length = cpu_to_le32(value_len);
904
905 /* simple string to unicode string conversion */
906 unibuf = (void *)infobuf + sizeof(*infobuf);
> 907 cpu_to_le16_array(unibuf, param, param_len / sizeof(__le16));
908
909 if (value_type == 2) {
910 unibuf = (void *)infobuf + sizeof(*infobuf) + param_len;
911 cpu_to_le16_array(unibuf, value, value_len / sizeof(__le16));
912 } else {
913 dst_value = (void *)infobuf + sizeof(*infobuf) + param_len;
914 *dst_value = cpu_to_le32(*(u32 *)value);
915 }
916
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v1 2/3] usb: early: xhci-dbc: Move cpu_to_le16_array() to core
by kernel test robot
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on peter.chen-usb/ci-for-usb-next balbi-usb/testing/next linus/master v5.9-rc1 next-20200817]
[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]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/usb-early-xhci-d...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-randconfig-r014-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project de71b46a519db014ce906a39f8a0e1b235ef1568)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/usb/early/xhci-dbc.c:12:
include/linux/byteorder/generic.h:144:33: error: unknown type name '__le16'
static inline void le16_add_cpu(__le16 *var, u16 val)
^
include/linux/byteorder/generic.h:144:46: error: unknown type name 'u16'
static inline void le16_add_cpu(__le16 *var, u16 val)
^
>> include/linux/byteorder/generic.h:146:9: error: implicit declaration of function '__cpu_to_le16' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le16(le16_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:90:21: note: expanded from macro 'cpu_to_le16'
#define cpu_to_le16 __cpu_to_le16
^
>> include/linux/byteorder/generic.h:146:21: error: implicit declaration of function '__le16_to_cpu' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le16(le16_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:91:21: note: expanded from macro 'le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^
include/linux/byteorder/generic.h:149:33: error: unknown type name '__le32'
static inline void le32_add_cpu(__le32 *var, u32 val)
^
include/linux/byteorder/generic.h:149:46: error: unknown type name 'u32'
static inline void le32_add_cpu(__le32 *var, u32 val)
^
>> include/linux/byteorder/generic.h:151:9: error: implicit declaration of function '__cpu_to_le32' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le32(le32_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32'
#define cpu_to_le32 __cpu_to_le32
^
>> include/linux/byteorder/generic.h:151:21: error: implicit declaration of function '__le32_to_cpu' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le32(le32_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:89:21: note: expanded from macro 'le32_to_cpu'
#define le32_to_cpu __le32_to_cpu
^
include/linux/byteorder/generic.h:154:33: error: unknown type name '__le64'
static inline void le64_add_cpu(__le64 *var, u64 val)
^
include/linux/byteorder/generic.h:154:46: error: unknown type name 'u64'
static inline void le64_add_cpu(__le64 *var, u64 val)
^
>> include/linux/byteorder/generic.h:156:9: error: implicit declaration of function '__cpu_to_le64' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le64(le64_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:86:21: note: expanded from macro 'cpu_to_le64'
#define cpu_to_le64 __cpu_to_le64
^
>> include/linux/byteorder/generic.h:156:21: error: implicit declaration of function '__le64_to_cpu' [-Werror,-Wimplicit-function-declaration]
*var = cpu_to_le64(le64_to_cpu(*var) + val);
^
include/linux/byteorder/generic.h:87:21: note: expanded from macro 'le64_to_cpu'
#define le64_to_cpu __le64_to_cpu
^
include/linux/byteorder/generic.h:159:38: error: unknown type name '__le16'
static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
^
include/linux/byteorder/generic.h:159:57: error: unknown type name 'u16'
static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
^
include/linux/byteorder/generic.h:159:67: error: unknown type name 'size_t'
static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
^
include/linux/byteorder/generic.h:164:12: error: implicit declaration of function '__cpu_to_le16' [-Werror,-Wimplicit-function-declaration]
dst[i] = cpu_to_le16(src[i]);
^
include/linux/byteorder/generic.h:90:21: note: expanded from macro 'cpu_to_le16'
#define cpu_to_le16 __cpu_to_le16
^
include/linux/byteorder/generic.h:167:38: error: unknown type name 'u16'
static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
^
include/linux/byteorder/generic.h:167:54: error: unknown type name '__le16'
static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
^
include/linux/byteorder/generic.h:167:67: error: unknown type name 'size_t'
static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
# https://github.com/0day-ci/linux/commit/379f669600c31fef2fa3b729ebb9ecf70...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/usb-early-xhci-dbc-use-readl_poll_timeout-to-simplify-code/20200818-004710
git checkout 379f669600c31fef2fa3b729ebb9ecf706d69621
vim +/__cpu_to_le16 +146 include/linux/byteorder/generic.h
^1da177e4c3f415 Linus Torvalds 2005-04-16 143
8b5f6883683c91a Marcin Slusarz 2008-02-08 144 static inline void le16_add_cpu(__le16 *var, u16 val)
8b5f6883683c91a Marcin Slusarz 2008-02-08 145 {
8b5f6883683c91a Marcin Slusarz 2008-02-08 @146 *var = cpu_to_le16(le16_to_cpu(*var) + val);
8b5f6883683c91a Marcin Slusarz 2008-02-08 147 }
8b5f6883683c91a Marcin Slusarz 2008-02-08 148
8b5f6883683c91a Marcin Slusarz 2008-02-08 149 static inline void le32_add_cpu(__le32 *var, u32 val)
8b5f6883683c91a Marcin Slusarz 2008-02-08 150 {
8b5f6883683c91a Marcin Slusarz 2008-02-08 @151 *var = cpu_to_le32(le32_to_cpu(*var) + val);
8b5f6883683c91a Marcin Slusarz 2008-02-08 152 }
8b5f6883683c91a Marcin Slusarz 2008-02-08 153
8b5f6883683c91a Marcin Slusarz 2008-02-08 154 static inline void le64_add_cpu(__le64 *var, u64 val)
8b5f6883683c91a Marcin Slusarz 2008-02-08 155 {
8b5f6883683c91a Marcin Slusarz 2008-02-08 @156 *var = cpu_to_le64(le64_to_cpu(*var) + val);
8b5f6883683c91a Marcin Slusarz 2008-02-08 157 }
8b5f6883683c91a Marcin Slusarz 2008-02-08 158
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v2 7/8] usb: early: xhci-dbc: Make use of cpu_to_le16_array()
by kernel test robot
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on jkirsher-next-queue/dev-queue linuxtv-media/master staging/staging-testing v5.9-rc1 next-20200817]
[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]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/byteorder-Introd...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-randconfig-a003-20200817 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/usb/early/xhci-dbc.c:12:
>> include/linux/byteorder/generic.h:144:33: error: unknown type name '__le16'
144 | static inline void le16_add_cpu(__le16 *var, u16 val)
| ^~~~~~
>> include/linux/byteorder/generic.h:144:46: error: unknown type name 'u16'
144 | static inline void le16_add_cpu(__le16 *var, u16 val)
| ^~~
>> include/linux/byteorder/generic.h:149:33: error: unknown type name '__le32'
149 | static inline void le32_add_cpu(__le32 *var, u32 val)
| ^~~~~~
>> include/linux/byteorder/generic.h:149:46: error: unknown type name 'u32'
149 | static inline void le32_add_cpu(__le32 *var, u32 val)
| ^~~
>> include/linux/byteorder/generic.h:154:33: error: unknown type name '__le64'
154 | static inline void le64_add_cpu(__le64 *var, u64 val)
| ^~~~~~
>> include/linux/byteorder/generic.h:154:46: error: unknown type name 'u64'
154 | static inline void le64_add_cpu(__le64 *var, u64 val)
| ^~~
include/linux/byteorder/generic.h:159:38: error: unknown type name '__le16'
159 | static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:159:57: error: unknown type name 'u16'
159 | static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
| ^~~
>> include/linux/byteorder/generic.h:159:67: error: unknown type name 'size_t'
159 | static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:1:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
+++ |+#include <stddef.h>
1 | /* SPDX-License-Identifier: GPL-2.0 */
include/linux/byteorder/generic.h:167:38: error: unknown type name 'u16'
167 | static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
| ^~~
include/linux/byteorder/generic.h:167:54: error: unknown type name '__le16'
167 | static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:167:67: error: unknown type name 'size_t'
167 | static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:167:67: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
include/linux/byteorder/generic.h:176:38: error: unknown type name 'u32'
176 | static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
| ^~~
include/linux/byteorder/generic.h:184:38: error: unknown type name 'u32'
184 | static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
| ^~~
>> include/linux/byteorder/generic.h:192:33: error: unknown type name '__be16'
192 | static inline void be16_add_cpu(__be16 *var, u16 val)
| ^~~~~~
include/linux/byteorder/generic.h:192:46: error: unknown type name 'u16'
192 | static inline void be16_add_cpu(__be16 *var, u16 val)
| ^~~
>> include/linux/byteorder/generic.h:197:33: error: unknown type name '__be32'
197 | static inline void be32_add_cpu(__be32 *var, u32 val)
| ^~~~~~
include/linux/byteorder/generic.h:197:46: error: unknown type name 'u32'
197 | static inline void be32_add_cpu(__be32 *var, u32 val)
| ^~~
>> include/linux/byteorder/generic.h:202:33: error: unknown type name '__be64'
202 | static inline void be64_add_cpu(__be64 *var, u64 val)
| ^~~~~~
include/linux/byteorder/generic.h:202:46: error: unknown type name 'u64'
202 | static inline void be64_add_cpu(__be64 *var, u64 val)
| ^~~
include/linux/byteorder/generic.h:207:38: error: unknown type name '__be32'
207 | static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:207:57: error: unknown type name 'u32'
207 | static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)
| ^~~
include/linux/byteorder/generic.h:207:67: error: unknown type name 'size_t'
207 | static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:207:67: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
include/linux/byteorder/generic.h:215:38: error: unknown type name 'u32'
215 | static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)
| ^~~
include/linux/byteorder/generic.h:215:54: error: unknown type name '__be32'
215 | static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:215:67: error: unknown type name 'size_t'
215 | static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:215:67: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
drivers/usb/early/xhci-dbc.c: In function 'xdbc_mem_init':
>> drivers/usb/early/xhci-dbc.c:259:2: error: implicit declaration of function 'cpu_to_le16_array'; did you mean 'cpu_to_le16'? [-Werror=implicit-function-declaration]
259 | cpu_to_le16_array(s_desc->wData, XDBC_STRING_SERIAL, strlen(XDBC_STRING_SERIAL));
| ^~~~~~~~~~~~~~~~~
| cpu_to_le16
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/05f0c7b5a2ca395d58f1ba7a8f84f4be3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/byteorder-Introduce-cpu_to_le16_array-and-le16_to_cpu_array/20200818-024849
git checkout 05f0c7b5a2ca395d58f1ba7a8f84f4be3d504b56
vim +/__le16 +144 include/linux/byteorder/generic.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 143
8b5f6883683c91 Marcin Slusarz 2008-02-08 @144 static inline void le16_add_cpu(__le16 *var, u16 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 145 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 146 *var = cpu_to_le16(le16_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 147 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 148
8b5f6883683c91 Marcin Slusarz 2008-02-08 @149 static inline void le32_add_cpu(__le32 *var, u32 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 150 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 151 *var = cpu_to_le32(le32_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 152 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 153
8b5f6883683c91 Marcin Slusarz 2008-02-08 @154 static inline void le64_add_cpu(__le64 *var, u64 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 155 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 156 *var = cpu_to_le64(le64_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 157 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 158
47df9f29cc421e Andy Shevchenko 2020-08-17 @159 static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
47df9f29cc421e Andy Shevchenko 2020-08-17 160 {
47df9f29cc421e Andy Shevchenko 2020-08-17 161 int i;
47df9f29cc421e Andy Shevchenko 2020-08-17 162
47df9f29cc421e Andy Shevchenko 2020-08-17 163 for (i = 0; i < len; i++)
47df9f29cc421e Andy Shevchenko 2020-08-17 164 dst[i] = cpu_to_le16(src[i]);
47df9f29cc421e Andy Shevchenko 2020-08-17 165 }
47df9f29cc421e Andy Shevchenko 2020-08-17 166
47df9f29cc421e Andy Shevchenko 2020-08-17 167 static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
47df9f29cc421e Andy Shevchenko 2020-08-17 168 {
47df9f29cc421e Andy Shevchenko 2020-08-17 169 int i;
47df9f29cc421e Andy Shevchenko 2020-08-17 170
47df9f29cc421e Andy Shevchenko 2020-08-17 171 for (i = 0; i < len; i++)
47df9f29cc421e Andy Shevchenko 2020-08-17 172 dst[i] = le16_to_cpu(src[i]);
47df9f29cc421e Andy Shevchenko 2020-08-17 173 }
47df9f29cc421e Andy Shevchenko 2020-08-17 174
9def051018c08e Andy Shevchenko 2018-03-21 175 /* XXX: this stuff can be optimized */
9def051018c08e Andy Shevchenko 2018-03-21 176 static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
9def051018c08e Andy Shevchenko 2018-03-21 177 {
9def051018c08e Andy Shevchenko 2018-03-21 178 while (words--) {
9def051018c08e Andy Shevchenko 2018-03-21 179 __le32_to_cpus(buf);
9def051018c08e Andy Shevchenko 2018-03-21 180 buf++;
9def051018c08e Andy Shevchenko 2018-03-21 181 }
9def051018c08e Andy Shevchenko 2018-03-21 182 }
9def051018c08e Andy Shevchenko 2018-03-21 183
9def051018c08e Andy Shevchenko 2018-03-21 184 static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
9def051018c08e Andy Shevchenko 2018-03-21 185 {
9def051018c08e Andy Shevchenko 2018-03-21 186 while (words--) {
9def051018c08e Andy Shevchenko 2018-03-21 187 __cpu_to_le32s(buf);
9def051018c08e Andy Shevchenko 2018-03-21 188 buf++;
9def051018c08e Andy Shevchenko 2018-03-21 189 }
9def051018c08e Andy Shevchenko 2018-03-21 190 }
9def051018c08e Andy Shevchenko 2018-03-21 191
8b5f6883683c91 Marcin Slusarz 2008-02-08 @192 static inline void be16_add_cpu(__be16 *var, u16 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 193 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 194 *var = cpu_to_be16(be16_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 195 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 196
8b5f6883683c91 Marcin Slusarz 2008-02-08 @197 static inline void be32_add_cpu(__be32 *var, u32 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 198 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 199 *var = cpu_to_be32(be32_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 200 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 201
8b5f6883683c91 Marcin Slusarz 2008-02-08 @202 static inline void be64_add_cpu(__be64 *var, u64 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 203 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 204 *var = cpu_to_be64(be64_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 205 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 206
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[hch-misc:dma_alloc_pages 17/17] kernel/dma/mapping.c:512:9: error: implicit declaration of function 'dma_alloc_contiguous'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git dma_alloc_pages
head: ebfa77e612f8650cb120011030b7a9e951ebee56
commit: ebfa77e612f8650cb120011030b7a9e951ebee56 [17/17] dma-mapping: replace DMA_ATTR_NON_CONSISTENT with dma_{alloc,free}_pages
config: powerpc-randconfig-r021-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project de71b46a519db014ce906a39f8a0e1b235ef1568)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git checkout ebfa77e612f8650cb120011030b7a9e951ebee56
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> kernel/dma/mapping.c:512:9: error: implicit declaration of function 'dma_alloc_contiguous' [-Werror,-Wimplicit-function-declaration]
page = dma_alloc_contiguous(dev, size, gfp | __GFP_ZERO);
^
>> kernel/dma/mapping.c:512:7: warning: incompatible integer to pointer conversion assigning to 'struct page *' from 'int' [-Wint-conversion]
page = dma_alloc_contiguous(dev, size, gfp | __GFP_ZERO);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/dma/mapping.c:518:3: error: implicit declaration of function 'dma_free_contiguous' [-Werror,-Wimplicit-function-declaration]
dma_free_contiguous(dev, page, size);
^
kernel/dma/mapping.c:518:3: note: did you mean 'dma_alloc_contiguous'?
kernel/dma/mapping.c:512:9: note: 'dma_alloc_contiguous' declared here
page = dma_alloc_contiguous(dev, size, gfp | __GFP_ZERO);
^
>> kernel/dma/mapping.c:540:11: warning: variable 'vaddr' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
else if (ops->alloc_pages)
^~~~~~~~~~~~~~~~
kernel/dma/mapping.c:545:9: note: uninitialized use occurs here
return vaddr;
^~~~~
kernel/dma/mapping.c:540:7: note: remove the 'if' if its condition is always true
else if (ops->alloc_pages)
^~~~~~~~~~~~~~~~~~~~~
kernel/dma/mapping.c:529:13: note: initialize the variable 'vaddr' to silence this warning
void *vaddr;
^
= NULL
kernel/dma/mapping.c:554:2: error: implicit declaration of function 'dma_free_contiguous' [-Werror,-Wimplicit-function-declaration]
dma_free_contiguous(dev, virt_to_page(vaddr), size);
^
2 warnings and 3 errors generated.
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc dma_alloc_pages
git checkout ebfa77e612f8650cb120011030b7a9e951ebee56
vim +/dma_alloc_contiguous +512 kernel/dma/mapping.c
506
507 static void *dma_simple_alloc_pages(struct device *dev, size_t size,
508 dma_addr_t *dma_handle, gfp_t gfp)
509 {
510 struct page *page;
511
> 512 page = dma_alloc_contiguous(dev, size, gfp | __GFP_ZERO);
513 if (!page)
514 return NULL;
515 *dma_handle = dma_map_page_attrs(dev, page, 0, size, DMA_BIDIRECTIONAL,
516 DMA_ATTR_SKIP_CPU_SYNC);
517 if (dma_mapping_error(dev, *dma_handle)) {
> 518 dma_free_contiguous(dev, page, size);
519 return NULL;
520 }
521
522 return page_address(page);
523 }
524
525 void *dma_alloc_pages(struct device *dev, size_t size, dma_addr_t *dma_handle,
526 gfp_t gfp)
527 {
528 const struct dma_map_ops *ops = get_dma_ops(dev);
529 void *vaddr;
530
531 if (WARN_ON_ONCE(!dev->coherent_dma_mask))
532 return NULL;
533 if (WARN_ON_ONCE(gfp & (__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM |
534 __GFP_COMP)))
535 return NULL;
536
537 size = PAGE_ALIGN(size);
538 if (dma_alloc_direct(dev, ops))
539 vaddr = dma_direct_alloc_pages(dev, size, dma_handle, gfp);
> 540 else if (ops->alloc_pages)
541 vaddr = ops->alloc_pages(dev, size, dma_handle, gfp);
542 else
543 dma_simple_alloc_pages(dev, size, dma_handle, gfp);
544
545 return vaddr;
546 }
547 EXPORT_SYMBOL_GPL(dma_alloc_pages);
548
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month