drivers/hwspinlock/u8500_hsem.c:52:39: sparse: got void
by kernel test robot
Hi Baolin,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fb893de323e2d39f7a1f6df425703a2edbdf56ea
commit: ffd0bbfb378ecd56eac22bf932ccdbf89ac7f725 hwspinlock: Allow drivers to be built with COMPILE_TEST
date: 5 months ago
config: powerpc64-randconfig-s032-20200812 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.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.2-168-g9554805c-dirty
git checkout ffd0bbfb378ecd56eac22bf932ccdbf89ac7f725
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc64
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 >>)
drivers/hwspinlock/u8500_hsem.c:52:39: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *lock_addr @@ got void *priv @@
drivers/hwspinlock/u8500_hsem.c:52:39: sparse: expected void [noderef] <asn:2> *lock_addr
>> drivers/hwspinlock/u8500_hsem.c:52:39: sparse: got void *priv
drivers/hwspinlock/u8500_hsem.c:65:39: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *lock_addr @@ got void *priv @@
drivers/hwspinlock/u8500_hsem.c:65:39: sparse: expected void [noderef] <asn:2> *lock_addr
drivers/hwspinlock/u8500_hsem.c:65:39: sparse: got void *priv
drivers/hwspinlock/u8500_hsem.c:116:30: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *priv @@ got void [noderef] <asn:2> * @@
>> drivers/hwspinlock/u8500_hsem.c:116:30: sparse: expected void *priv
drivers/hwspinlock/u8500_hsem.c:116:30: sparse: got void [noderef] <asn:2> *
drivers/hwspinlock/u8500_hsem.c:126:52: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] <asn:2> *io_base @@ got void * @@
drivers/hwspinlock/u8500_hsem.c:126:52: sparse: expected void [noderef] <asn:2> *io_base
>> drivers/hwspinlock/u8500_hsem.c:126:52: sparse: got void *
vim +52 drivers/hwspinlock/u8500_hsem.c
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 49
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 50 static int u8500_hsem_trylock(struct hwspinlock *lock)
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 51 {
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 @52 void __iomem *lock_addr = lock->priv;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 53
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 54 writel(HSEM_MASTER_ID, lock_addr);
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 55
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 56 /* get only first 4 bit and compare to masterID.
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 57 * if equal, we have the semaphore, otherwise
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 58 * someone else has it.
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 59 */
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 60 return (HSEM_MASTER_ID == (0x0F & readl(lock_addr)));
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 61 }
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 62
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 63 static void u8500_hsem_unlock(struct hwspinlock *lock)
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 64 {
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 65 void __iomem *lock_addr = lock->priv;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 66
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 67 /* release the lock by writing 0 to it */
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 68 writel(RESET_SEMAPHORE, lock_addr);
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 69 }
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 70
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 71 /*
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 72 * u8500: what value is recommended here ?
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 73 */
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 74 static void u8500_hsem_relax(struct hwspinlock *lock)
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 75 {
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 76 ndelay(50);
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 77 }
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 78
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 79 static const struct hwspinlock_ops u8500_hwspinlock_ops = {
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 80 .trylock = u8500_hsem_trylock,
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 81 .unlock = u8500_hsem_unlock,
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 82 .relax = u8500_hsem_relax,
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 83 };
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 84
571291066d053c Bill Pemberton 2012-11-19 85 static int u8500_hsem_probe(struct platform_device *pdev)
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 86 {
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 87 struct hwspinlock_pdata *pdata = pdev->dev.platform_data;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 88 struct hwspinlock_device *bank;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 89 struct hwspinlock *hwlock;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 90 void __iomem *io_base;
9d399f0c52951c Baolin Wang 2019-10-14 91 int i, num_locks = U8500_MAX_SEMAPHORE;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 92 ulong val;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 93
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 94 if (!pdata)
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 95 return -ENODEV;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 96
5ee45e0c894636 Baolin Wang 2019-09-27 97 io_base = devm_platform_ioremap_resource(pdev, 0);
5ee45e0c894636 Baolin Wang 2019-09-27 98 if (IS_ERR(io_base))
5ee45e0c894636 Baolin Wang 2019-09-27 99 return PTR_ERR(io_base);
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 100
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 101 /* make sure protocol 1 is selected */
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 102 val = readl(io_base + HSEM_CTRL_REG);
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 103 writel((val & ~HSEM_PROTOCOL_1), io_base + HSEM_CTRL_REG);
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 104
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 105 /* clear all interrupts */
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 106 writel(0xFFFF, io_base + HSEM_ICRALL);
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 107
637bcd19beeb9e Baolin Wang 2019-09-27 108 bank = devm_kzalloc(&pdev->dev, struct_size(bank, lock, num_locks),
637bcd19beeb9e Baolin Wang 2019-09-27 109 GFP_KERNEL);
5ee45e0c894636 Baolin Wang 2019-09-27 110 if (!bank)
5ee45e0c894636 Baolin Wang 2019-09-27 111 return -ENOMEM;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 112
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 113 platform_set_drvdata(pdev, bank);
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 114
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 115 for (i = 0, hwlock = &bank->lock[0]; i < num_locks; i++, hwlock++)
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 @116 hwlock->priv = io_base + HSEM_REGISTER_OFFSET + sizeof(u32) * i;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 117
9d399f0c52951c Baolin Wang 2019-10-14 118 return devm_hwspin_lock_register(&pdev->dev, bank,
9d399f0c52951c Baolin Wang 2019-10-14 119 &u8500_hwspinlock_ops,
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 120 pdata->base_id, num_locks);
637bcd19beeb9e Baolin Wang 2019-09-27 121 }
637bcd19beeb9e Baolin Wang 2019-09-27 122
e533a349c0258f Bill Pemberton 2012-11-19 123 static int u8500_hsem_remove(struct platform_device *pdev)
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 124 {
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 125 struct hwspinlock_device *bank = platform_get_drvdata(pdev);
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 @126 void __iomem *io_base = bank->lock[0].priv - HSEM_REGISTER_OFFSET;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 127
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 128 /* clear all interrupts */
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 129 writel(0xFFFF, io_base + HSEM_ICRALL);
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 130
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 131 return 0;
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 132 }
f84a8ecfca9229 Mathieu J. Poirier 2011-09-08 133
:::::: The code at line 52 was first introduced by commit
:::::: f84a8ecfca9229e9227c6ec84123b114ee634959 hwspinlock/u8500: add hwspinlock driver
:::::: TO: Mathieu J. Poirier <mathieu.poirier(a)linaro.org>
:::::: CC: Ohad Ben-Cohen <ohad(a)wizery.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/net/ethernet/realtek/r8169_main.c:1872 rtl_coalesce_choose_scale() warn: passing a valid pointer to 'PTR_ERR'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bb5baaa9238ecf8f13b112232c7bbe0d3d598ee8
commit: 2815b30535a0613ee07d477d0c628100f40b6059 r8169: merge scale for tx and rx irq coalescing
date: 3 months ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/net/ethernet/realtek/r8169_main.c:1872 rtl_coalesce_choose_scale() warn: passing a valid pointer to 'PTR_ERR'
Old smatch warnings:
drivers/net/ethernet/realtek/r8169_main.c:1837 rtl_get_coalesce() warn: passing a valid pointer to 'PTR_ERR'
vim +/PTR_ERR +1872 drivers/net/ethernet/realtek/r8169_main.c
1862
1863 /* choose appropriate scale factor and CPlusCmd[0:1] for (speed, nsec) */
1864 static int rtl_coalesce_choose_scale(struct rtl8169_private *tp, u32 nsec,
1865 u16 *cp01)
1866 {
1867 const struct rtl_coalesce_info *ci;
1868 u16 i;
1869
1870 ci = rtl_coalesce_info(tp);
1871 if (IS_ERR(ci))
> 1872 return PTR_ERR(ci);
1873
1874 for (i = 0; i < 4; i++) {
1875 if (nsec <= ci->scale_nsecs[i] * RTL_COALESCE_T_MAX) {
1876 *cp01 = i;
1877 return ci->scale_nsecs[i];
1878 }
1879 }
1880
1881 return -EINVAL;
1882 }
1883
---
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 v10 06/10] media: tegra-video: Add support for external sensor capture
by kernel test robot
Hi Sowjanya,
I love your patch! Yet something to improve:
[auto build test ERROR on tegra-drm/drm/tegra/for-next]
[also build test ERROR on robh/for-next v5.8 next-20200811]
[cannot apply to tegra/for-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/Sowjanya-Komatineni/Support-for-...
base: git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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=arm64
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/staging/media/tegra-video/vi.c: In function 'tegra_vi_graph_cleanup':
>> drivers/staging/media/tegra-video/vi.c:1508:3: error: implicit declaration of function 'vb2_video_unregister_device'; did you mean 'video_unregister_device'? [-Werror=implicit-function-declaration]
1508 | vb2_video_unregister_device(&chan->video);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| video_unregister_device
cc1: some warnings being treated as errors
vim +1508 drivers/staging/media/tegra-video/vi.c
1502
1503 static void tegra_vi_graph_cleanup(struct tegra_vi *vi)
1504 {
1505 struct tegra_vi_channel *chan;
1506
1507 list_for_each_entry(chan, &vi->vi_chans, list) {
> 1508 vb2_video_unregister_device(&chan->video);
1509 v4l2_async_notifier_unregister(&chan->notifier);
1510 v4l2_async_notifier_cleanup(&chan->notifier);
1511 }
1512 }
1513
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/i2c/busses/i2c-mlxcpld.c:97:17: sparse: got void COPYING CREDITS Documentation Kbuild Kconfig LICENSES MAINTAINERS Makefile README arch block certs crypto drivers fs include init ipc kernel lib mm net samples scripts security sound tools usr virt
by kernel test robot
Hi Krzysztof,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bb5baaa9238ecf8f13b112232c7bbe0d3d598ee8
commit: 4a2d5f663dab6614772d8e28ca190b127ba46d9d i2c: Enable compile testing for more drivers
date: 7 months ago
config: riscv-randconfig-s031-20200812 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.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.2-168-g9554805c-dirty
git checkout 4a2d5f663dab6614772d8e28ca190b127ba46d9d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=riscv
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 >>)
drivers/i2c/busses/i2c-mlxcpld.c:97:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:97:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:97:17: sparse: expected void volatile [noderef] <asn:2> *addr
>> drivers/i2c/busses/i2c-mlxcpld.c:97:17: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:99:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:99:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:99:17: sparse: expected void volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:99:17: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:107:38: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:107:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:107:38: sparse: expected void const volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:107:38: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:109:31: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:109:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:109:31: sparse: expected void const volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:109:31: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:119:27: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:119:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:119:27: sparse: expected void const volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:119:27: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:122:34: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:122:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:122:34: sparse: expected void const volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:122:34: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:125:34: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:125:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:125:34: sparse: expected void const volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:125:34: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:126:31: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:126:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:126:31: sparse: expected void const volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:126:31: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:129:34: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:129:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:129:34: sparse: expected void const volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:129:34: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:144:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:144:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:144:17: sparse: expected void volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:144:17: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:147:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:147:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:147:17: sparse: expected void volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:147:17: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:150:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:150:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:150:17: sparse: expected void volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:150:17: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:151:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:151:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:151:17: sparse: expected void volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:151:17: sparse: got void *
drivers/i2c/busses/i2c-mlxcpld.c:154:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/i2c/busses/i2c-mlxcpld.c:154:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] <asn:2> *addr @@ got void * @@
drivers/i2c/busses/i2c-mlxcpld.c:154:17: sparse: expected void volatile [noderef] <asn:2> *addr
drivers/i2c/busses/i2c-mlxcpld.c:154:17: sparse: got void *
vim +97 drivers/i2c/busses/i2c-mlxcpld.c
6bec23bff91491 Vadim Pasternak 2016-11-20 91
6bec23bff91491 Vadim Pasternak 2016-11-20 92 static void mlxcpld_i2c_lpc_write_buf(u8 *data, u8 len, u32 addr)
6bec23bff91491 Vadim Pasternak 2016-11-20 93 {
6bec23bff91491 Vadim Pasternak 2016-11-20 94 int i;
6bec23bff91491 Vadim Pasternak 2016-11-20 95
6bec23bff91491 Vadim Pasternak 2016-11-20 96 for (i = 0; i < len - len % 4; i += 4)
6bec23bff91491 Vadim Pasternak 2016-11-20 @97 outl(*(u32 *)(data + i), addr + i);
6bec23bff91491 Vadim Pasternak 2016-11-20 98 for (; i < len; ++i)
6bec23bff91491 Vadim Pasternak 2016-11-20 99 outb(*(data + i), addr + i);
6bec23bff91491 Vadim Pasternak 2016-11-20 100 }
6bec23bff91491 Vadim Pasternak 2016-11-20 101
:::::: The code at line 97 was first introduced by commit
:::::: 6bec23bff914915822f2c34d0555902fb2b9be1f i2c: mlxcpld: add master driver for mellanox systems
:::::: TO: Vadim Pasternak <vadimp(a)mellanox.com>
:::::: CC: Wolfram Sang <wsa(a)the-dreams.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1049 iwl_pci_probe() warn: mask and shift to zero
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bb5baaa9238ecf8f13b112232c7bbe0d3d598ee8
commit: d6f2134a383168bfb28ac458f7e4311e58482439 iwlwifi: add mac/rf types and 160MHz to the device tables
date: 5 months ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1049 iwl_pci_probe() warn: mask and shift to zero
Old smatch warnings:
drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1035 iwl_pci_probe() warn: we never enter this loop
vim +1049 drivers/net/wireless/intel/iwlwifi/pcie/drv.c
1003
1004 static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1005 {
1006 const struct iwl_cfg_trans_params *trans =
1007 (struct iwl_cfg_trans_params *)(ent->driver_data);
1008 const struct iwl_cfg *cfg_7265d __maybe_unused = NULL;
1009 struct iwl_trans *iwl_trans;
1010 struct iwl_trans_pcie *trans_pcie;
1011 unsigned long flags;
1012 int i, ret;
1013 /*
1014 * This is needed for backwards compatibility with the old
1015 * tables, so we don't need to change all the config structs
1016 * at the same time. The cfg is used to compare with the old
1017 * full cfg structs.
1018 */
1019 const struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);
1020
1021 /* make sure trans is the first element in iwl_cfg */
1022 BUILD_BUG_ON(offsetof(struct iwl_cfg, trans));
1023
1024 iwl_trans = iwl_trans_pcie_alloc(pdev, ent, trans);
1025 if (IS_ERR(iwl_trans))
1026 return PTR_ERR(iwl_trans);
1027
1028 trans_pcie = IWL_TRANS_GET_PCIE_TRANS(iwl_trans);
1029
1030 /* the trans_cfg should never change, so set it now */
1031 iwl_trans->trans_cfg = trans;
1032
1033 iwl_trans->hw_rf_id = iwl_read32(iwl_trans, CSR_HW_RF_ID);
1034
1035 for (i = 0; i < ARRAY_SIZE(iwl_dev_info_table); i++) {
1036 const struct iwl_dev_info *dev_info = &iwl_dev_info_table[i];
1037 if ((dev_info->device == (u16)IWL_CFG_ANY ||
1038 dev_info->device == pdev->device) &&
1039 (dev_info->subdevice == (u16)IWL_CFG_ANY ||
1040 dev_info->subdevice == pdev->subsystem_device) &&
1041 (dev_info->mac_type == (u16)IWL_CFG_ANY ||
1042 dev_info->mac_type ==
1043 CSR_HW_REV_TYPE(iwl_trans->hw_rev)) &&
1044 (dev_info->rf_type == (u16)IWL_CFG_ANY ||
1045 dev_info->rf_type ==
1046 CSR_HW_RFID_TYPE(iwl_trans->hw_rf_id)) &&
1047 (dev_info->no_160 == (u8)IWL_CFG_ANY ||
1048 dev_info->no_160 ==
> 1049 IWL_SUBDEVICE_NO_160(pdev->subsystem_device))) {
1050 iwl_trans->cfg = dev_info->cfg;
1051 iwl_trans->name = dev_info->name;
1052 goto found;
1053 }
1054 }
1055
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[rcu:dev.2020.08.10a 105/111] riscv64-linux-ld: main.c:undefined reference to `rcu_read_unlock_strict'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2020.08.10a
head: 9dd4d242c535c30266a08806314ea6b016f94617
commit: 9e20110f8ef2745df8f4fe2d679114dccfaaa1af [105/111] rcu: Report QS for outermost PREEMPT=n rcu_read_unlock() for strict GPs
config: riscv-allnoconfig (attached as .config)
compiler: riscv64-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 9e20110f8ef2745df8f4fe2d679114dccfaaa1af
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
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 >>):
riscv64-linux-ld: init/main.o: in function `.L0 ':
main.c:(.ref.text+0x34): undefined reference to `rcu_read_unlock_strict'
>> riscv64-linux-ld: main.c:(.ref.text+0x64): undefined reference to `rcu_read_unlock_strict'
riscv64-linux-ld: kernel/fork.o: in function `.L26':
fork.c:(.text+0x144): undefined reference to `rcu_read_unlock_strict'
riscv64-linux-ld: kernel/fork.o: in function `.L27':
fork.c:(.text+0x164): undefined reference to `rcu_read_unlock_strict'
riscv64-linux-ld: kernel/fork.o: in function `.L183':
fork.c:(.text+0xbb4): undefined reference to `rcu_read_unlock_strict'
riscv64-linux-ld: kernel/fork.o:fork.c:(.text+0xbd4): more undefined references to `rcu_read_unlock_strict' follow
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/net/dsa/microchip/ksz9477_i2c.c:77:34: warning: unused variable 'ksz9477_dt_ids'
by kernel test robot
Hi Tristram,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bb5baaa9238ecf8f13b112232c7bbe0d3d598ee8
commit: 20e03777d70923fe7eae0d7f043ef9488393ab95 net: dsa: microchip: add KSZ9477 I2C driver
date: 11 months ago
config: x86_64-randconfig-r032-20200812 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4f2ad15db535873dda9bfe248a2771023b64a43c)
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
git checkout 20e03777d70923fe7eae0d7f043ef9488393ab95
# 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 warnings (new ones prefixed by >>):
^
include/linux/jhash.h:95:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 6: b += (u32)k[5]<<8; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:95:2: note: insert 'break;' to avoid fall-through
case 6: b += (u32)k[5]<<8; /* fall through */
^
break;
include/linux/jhash.h:96:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 5: b += k[4]; /* fall through */
^
include/linux/jhash.h:96:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 5: b += k[4]; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:96:2: note: insert 'break;' to avoid fall-through
case 5: b += k[4]; /* fall through */
^
break;
include/linux/jhash.h:97:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 4: a += (u32)k[3]<<24; /* fall through */
^
include/linux/jhash.h:97:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 4: a += (u32)k[3]<<24; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:97:2: note: insert 'break;' to avoid fall-through
case 4: a += (u32)k[3]<<24; /* fall through */
^
break;
include/linux/jhash.h:98:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 3: a += (u32)k[2]<<16; /* fall through */
^
include/linux/jhash.h:98:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 3: a += (u32)k[2]<<16; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:98:2: note: insert 'break;' to avoid fall-through
case 3: a += (u32)k[2]<<16; /* fall through */
^
break;
include/linux/jhash.h:99:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 2: a += (u32)k[1]<<8; /* fall through */
^
include/linux/jhash.h:99:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 2: a += (u32)k[1]<<8; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:99:2: note: insert 'break;' to avoid fall-through
case 2: a += (u32)k[1]<<8; /* fall through */
^
break;
include/linux/jhash.h:100:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 1: a += k[0];
^
include/linux/jhash.h:100:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 1: a += k[0];
^
__attribute__((fallthrough));
include/linux/jhash.h:100:2: note: insert 'break;' to avoid fall-through
case 1: a += k[0];
^
break;
include/linux/jhash.h:102:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 0: /* Nothing left to add */
^
include/linux/jhash.h:102:2: note: insert 'break;' to avoid fall-through
case 0: /* Nothing left to add */
^
break;
include/linux/jhash.h:136:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 2: b += k[1]; /* fall through */
^
include/linux/jhash.h:136:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 2: b += k[1]; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:136:2: note: insert 'break;' to avoid fall-through
case 2: b += k[1]; /* fall through */
^
break;
include/linux/jhash.h:137:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 1: a += k[0];
^
include/linux/jhash.h:137:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 1: a += k[0];
^
__attribute__((fallthrough));
include/linux/jhash.h:137:2: note: insert 'break;' to avoid fall-through
case 1: a += k[0];
^
break;
include/linux/jhash.h:139:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 0: /* Nothing left to add */
^
include/linux/jhash.h:139:2: note: insert 'break;' to avoid fall-through
case 0: /* Nothing left to add */
^
break;
>> drivers/net/dsa/microchip/ksz9477_i2c.c:77:34: warning: unused variable 'ksz9477_dt_ids' [-Wunused-const-variable]
static const struct of_device_id ksz9477_dt_ids[] = {
^
37 warnings generated.
vim +/ksz9477_dt_ids +77 drivers/net/dsa/microchip/ksz9477_i2c.c
76
> 77 static const struct of_device_id ksz9477_dt_ids[] = {
78 { .compatible = "microchip,ksz9477" },
79 { .compatible = "microchip,ksz9897" },
80 {},
81 };
82 MODULE_DEVICE_TABLE(of, ksz9477_dt_ids);
83
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[mlankhorst:locking-rework 24/31] include/linux/dma-resv.h:80:28: error: implicit declaration of function 'lockdep_is_held'; did you mean
by kernel test robot
tree: git://people.freedesktop.org/~mlankhorst/linux locking-rework
head: acf91034f3b9d3272705e05fbc1a3836fbd0d9cf
commit: 4f00567160c3f31e4be63ef9571cde13ce51fc94 [24/31] drm/i915: Ensure we hold the object mutex in pin correctly.
config: i386-randconfig-c001-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout 4f00567160c3f31e4be63ef9571cde13ce51fc94
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 arch/x86/include/asm/bug.h:92,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/sched/mm.h:7,
from drivers/gpu/drm/i915/i915_vma.c:25:
drivers/gpu/drm/i915/i915_vma.c: In function 'i915_ggtt_pin':
>> include/linux/dma-resv.h:80:28: error: implicit declaration of function 'lockdep_is_held'; did you mean 'lockdep_assert_held'? [-Werror=implicit-function-declaration]
80 | #define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
| ^~~~~~~~~~~~~~~
include/asm-generic/bug.h:127:25: note: in definition of macro 'WARN'
127 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
drivers/gpu/drm/i915/i915_vma.c:1021:2: note: in expansion of macro 'WARN_ON'
1021 | WARN_ON(!ww && vma->resv && dma_resv_held(vma->resv));
| ^~~~~~~
drivers/gpu/drm/i915/i915_vma.c:1021:30: note: in expansion of macro 'dma_resv_held'
1021 | WARN_ON(!ww && vma->resv && dma_resv_held(vma->resv));
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +80 include/linux/dma-resv.h
786d7257e537da0 include/linux/reservation.h Maarten Lankhorst 2013-06-27 79
52791eeec1d9f4a include/linux/dma-resv.h Christian König 2019-08-11 @80 #define dma_resv_held(obj) lockdep_is_held(&(obj)->lock.base)
52791eeec1d9f4a include/linux/dma-resv.h Christian König 2019-08-11 81 #define dma_resv_assert_held(obj) lockdep_assert_held(&(obj)->lock.base)
04a5faa8cbe5a8e include/linux/reservation.h Maarten Lankhorst 2014-07-01 82
:::::: The code at line 80 was first introduced by commit
:::::: 52791eeec1d9f4a7e7fe08aaba0b1553149d93bc dma-buf: rename reservation_object to dma_resv
:::::: TO: Christian König <christian.koenig(a)amd.com>
:::::: CC: Christian König <christian.koenig(a)amd.com>
---
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 v3 09/13] ASoC: Intel: Select catpt and deprecate haswell
by kernel test robot
Hi Cezary,
I love your patch! Yet something to improve:
[auto build test ERROR on asoc/for-next]
[also build test ERROR on sound/for-next v5.8 next-20200811]
[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/Cezary-Rojewski/ASoC-Intel-Catpt...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: i386-allyesconfig (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=i386
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 sound/soc/intel/catpt/core.h:14,
from sound/soc/intel/catpt/dsp.c:12:
sound/soc/intel/catpt/dsp.c: In function 'catpt_dsp_stall':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
168 | readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~~~~~~~~~~~~~
sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
170 | writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~
sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
173 | (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
| ^~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c:229:2: note: in expansion of macro 'catpt_updatel_shim'
229 | catpt_updatel_shim(cdev, CS, CATPT_CS_STALL, val);
| ^~~~~~~~~~~~~~~~~~
sound/soc/intel/catpt/registers.h:168:32: note: each undeclared identifier is reported only once for each function it appears in
168 | readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~~~~~~~~~~~~~
sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
170 | writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~
sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
173 | (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
| ^~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c:229:2: note: in expansion of macro 'catpt_updatel_shim'
229 | catpt_updatel_shim(cdev, CS, CATPT_CS_STALL, val);
| ^~~~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c: In function 'catpt_dsp_reset':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
168 | readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~~~~~~~~~~~~~
sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
170 | writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~
sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
173 | (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
| ^~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c:241:2: note: in expansion of macro 'catpt_updatel_shim'
241 | catpt_updatel_shim(cdev, CS, CATPT_CS_RST, val);
| ^~~~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c: In function 'catpt_dsp_select_lpclock':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
168 | readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~~~~~~~~~~~~~
sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
170 | writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~
sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
173 | (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
| ^~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c:302:2: note: in expansion of macro 'catpt_updatel_shim'
302 | catpt_updatel_shim(cdev, CS, mask, val);
| ^~~~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c: In function 'lpt_dsp_power_down':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
168 | readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~~~~~~~~~~~~~
sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
170 | writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~
sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
173 | (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
| ^~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c:374:2: note: in expansion of macro 'catpt_updatel_shim'
374 | catpt_updatel_shim(cdev, CS, CATPT_CS_SBCS(0) | CATPT_CS_SBCS(1),
| ^~~~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c: In function 'lpt_dsp_power_up':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
168 | readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~~~~~~~~~~~~~
sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
170 | writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~
sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
173 | (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
| ^~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c:402:2: note: in expansion of macro 'catpt_updatel_shim'
402 | catpt_updatel_shim(cdev, CS,
| ^~~~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c: In function 'wpt_dsp_power_down':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
168 | readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~~~~~~~~~~~~~
sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
170 | writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~
sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
173 | (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
| ^~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c:423:2: note: in expansion of macro 'catpt_updatel_shim'
423 | catpt_updatel_shim(cdev, CS, CATPT_CS_SBCS(0) | CATPT_CS_SBCS(1),
| ^~~~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c: In function 'wpt_dsp_power_up':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
168 | readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~~~~~~~~~~~~~
sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
170 | writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
| ^~~
sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
173 | (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
| ^~~~~~~~~~~~~~~~
sound/soc/intel/catpt/dsp.c:486:2: note: in expansion of macro 'catpt_updatel_shim'
486 | catpt_updatel_shim(cdev, CS, CATPT_CS_SBCS(0) | CATPT_CS_SBCS(1),
| ^~~~~~~~~~~~~~~~~~
vim +168 sound/soc/intel/catpt/registers.h
91c02b85c1c0fa Cezary Rojewski 2020-08-11 152
91c02b85c1c0fa Cezary Rojewski 2020-08-11 153 #define catpt_shim_addr(cdev) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11 154 ((cdev)->lpe_ba + (cdev)->spec->host_shim_offset)
91c02b85c1c0fa Cezary Rojewski 2020-08-11 155 #define catpt_dma_addr(cdev, dma) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11 156 ((cdev)->lpe_ba + (cdev)->spec->host_dma_offset[dma])
91c02b85c1c0fa Cezary Rojewski 2020-08-11 157 #define catpt_ssp_addr(cdev, ssp) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11 158 ((cdev)->lpe_ba + (cdev)->spec->host_ssp_offset[ssp])
91c02b85c1c0fa Cezary Rojewski 2020-08-11 159 #define catpt_inbox_addr(cdev) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11 160 ((cdev)->lpe_ba + (cdev)->ipc.config.inbox_offset)
91c02b85c1c0fa Cezary Rojewski 2020-08-11 161 #define catpt_outbox_addr(cdev) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11 162 ((cdev)->lpe_ba + (cdev)->ipc.config.outbox_offset)
91c02b85c1c0fa Cezary Rojewski 2020-08-11 163
91c02b85c1c0fa Cezary Rojewski 2020-08-11 164 #define catpt_writel_ssp(cdev, ssp, reg, val) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11 165 writel(val, catpt_ssp_addr(cdev, ssp) + CATPT_SSP_##reg)
91c02b85c1c0fa Cezary Rojewski 2020-08-11 166
91c02b85c1c0fa Cezary Rojewski 2020-08-11 167 #define catpt_readl_shim(cdev, reg) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11 @168 readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
91c02b85c1c0fa Cezary Rojewski 2020-08-11 169 #define catpt_writel_shim(cdev, reg, val) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11 170 writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
91c02b85c1c0fa Cezary Rojewski 2020-08-11 171 #define catpt_updatel_shim(cdev, reg, mask, val) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11 172 catpt_writel_shim(cdev, reg, \
91c02b85c1c0fa Cezary Rojewski 2020-08-11 173 (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
91c02b85c1c0fa Cezary Rojewski 2020-08-11 174
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[djwong-xfs:scrub-fixes 278/304] fs/xfs/libxfs/xfs_rtrmap_btree.c:830:28: warning: Same value in both branches of ternary operator.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git scrub-fixes
head: 1acf4b5f989a50368c7400ebc9bcb8e694811472
commit: 871702d62b015d96e1c60e54090e63f06c90ad8a [278/304] xfs: create routine to allocate and initialize a realtime rmap btree inode
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
In file included from fs/xfs/libxfs/xfs_rtrmap_btree.c:
fs/xfs/libxfs/xfs_format.h:342:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_ATTRBIT);
^
fs/xfs/libxfs/xfs_format.h:352:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_QUOTABIT);
^
fs/xfs/libxfs/xfs_format.h:368:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_DALIGNBIT);
^
fs/xfs/libxfs/xfs_format.h:379:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_SECTORBIT);
^
fs/xfs/libxfs/xfs_format.h:384:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_BORGBIT);
^
>> fs/xfs/libxfs/xfs_rtrmap_btree.c:830:28: warning: Same value in both branches of ternary operator. [duplicateValueTernary]
ip->i_df.if_broot_bytes = XFS_RTRMAP_BROOT_SPACE_CALC(0, 0);
^
vim +830 fs/xfs/libxfs/xfs_rtrmap_btree.c
797
798 /*
799 * Create a realtime rmap btree inode. The caller must clean up @ic and
800 * release the inode stored in @ipp (if it isn't NULL) regardless of the return
801 * value.
802 */
803 int
804 xfs_rtrmapbt_create(
805 struct xfs_trans **tpp,
806 struct xfs_imeta_end *ic,
807 struct xfs_inode **ipp)
808 {
809 struct xfs_mount *mp = (*tpp)->t_mountp;
810 struct xfs_inode *ip;
811 struct xfs_btree_block *block;
812 xfs_ino_t ino = NULLFSINO;
813 int error;
814
815 *ipp = NULL;
816 error = xfs_imeta_lookup(mp, &XFS_IMETA_RTRMAPBT, &ino);
817 if (error)
818 return error;
819 if (ino != NULLFSINO)
820 return -EEXIST;
821
822 error = xfs_imeta_create(tpp, &XFS_IMETA_RTRMAPBT, S_IFREG, ipp, ic);
823 if (error)
824 return error;
825
826 ip = *ipp;
827 ip->i_df.if_format = XFS_DINODE_FMT_RMAP;
828 ASSERT(ip->i_df.if_broot_bytes == 0);
829 ASSERT(ip->i_df.if_bytes == 0);
> 830 ip->i_df.if_broot_bytes = XFS_RTRMAP_BROOT_SPACE_CALC(0, 0);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month