[arnd-playground:set_fs 8/14] arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git set_fs
head: de161bb7b9111bef5b76a5736cc611eb9c908586
commit: 350a8879499d07c361d5a2cd1a22c1c44cbdeb20 [8/14] uaccess: generalize access_ok()
config: mips-randconfig-s031-20220214 (https://download.01.org/0day-ci/archive/20220216/202202160307.mgIyyenx-lk...)
compiler: mips64el-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground set_fs
git checkout 350a8879499d07c361d5a2cd1a22c1c44cbdeb20
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/sibyte/common/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
>> arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got char *buf @@
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: expected void const [noderef] __user *ptr
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: got char *buf
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got char *dest @@
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: expected void [noderef] __user *to
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: got char *dest
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: expected int [noderef] __user *__p
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: got int *
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected long ( *read )( ... ) @@ got long ( * )( ... ) @@
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: expected long ( *read )( ... )
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: got long ( * )( ... )
vim +449 arch/mips/sibyte/common/sb_tbprof.c
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 439
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 440 static ssize_t sbprof_tb_read(struct file *filp, char *buf,
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 441 size_t size, loff_t *offp)
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 442 {
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 443 int cur_sample, sample_off, cur_count, sample_left;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 444 char *src;
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 445 int count = 0;
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 446 char *dest = buf;
d619f38fdacb5ce arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 447 long cur_off = *offp;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 448
96d4f267e40f950 arch/mips/sibyte/common/sb_tbprof.c Linus Torvalds 2019-01-03 @449 if (!access_ok(buf, size))
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 450 return -EFAULT;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 451
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 452 mutex_lock(&sbp.lock);
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 453
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 454 count = 0;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 455 cur_sample = cur_off / TB_SAMPLE_SIZE;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 456 sample_off = cur_off % TB_SAMPLE_SIZE;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 457 sample_left = TB_SAMPLE_SIZE - sample_off;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 458
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 459 while (size && (cur_sample < sbp.next_tb_sample)) {
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 460 int err;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 461
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 462 cur_count = size < sample_left ? size : sample_left;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 463 src = (char *)(((long)sbp.sbprof_tbbuf[cur_sample])+sample_off);
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 464 err = __copy_to_user(dest, src, cur_count);
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 465 if (err) {
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 466 *offp = cur_off + cur_count - err;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 467 mutex_unlock(&sbp.lock);
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 468 return err;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 469 }
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 470 pr_debug(DEVNAME ": read from sample %d, %d bytes\n",
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 471 cur_sample, cur_count);
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 472 size -= cur_count;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 473 sample_left -= cur_count;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 474 if (!sample_left) {
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 475 cur_sample++;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 476 sample_off = 0;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 477 sample_left = TB_SAMPLE_SIZE;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 478 } else {
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 479 sample_off += cur_count;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 480 }
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 481 cur_off += cur_count;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 482 dest += cur_count;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 483 count += cur_count;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 484 }
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 485 *offp = cur_off;
bb9b813bb665cdb arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 486 mutex_unlock(&sbp.lock);
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 487
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 488 return count;
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 489 }
^1da177e4c3f415 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 490
:::::: The code at line 449 was first introduced by commit
:::::: 96d4f267e40f9509e8a66e2b39e8b95655617693 Remove 'type' argument from access_ok() function
:::::: TO: Linus Torvalds <torvalds(a)linux-foundation.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[broonie-spi:for-next 59/66] drivers/spi/spi-amd.c:296:21: warning: cast to smaller integer type 'enum amd_spi_versions' from 'const void *'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
head: db91535d770445e1b61f6f7e4bdbd8cce45440c0
commit: 209043554915d7c51ac112a668ad1a255e1bea61 [59/66] spi: amd: Add support for version AMDI0062
config: x86_64-randconfig-a005-20220214 (https://download.01.org/0day-ci/archive/20220216/202202160331.TbQABF6V-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 37f422f4ac31c8b8041c6b62065263314282dab6)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/commit/?i...
git remote add broonie-spi https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
git fetch --no-tags broonie-spi for-next
git checkout 209043554915d7c51ac112a668ad1a255e1bea61
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/spi/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/spi/spi-amd.c:296:21: warning: cast to smaller integer type 'enum amd_spi_versions' from 'const void *' [-Wvoid-pointer-to-enum-cast]
amd_spi->version = (enum amd_spi_versions) device_get_match_data(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +296 drivers/spi/spi-amd.c
272
273 static int amd_spi_probe(struct platform_device *pdev)
274 {
275 struct device *dev = &pdev->dev;
276 struct spi_master *master;
277 struct amd_spi *amd_spi;
278 int err = 0;
279
280 /* Allocate storage for spi_master and driver private data */
281 master = spi_alloc_master(dev, sizeof(struct amd_spi));
282 if (!master) {
283 dev_err(dev, "Error allocating SPI master\n");
284 return -ENOMEM;
285 }
286
287 amd_spi = spi_master_get_devdata(master);
288 amd_spi->io_remap_addr = devm_platform_ioremap_resource(pdev, 0);
289 if (IS_ERR(amd_spi->io_remap_addr)) {
290 err = PTR_ERR(amd_spi->io_remap_addr);
291 dev_err(dev, "error %d ioremap of SPI registers failed\n", err);
292 goto err_free_master;
293 }
294 dev_dbg(dev, "io_remap_address: %p\n", amd_spi->io_remap_addr);
295
> 296 amd_spi->version = (enum amd_spi_versions) device_get_match_data(dev);
297
298 /* Initialize the spi_master fields */
299 master->bus_num = 0;
300 master->num_chipselect = 4;
301 master->mode_bits = 0;
302 master->flags = SPI_MASTER_HALF_DUPLEX;
303 master->setup = amd_spi_master_setup;
304 master->transfer_one_message = amd_spi_master_transfer;
305
306 /* Register the controller with SPI framework */
307 err = devm_spi_register_master(dev, master);
308 if (err) {
309 dev_err(dev, "error %d registering SPI controller\n", err);
310 goto err_free_master;
311 }
312
313 return 0;
314
315 err_free_master:
316 spi_master_put(master);
317
318 return err;
319 }
320
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[hch-misc:swiotlb-init-cleanup 8/11] arch/x86/kernel/pci-dma.c:86:2: error: implicit declaration of function 'detect_intel_iommu'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git swiotlb-init-cleanup
head: 03f11490b8d1f5bc33f9584ac5f16aca9d73fd6e
commit: 19fcc8038a809dc34fe5bc053aea3a6a5a143a93 [8/11] x86: remove the IOMMU table infrastructure
config: i386-randconfig-a003 (https://download.01.org/0day-ci/archive/20220216/202202160357.sAngmhzQ-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc swiotlb-init-cleanup
git checkout 19fcc8038a809dc34fe5bc053aea3a6a5a143a93
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
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 >>):
arch/x86/kernel/pci-dma.c: In function 'pci_iommu_alloc':
>> arch/x86/kernel/pci-dma.c:86:2: error: implicit declaration of function 'detect_intel_iommu' [-Werror=implicit-function-declaration]
86 | detect_intel_iommu();
| ^~~~~~~~~~~~~~~~~~
At top level:
arch/x86/kernel/pci-dma.c:40:13: warning: 'xen_swiotlb' defined but not used [-Wunused-variable]
40 | static bool xen_swiotlb __read_mostly;
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/detect_intel_iommu +86 arch/x86/kernel/pci-dma.c
80
81 void __init pci_iommu_alloc(void)
82 {
83 pci_swiotlb_detect_4gb();
84 gart_iommu_hole_init();
85 amd_iommu_detect();
> 86 detect_intel_iommu();
87
88 if (x86_swiotlb_enable)
89 swiotlb_init(0);
90 }
91
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
Re: [PATCH v1 1/1] crypto: cavium/nitrox - don't cast parameter in bit operations
by kernel test robot
Hi Andy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on herbert-crypto-2.6/master linux/master linus/master v5.17-rc4 next-20220215]
[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/crypto-cavium-ni...
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220216/202202160202.jG0FQRzi-lk...)
compiler: alpha-linux-gcc (GCC) 11.2.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
# https://github.com/0day-ci/linux/commit/51e27f6f33d377023ec5e097d18acb18f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/crypto-cavium-nitrox-don-t-cast-parameter-in-bit-operations/20220216-000941
git checkout 51e27f6f33d377023ec5e097d18acb18f992f551
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/crypto/cavium/nitrox/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/crypto/cavium/nitrox/nitrox_mbx.c: In function 'nitrox_pf2vf_mbox_handler':
drivers/crypto/cavium/nitrox/nitrox_mbx.c:126:9: error: implicit declaration of function 'DEFINE_BITMAP'; did you mean 'DEFINE_IDA'? [-Werror=implicit-function-declaration]
126 | DEFINE_BITMAP(csr, 64);
| ^~~~~~~~~~~~~
| DEFINE_IDA
drivers/crypto/cavium/nitrox/nitrox_mbx.c:126:23: error: 'csr' undeclared (first use in this function)
126 | DEFINE_BITMAP(csr, 64);
| ^~~
drivers/crypto/cavium/nitrox/nitrox_mbx.c:126:23: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/crypto/cavium/nitrox/nitrox_mbx.c:127:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
127 | u64 value, reg_addr;
| ^~~
cc1: some warnings being treated as errors
vim +127 drivers/crypto/cavium/nitrox/nitrox_mbx.c
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 121
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 122 void nitrox_pf2vf_mbox_handler(struct nitrox_device *ndev)
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 123 {
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 124 struct nitrox_vfdev *vfdev;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 125 struct pf2vf_work *pfwork;
51e27f6f33d377 Andy Shevchenko 2022-02-15 126 DEFINE_BITMAP(csr, 64);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 @127 u64 value, reg_addr;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 128 u32 i;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 129 int vfno;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 130
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 131 /* loop for VF(0..63) */
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 132 reg_addr = NPS_PKT_MBOX_INT_LO;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 133 value = nitrox_read_csr(ndev, reg_addr);
51e27f6f33d377 Andy Shevchenko 2022-02-15 134 bitmap_from_u64(csr, value);
51e27f6f33d377 Andy Shevchenko 2022-02-15 135 for_each_set_bit(i, csr, BITS_PER_TYPE(csr)) {
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 136 /* get the vfno from ring */
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 137 vfno = RING_TO_VFNO(i, ndev->iov.max_vf_queues);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 138 vfdev = ndev->iov.vfdev + vfno;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 139 vfdev->ring = i;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 140 /* fill the vf mailbox data */
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 141 vfdev->msg.value = pf2vf_read_mbox(ndev, vfdev->ring);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 142 pfwork = kzalloc(sizeof(*pfwork), GFP_ATOMIC);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 143 if (!pfwork)
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 144 continue;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 145
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 146 pfwork->vfdev = vfdev;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 147 pfwork->ndev = ndev;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 148 INIT_WORK(&pfwork->pf2vf_resp, pf2vf_resp_handler);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 149 queue_work(ndev->iov.pf2vf_wq, &pfwork->pf2vf_resp);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 150 /* clear the corresponding vf bit */
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 151 nitrox_write_csr(ndev, reg_addr, BIT_ULL(i));
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 152 }
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 153
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 154 /* loop for VF(64..127) */
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 155 reg_addr = NPS_PKT_MBOX_INT_HI;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 156 value = nitrox_read_csr(ndev, reg_addr);
51e27f6f33d377 Andy Shevchenko 2022-02-15 157 bitmap_from_u64(csr, value);
51e27f6f33d377 Andy Shevchenko 2022-02-15 158 for_each_set_bit(i, csr, BITS_PER_TYPE(csr)) {
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 159 /* get the vfno from ring */
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 160 vfno = RING_TO_VFNO(i + 64, ndev->iov.max_vf_queues);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 161 vfdev = ndev->iov.vfdev + vfno;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 162 vfdev->ring = (i + 64);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 163 /* fill the vf mailbox data */
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 164 vfdev->msg.value = pf2vf_read_mbox(ndev, vfdev->ring);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 165
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 166 pfwork = kzalloc(sizeof(*pfwork), GFP_ATOMIC);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 167 if (!pfwork)
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 168 continue;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 169
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 170 pfwork->vfdev = vfdev;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 171 pfwork->ndev = ndev;
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 172 INIT_WORK(&pfwork->pf2vf_resp, pf2vf_resp_handler);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 173 queue_work(ndev->iov.pf2vf_wq, &pfwork->pf2vf_resp);
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 174 /* clear the corresponding vf bit */
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 175 nitrox_write_csr(ndev, reg_addr, BIT_ULL(i));
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 176 }
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 177 }
cf718eaa8f9b2c Srikanth, Jampala 2018-12-04 178
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
Re: [PATCH v4 1/3] Bluetooth: aosp: surface AOSP quality report through mgmt
by kernel test robot
Hi Joseph,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on net-next/master next-20220215]
[cannot apply to net/master v5.17-rc4]
[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/Joseph-Hwang/Bluetooth-aosp-surf...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: h8300-randconfig-s032-20220214 (https://download.01.org/0day-ci/archive/20220216/202202160117.jjnGwidL-lk...)
compiler: h8300-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/8c2212761e41006d67f3fad819b5bde57...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Joseph-Hwang/Bluetooth-aosp-surface-AOSP-quality-report-through-mgmt/20220215-213800
git checkout 8c2212761e41006d67f3fad819b5bde57bc17773
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=h8300 SHELL=/bin/bash net/bluetooth/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
net/bluetooth/hci_event.c:338:15: sparse: sparse: restricted __le16 degrades to integer
>> net/bluetooth/hci_event.c:4288:3: sparse: sparse: symbol 'evt_prefixes' was not declared. Should it be static?
net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
include/net/bluetooth/hci.h:2473:47: sparse: sparse: array of flexible structures
include/net/bluetooth/hci.h:2559:43: sparse: sparse: array of flexible structures
vim +/evt_prefixes +4288 net/bluetooth/hci_event.c
4275
4276 /* Every distinct vendor specification must have a well-defined vendor
4277 * event prefix to determine if a vendor event meets the specification.
4278 * If an event prefix is fixed, it should be delcared with FIXED_EVT_PREFIX.
4279 * Otherwise, DYNAMIC_EVT_PREFIX should be used for variable prefixes.
4280 */
4281 struct vendor_event_prefix {
4282 __u8 *prefix;
4283 __u8 prefix_len;
4284 void (*vendor_func)(struct hci_dev *hdev, void *data,
4285 struct sk_buff *skb);
4286 __u8 *(*get_prefix)(struct hci_dev *hdev);
4287 __u8 (*get_prefix_len)(struct hci_dev *hdev);
> 4288 } evt_prefixes[] = {
4289 FIXED_EVT_PREFIX(AOSP_BQR_PREFIX, aosp_quality_report_evt),
4290 DYNAMIC_EVT_PREFIX(get_msft_evt_prefix, get_msft_evt_prefix_len,
4291 msft_vendor_evt),
4292
4293 /* end with a null entry */
4294 {},
4295 };
4296
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[luxis1999-iommufd:iommufd-v5.17-rc4 28/56] drivers/iommu/iommufd/selftest.c:183:25: error: initialization of 'struct iommu_group * (*)(struct device *)' from incompatible pointer type 'phys_addr_t (*)(struct iommu_domain *, dma_addr_t)' {aka 'unsigned int (*)(struct iommu_domain *, unsigned int)'}
by kernel test robot
tree: https://github.com/luxis1999/iommufd iommufd-v5.17-rc4
head: 94542ac92f6f23784d73c13b39dc95cc4012181c
commit: 047031aaa50c5daed9c24fa0701f7016d4ff6934 [28/56] iommufd: Add a selftest
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20220216/202202160138.nI8GEZY7-lk...)
compiler: mips-linux-gcc (GCC) 11.2.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
# https://github.com/luxis1999/iommufd/commit/047031aaa50c5daed9c24fa0701f7...
git remote add luxis1999-iommufd https://github.com/luxis1999/iommufd
git fetch --no-tags luxis1999-iommufd iommufd-v5.17-rc4
git checkout 047031aaa50c5daed9c24fa0701f7016d4ff6934
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash
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/iommufd/selftest.c: In function 'mock_domain_alloc':
drivers/iommu/iommufd/selftest.c:69:26: error: assignment to 'const struct iommu_domain_ops *' from incompatible pointer type 'const struct iommu_ops *' [-Werror=incompatible-pointer-types]
69 | mock->domain.ops = &domain_mock_ops;
| ^
drivers/iommu/iommufd/selftest.c: At top level:
drivers/iommu/iommufd/selftest.c:180:10: error: 'const struct iommu_ops' has no member named 'domain_free'
180 | .domain_free = mock_domain_free,
| ^~~~~~~~~~~
drivers/iommu/iommufd/selftest.c:180:24: error: initialization of 'struct iommu_device * (*)(struct device *)' from incompatible pointer type 'void (*)(struct iommu_domain *)' [-Werror=incompatible-pointer-types]
180 | .domain_free = mock_domain_free,
| ^~~~~~~~~~~~~~~~
drivers/iommu/iommufd/selftest.c:180:24: note: (near initialization for 'domain_mock_ops.probe_device')
drivers/iommu/iommufd/selftest.c:181:10: error: 'const struct iommu_ops' has no member named 'map_pages'
181 | .map_pages = mock_domain_map_pages,
| ^~~~~~~~~
drivers/iommu/iommufd/selftest.c:181:22: error: initialization of 'void (*)(struct device *)' from incompatible pointer type 'int (*)(struct iommu_domain *, long unsigned int, phys_addr_t, size_t, size_t, int, gfp_t, size_t *)' {aka 'int (*)(struct iommu_domain *, long unsigned int, unsigned int, unsigned int, unsigned int, int, unsigned int, unsigned int *)'} [-Werror=incompatible-pointer-types]
181 | .map_pages = mock_domain_map_pages,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/iommu/iommufd/selftest.c:181:22: note: (near initialization for 'domain_mock_ops.release_device')
drivers/iommu/iommufd/selftest.c:182:10: error: 'const struct iommu_ops' has no member named 'unmap_pages'
182 | .unmap_pages = mock_domain_unmap_pages,
| ^~~~~~~~~~~
drivers/iommu/iommufd/selftest.c:182:24: error: initialization of 'void (*)(struct device *)' from incompatible pointer type 'size_t (*)(struct iommu_domain *, long unsigned int, size_t, size_t, struct iommu_iotlb_gather *)' {aka 'unsigned int (*)(struct iommu_domain *, long unsigned int, unsigned int, unsigned int, struct iommu_iotlb_gather *)'} [-Werror=incompatible-pointer-types]
182 | .unmap_pages = mock_domain_unmap_pages,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/iommufd/selftest.c:182:24: note: (near initialization for 'domain_mock_ops.probe_finalize')
drivers/iommu/iommufd/selftest.c:183:10: error: 'const struct iommu_ops' has no member named 'iova_to_phys'
183 | .iova_to_phys = mock_domain_iova_to_phys,
| ^~~~~~~~~~~~
>> drivers/iommu/iommufd/selftest.c:183:25: error: initialization of 'struct iommu_group * (*)(struct device *)' from incompatible pointer type 'phys_addr_t (*)(struct iommu_domain *, dma_addr_t)' {aka 'unsigned int (*)(struct iommu_domain *, unsigned int)'} [-Werror=incompatible-pointer-types]
183 | .iova_to_phys = mock_domain_iova_to_phys,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/iommufd/selftest.c:183:25: note: (near initialization for 'domain_mock_ops.device_group')
drivers/iommu/iommufd/selftest.c: In function 'get_md_pagetable':
drivers/iommu/iommufd/selftest.c:198:31: warning: comparison of distinct pointer types lacks a cast
198 | if (hwpt->domain->ops != &domain_mock_ops) {
| ^~
cc1: some warnings being treated as errors
vim +183 drivers/iommu/iommufd/selftest.c
176
177 static const struct iommu_ops domain_mock_ops = {
178 .pgsize_bitmap = MOCK_IO_PAGE_SIZE,
179 .domain_alloc = mock_domain_alloc,
180 .domain_free = mock_domain_free,
181 .map_pages = mock_domain_map_pages,
182 .unmap_pages = mock_domain_unmap_pages,
> 183 .iova_to_phys = mock_domain_iova_to_phys,
184 };
185
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week