arch/mips/sgi-ip22/ip22-mc.c:80:18: sparse: sparse: cast removes address space '__iomem' of expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: mips-randconfig-s032-20200811 (attached as .config)
compiler: mips64-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 670d0a4b10704667765f7d18f7592993d02783aa
# 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=mips
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 >>)
>> arch/mips/sgi-ip22/ip22-mc.c:80:18: sparse: sparse: cast removes address space '__iomem' of expression
--
>> arch/mips/sgi-ip22/ip22-hpc.c:35:19: sparse: sparse: cast removes address space '__iomem' of expression
arch/mips/sgi-ip22/ip22-hpc.c:37:19: sparse: sparse: cast removes address space '__iomem' of expression
--
>> arch/mips/sgi-ip22/ip22-time.c:48:64: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
>> arch/mips/sgi-ip22/ip22-time.c:48:64: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-time.c:48:64: sparse: got unsigned char volatile *
>> arch/mips/sgi-ip22/ip22-time.c:49:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
>> arch/mips/sgi-ip22/ip22-time.c:49:31: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-time.c:49:31: sparse: got unsigned char volatile *
arch/mips/sgi-ip22/ip22-time.c:50:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
arch/mips/sgi-ip22/ip22-time.c:50:30: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-time.c:50:30: sparse: got unsigned char volatile *
arch/mips/sgi-ip22/ip22-time.c:56:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char volatile * @@
arch/mips/sgi-ip22/ip22-time.c:56:17: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-time.c:56:17: sparse: got unsigned char volatile *
--
>> arch/mips/sgi-ip22/ip22-nvram.c:82:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
>> arch/mips/sgi-ip22/ip22-nvram.c:82:34: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:82:34: sparse: got unsigned int *ctrl
>> arch/mips/sgi-ip22/ip22-nvram.c:82:57: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
>> arch/mips/sgi-ip22/ip22-nvram.c:82:57: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:82:57: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:83:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:88:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:88:42: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:88:42: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:88:64: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:88:64: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:88:64: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:90:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:90:42: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:90:42: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:90:63: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:90:63: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:90:63: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:93:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:93:33: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:93:33: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:97:9: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:64:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:64:50: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:64:50: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:64:71: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:64:71: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:64:71: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:66:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:66:50: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:66:50: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:66:72: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:66:72: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:66:72: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:67:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:67:42: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:67:42: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:67:64: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:67:64: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:67:64: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:69:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:69:42: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:69:42: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:69:63: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:69:63: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:69:63: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:74:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:74:34: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:74:34: sparse: got unsigned int *ctrl
arch/mips/sgi-ip22/ip22-nvram.c:74:56: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned int *ctrl @@
arch/mips/sgi-ip22/ip22-nvram.c:74:56: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/sgi-ip22/ip22-nvram.c:74:56: sparse: got unsigned int *ctrl
vim +/__iomem +80 arch/mips/sgi-ip22/ip22-mc.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 74
^1da177e4c3f41 Linus Torvalds 2005-04-16 75 void __init sgimc_init(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 76 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 77 u32 tmp;
^1da177e4c3f41 Linus Torvalds 2005-04-16 78
^1da177e4c3f41 Linus Torvalds 2005-04-16 79 /* ioremap can't fail */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @80 sgimc = (struct sgimc_regs *)
^1da177e4c3f41 Linus Torvalds 2005-04-16 81 ioremap(SGIMC_BASE, sizeof(struct sgimc_regs));
^1da177e4c3f41 Linus Torvalds 2005-04-16 82
^1da177e4c3f41 Linus Torvalds 2005-04-16 83 printk(KERN_INFO "MC: SGI memory controller Revision %d\n",
^1da177e4c3f41 Linus Torvalds 2005-04-16 84 (int) sgimc->systemid & SGIMC_SYSID_MASKREV);
^1da177e4c3f41 Linus Torvalds 2005-04-16 85
^1da177e4c3f41 Linus Torvalds 2005-04-16 86 /* Place the MC into a known state. This must be done before
^1da177e4c3f41 Linus Torvalds 2005-04-16 87 * interrupts are first enabled etc.
^1da177e4c3f41 Linus Torvalds 2005-04-16 88 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 89
^1da177e4c3f41 Linus Torvalds 2005-04-16 90 /* Step 0: Make sure we turn off the watchdog in case it's
^1da177e4c3f41 Linus Torvalds 2005-04-16 91 * still running (which might be the case after a
^1da177e4c3f41 Linus Torvalds 2005-04-16 92 * soft reboot).
^1da177e4c3f41 Linus Torvalds 2005-04-16 93 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 94 tmp = sgimc->cpuctrl0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 95 tmp &= ~SGIMC_CCTRL0_WDOG;
^1da177e4c3f41 Linus Torvalds 2005-04-16 96 sgimc->cpuctrl0 = tmp;
^1da177e4c3f41 Linus Torvalds 2005-04-16 97
^1da177e4c3f41 Linus Torvalds 2005-04-16 98 /* Step 1: The CPU/GIO error status registers will not latch
^1da177e4c3f41 Linus Torvalds 2005-04-16 99 * up a new error status until the register has been
^1da177e4c3f41 Linus Torvalds 2005-04-16 100 * cleared by the cpu. These status registers are
^1da177e4c3f41 Linus Torvalds 2005-04-16 101 * cleared by writing any value to them.
^1da177e4c3f41 Linus Torvalds 2005-04-16 102 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 103 sgimc->cstat = sgimc->gstat = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 104
^1da177e4c3f41 Linus Torvalds 2005-04-16 105 /* Step 2: Enable all parity checking in cpu control register
^1da177e4c3f41 Linus Torvalds 2005-04-16 106 * zero.
^1da177e4c3f41 Linus Torvalds 2005-04-16 107 */
e2defae5a9b4f8 Thomas Bogendoerfer 2007-12-02 108 /* don't touch parity settings for IP28 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 109 tmp = sgimc->cpuctrl0;
e84de0c6190503 Thomas Bogendoerfer 2011-11-22 110 #ifndef CONFIG_SGI_IP28
e84de0c6190503 Thomas Bogendoerfer 2011-11-22 111 tmp |= SGIMC_CCTRL0_EPERRGIO | SGIMC_CCTRL0_EPERRMEM;
e2defae5a9b4f8 Thomas Bogendoerfer 2007-12-02 112 #endif
e84de0c6190503 Thomas Bogendoerfer 2011-11-22 113 tmp |= SGIMC_CCTRL0_R4KNOCHKPARR;
^1da177e4c3f41 Linus Torvalds 2005-04-16 114 sgimc->cpuctrl0 = tmp;
^1da177e4c3f41 Linus Torvalds 2005-04-16 115
^1da177e4c3f41 Linus Torvalds 2005-04-16 116 /* Step 3: Setup the MC write buffer depth, this is controlled
^1da177e4c3f41 Linus Torvalds 2005-04-16 117 * in cpu control register 1 in the lower 4 bits.
^1da177e4c3f41 Linus Torvalds 2005-04-16 118 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 119 tmp = sgimc->cpuctrl1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 120 tmp &= ~0xf;
^1da177e4c3f41 Linus Torvalds 2005-04-16 121 tmp |= 0xd;
^1da177e4c3f41 Linus Torvalds 2005-04-16 122 sgimc->cpuctrl1 = tmp;
^1da177e4c3f41 Linus Torvalds 2005-04-16 123
^1da177e4c3f41 Linus Torvalds 2005-04-16 124 /* Step 4: Initialize the RPSS divider register to run as fast
^1da177e4c3f41 Linus Torvalds 2005-04-16 125 * as it can correctly operate. The register is laid
^1da177e4c3f41 Linus Torvalds 2005-04-16 126 * out as follows:
^1da177e4c3f41 Linus Torvalds 2005-04-16 127 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 128 * ----------------------------------------
^1da177e4c3f41 Linus Torvalds 2005-04-16 129 * | RESERVED | INCREMENT | DIVIDER |
^1da177e4c3f41 Linus Torvalds 2005-04-16 130 * ----------------------------------------
^1da177e4c3f41 Linus Torvalds 2005-04-16 131 * 31 16 15 8 7 0
^1da177e4c3f41 Linus Torvalds 2005-04-16 132 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 133 * DIVIDER determines how often a 'tick' happens,
^1da177e4c3f41 Linus Torvalds 2005-04-16 134 * INCREMENT determines by how the RPSS increment
^1da177e4c3f41 Linus Torvalds 2005-04-16 135 * registers value increases at each 'tick'. Thus,
^1da177e4c3f41 Linus Torvalds 2005-04-16 136 * for IP22 we get INCREMENT=1, DIVIDER=1 == 0x101
^1da177e4c3f41 Linus Torvalds 2005-04-16 137 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 138 sgimc->divider = 0x101;
^1da177e4c3f41 Linus Torvalds 2005-04-16 139
^1da177e4c3f41 Linus Torvalds 2005-04-16 140 /* Step 5: Initialize GIO64 arbitrator configuration register.
^1da177e4c3f41 Linus Torvalds 2005-04-16 141 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 142 * NOTE: HPC init code in sgihpc_init() must run before us because
^1da177e4c3f41 Linus Torvalds 2005-04-16 143 * we need to know Guiness vs. FullHouse and the board
^1da177e4c3f41 Linus Torvalds 2005-04-16 144 * revision on this machine. You have been warned.
^1da177e4c3f41 Linus Torvalds 2005-04-16 145 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 146
^1da177e4c3f41 Linus Torvalds 2005-04-16 147 /* First the basic invariants across all GIO64 implementations. */
e84de0c6190503 Thomas Bogendoerfer 2011-11-22 148 tmp = sgimc->giopar & SGIMC_GIOPAR_GFX64; /* keep gfx 64bit settings */
e84de0c6190503 Thomas Bogendoerfer 2011-11-22 149 tmp |= SGIMC_GIOPAR_HPC64; /* All 1st HPC's interface at 64bits */
^1da177e4c3f41 Linus Torvalds 2005-04-16 150 tmp |= SGIMC_GIOPAR_ONEBUS; /* Only one physical GIO bus exists */
^1da177e4c3f41 Linus Torvalds 2005-04-16 151
^1da177e4c3f41 Linus Torvalds 2005-04-16 152 if (ip22_is_fullhouse()) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 153 /* Fullhouse specific settings. */
^1da177e4c3f41 Linus Torvalds 2005-04-16 154 if (SGIOC_SYSID_BOARDREV(sgioc->sysid) < 2) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 155 tmp |= SGIMC_GIOPAR_HPC264; /* 2nd HPC at 64bits */
^1da177e4c3f41 Linus Torvalds 2005-04-16 156 tmp |= SGIMC_GIOPAR_PLINEEXP0; /* exp0 pipelines */
^1da177e4c3f41 Linus Torvalds 2005-04-16 157 tmp |= SGIMC_GIOPAR_MASTEREXP1; /* exp1 masters */
^1da177e4c3f41 Linus Torvalds 2005-04-16 158 tmp |= SGIMC_GIOPAR_RTIMEEXP0; /* exp0 is realtime */
^1da177e4c3f41 Linus Torvalds 2005-04-16 159 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 160 tmp |= SGIMC_GIOPAR_HPC264; /* 2nd HPC 64bits */
^1da177e4c3f41 Linus Torvalds 2005-04-16 161 tmp |= SGIMC_GIOPAR_PLINEEXP0; /* exp[01] pipelined */
^1da177e4c3f41 Linus Torvalds 2005-04-16 162 tmp |= SGIMC_GIOPAR_PLINEEXP1;
^1da177e4c3f41 Linus Torvalds 2005-04-16 163 tmp |= SGIMC_GIOPAR_MASTEREISA; /* EISA masters */
^1da177e4c3f41 Linus Torvalds 2005-04-16 164 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 165 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 166 /* Guiness specific settings. */
^1da177e4c3f41 Linus Torvalds 2005-04-16 167 tmp |= SGIMC_GIOPAR_EISA64; /* MC talks to EISA at 64bits */
^1da177e4c3f41 Linus Torvalds 2005-04-16 168 tmp |= SGIMC_GIOPAR_MASTEREISA; /* EISA bus can act as master */
^1da177e4c3f41 Linus Torvalds 2005-04-16 169 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 170 sgimc->giopar = tmp; /* poof */
^1da177e4c3f41 Linus Torvalds 2005-04-16 171
^1da177e4c3f41 Linus Torvalds 2005-04-16 172 probe_memory();
^1da177e4c3f41 Linus Torvalds 2005-04-16 173 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 174
:::::: The code at line 80 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/gpio/gpio-mxs.c:362:21: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
Hi Anson,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: 6876ca311bfca5d7cae30c4b529aeb9449c072eb gpio: mxs: add COMPILE_TEST support for GPIO_MXS
date: 5 months ago
config: openrisc-randconfig-s031-20200811 (attached as .config)
compiler: or1k-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 6876ca311bfca5d7cae30c4b529aeb9449c072eb
# 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=openrisc
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/gpio/gpio-mxs.c:362:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] <asn:2> *base @@
>> drivers/gpio/gpio-mxs.c:362:21: sparse: expected void *addr
>> drivers/gpio/gpio-mxs.c:362:21: sparse: got void [noderef] <asn:2> *base
drivers/gpio/gpio-mxs.c: note: in included file (through arch/openrisc/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
vim +362 drivers/gpio/gpio-mxs.c
4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 276
3836309d93462b drivers/gpio/gpio-mxs.c Bill Pemberton 2012-11-19 277 static int mxs_gpio_probe(struct platform_device *pdev)
fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 278 {
4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 279 struct device_node *np = pdev->dev.of_node;
4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 280 struct device_node *parent;
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 281 static void __iomem *base;
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 282 struct mxs_gpio_port *port;
0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 283 int irq_base;
498c17cf6a9353 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-07 284 int err;
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 285
940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 286 port = devm_kzalloc(&pdev->dev, sizeof(*port), GFP_KERNEL);
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 287 if (!port)
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 288 return -ENOMEM;
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 289
4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 290 port->id = of_alias_get_id(np, "gpio");
4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 291 if (port->id < 0)
4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 292 return port->id;
1f2d357b9ebef5 drivers/gpio/gpio-mxs.c Thierry Reding 2018-04-30 293 port->devid = (enum mxs_gpio_id)of_device_get_match_data(&pdev->dev);
5751d3dcf43e24 drivers/gpio/gpio-mxs.c Bartosz Golaszewski 2017-08-09 294 port->dev = &pdev->dev;
940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 295 port->irq = platform_get_irq(pdev, 0);
940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 296 if (port->irq < 0)
940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 297 return port->irq;
940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 298
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 299 /*
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 300 * map memory region only once, as all the gpio ports
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 301 * share the same one
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 302 */
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 303 if (!base) {
4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 304 parent = of_get_parent(np);
4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 305 base = of_iomap(parent, 0);
4052d45e800ce3 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 306 of_node_put(parent);
641d03422a59b1 drivers/gpio/gpio-mxs.c Thierry Reding 2013-01-21 307 if (!base)
641d03422a59b1 drivers/gpio/gpio-mxs.c Thierry Reding 2013-01-21 308 return -EADDRNOTAVAIL;
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 309 }
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 310 port->base = base;
fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 311
f08ea3cc94eeaf drivers/gpio/gpio-mxs.c Sascha Hauer 2016-10-21 312 /* initially disable the interrupts */
f08ea3cc94eeaf drivers/gpio/gpio-mxs.c Sascha Hauer 2016-10-21 313 writel(0, port->base + PINCTRL_PIN2IRQ(port));
164387d2b4ae20 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-03 314 writel(0, port->base + PINCTRL_IRQEN(port));
fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 315
fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 316 /* clear address has to be used to clear IRQSTAT bits */
164387d2b4ae20 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-03 317 writel(~0U, port->base + PINCTRL_IRQSTAT(port) + MXS_CLR);
fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 318
8514b5439c90f0 drivers/gpio/gpio-mxs.c Bartosz Golaszewski 2017-03-04 319 irq_base = devm_irq_alloc_descs(&pdev->dev, -1, 0, 32, numa_node_id());
44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 320 if (irq_base < 0) {
44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 321 err = irq_base;
44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 322 goto out_iounmap;
44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 323 }
0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 324
0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 325 port->domain = irq_domain_add_legacy(np, 32, irq_base, 0,
0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 326 &irq_domain_simple_ops, NULL);
0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 327 if (!port->domain) {
0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 328 err = -ENODEV;
8514b5439c90f0 drivers/gpio/gpio-mxs.c Bartosz Golaszewski 2017-03-04 329 goto out_iounmap;
0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 330 }
0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 331
498c17cf6a9353 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-07 332 /* gpio-mxs can be a generic irq chip */
1bbc557d976b4e drivers/gpio/gpio-mxs.c Peng Fan 2015-08-23 333 err = mxs_gpio_init_gc(port, irq_base);
1bbc557d976b4e drivers/gpio/gpio-mxs.c Peng Fan 2015-08-23 334 if (err < 0)
1bbc557d976b4e drivers/gpio/gpio-mxs.c Peng Fan 2015-08-23 335 goto out_irqdomain_remove;
fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 336
fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 337 /* setup one handler for each entry */
a44735f421b447 drivers/gpio/gpio-mxs.c Russell King 2015-06-16 338 irq_set_chained_handler_and_data(port->irq, mxs_gpio_irq_handler,
a44735f421b447 drivers/gpio/gpio-mxs.c Russell King 2015-06-16 339 port);
fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 340
0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 341 err = bgpio_init(&port->gc, &pdev->dev, 4,
164387d2b4ae20 drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-03 342 port->base + PINCTRL_DIN(port),
90dae4ebf03063 drivers/gpio/gpio-mxs.c Maxime Ripard 2013-04-29 343 port->base + PINCTRL_DOUT(port) + MXS_SET,
90dae4ebf03063 drivers/gpio/gpio-mxs.c Maxime Ripard 2013-04-29 344 port->base + PINCTRL_DOUT(port) + MXS_CLR,
84a442b9a16ee6 drivers/gpio/gpio-mxs.c Linus Torvalds 2012-05-26 345 port->base + PINCTRL_DOE(port), NULL, 0);
8d7cf8370d5fb7 drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 346 if (err)
0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 347 goto out_irqdomain_remove;
fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 348
0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 349 port->gc.to_irq = mxs_gpio_to_irq;
0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 350 port->gc.get_direction = mxs_gpio_get_direction;
0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 351 port->gc.base = port->id * 32;
06f88a8ae9085e drivers/gpio/gpio-mxs.c Shawn Guo 2011-06-06 352
0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 353 err = gpiochip_add_data(&port->gc, port);
0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 354 if (err)
0f4630f3720e7e drivers/gpio/gpio-mxs.c Linus Walleij 2015-12-04 355 goto out_irqdomain_remove;
fba311fcf09873 arch/arm/mach-mxs/gpio.c Shawn Guo 2010-12-18 356
940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 357 return 0;
0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 358
1bbc557d976b4e drivers/gpio/gpio-mxs.c Peng Fan 2015-08-23 359 out_irqdomain_remove:
1bbc557d976b4e drivers/gpio/gpio-mxs.c Peng Fan 2015-08-23 360 irq_domain_remove(port->domain);
44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 361 out_iounmap:
44df08198bc98d drivers/gpio/gpio-mxs.c Arvind Yadav 2016-10-05 @362 iounmap(port->base);
0b76c5412146c1 drivers/gpio/gpio-mxs.c Shawn Guo 2012-08-20 363 return err;
940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 364 }
940a4f7b51f7ad drivers/gpio/gpio-mxs.c Shawn Guo 2012-05-04 365
:::::: The code at line 362 was first introduced by commit
:::::: 44df08198bc98d75085bb0ff4b54bf43e0bc40c0 gpio: mxs: Unmap region obtained by of_iomap
:::::: TO: Arvind Yadav <arvind.yadav.cs(a)gmail.com>
:::::: CC: Linus Walleij <linus.walleij(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[mmotm:master 106/260] include/linux/spinlock.h:378:9: sparse: sparse: context imbalance in 'dump_tasks' - unexpected unlock
by kernel test robot
tree: git://git.cmpxchg.org/linux-mmotm.git master
head: 89331b857195aa00660fb19f1383924e95f7709e
commit: 57cfa5e82e8d30fd8532f606df1d77c1408cf97d [106/260] mm, oom: avoid printk() iteration under RCU
config: mips-randconfig-s032-20200811 (attached as .config)
compiler: mips64-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 57cfa5e82e8d30fd8532f606df1d77c1408cf97d
# 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=mips
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 >>)
mm/oom_kill.c: note: in included file (through include/linux/rculist.h, include/linux/sched/signal.h, include/linux/oom.h):
include/linux/rcupdate.h:642:9: sparse: sparse: context imbalance in 'find_lock_task_mm' - wrong count at exit
mm/oom_kill.c: note: in included file:
include/linux/sched/mm.h:166:37: sparse: sparse: dereference of noderef expression
mm/oom_kill.c: note: in included file (through include/linux/wait.h, include/linux/pid.h, include/linux/sched.h, ...):
include/linux/spinlock.h:378:9: sparse: sparse: context imbalance in 'oom_badness' - unexpected unlock
>> include/linux/spinlock.h:378:9: sparse: sparse: context imbalance in 'dump_tasks' - unexpected unlock
mm/oom_kill.c: note: in included file (through include/linux/rculist.h, include/linux/sched/signal.h, include/linux/oom.h):
include/linux/rcupdate.h:644:9: sparse: sparse: context imbalance in '__oom_kill_process' - unexpected unlock
vim +/dump_tasks +378 include/linux/spinlock.h
c2f21ce2e31286 Thomas Gleixner 2009-12-02 375
3490565b633c70 Denys Vlasenko 2015-07-13 376 static __always_inline void spin_unlock(spinlock_t *lock)
c2f21ce2e31286 Thomas Gleixner 2009-12-02 377 {
c2f21ce2e31286 Thomas Gleixner 2009-12-02 @378 raw_spin_unlock(&lock->rlock);
c2f21ce2e31286 Thomas Gleixner 2009-12-02 379 }
c2f21ce2e31286 Thomas Gleixner 2009-12-02 380
:::::: The code at line 378 was first introduced by commit
:::::: c2f21ce2e31286a0a32f8da0a7856e9ca1122ef3 locking: Implement new raw_spinlock
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[intel-linux-intel-lts:5.4/yocto 63/66] drivers/ptp/ptp-intel-pmc-tgpio.c:388:6: warning: variable 'new_start_ns' is used uninitialized whenever 'if' condition is false
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 7e5be1eaf9b5088cda67df5351c2c12572db341b
commit: 357fc48f29d865a0760168fd13f28f512487eb00 [63/66] drivers/ptp: Add PMC Time-Aware GPIO Driver
config: x86_64-randconfig-r023-20200811 (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 357fc48f29d865a0760168fd13f28f512487eb00
# 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 >>):
>> drivers/ptp/ptp-intel-pmc-tgpio.c:388:6: warning: variable 'new_start_ns' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (on || perout->flags & PTP_PEROUT_ONE_SHOT) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:396:26: note: uninitialized use occurs here
(tgpio, perout->index, new_start_ns, new_period_ns,
^~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:388:2: note: remove the 'if' if its condition is always true
if (on || perout->flags & PTP_PEROUT_ONE_SHOT) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:385:2: note: variable 'new_start_ns' is declared here
struct timespec64 new_start_ns;
^
>> drivers/ptp/ptp-intel-pmc-tgpio.c:388:6: warning: variable 'new_period_ns' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (on || perout->flags & PTP_PEROUT_ONE_SHOT) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:396:40: note: uninitialized use occurs here
(tgpio, perout->index, new_start_ns, new_period_ns,
^~~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:388:2: note: remove the 'if' if its condition is always true
if (on || perout->flags & PTP_PEROUT_ONE_SHOT) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ptp/ptp-intel-pmc-tgpio.c:386:2: note: variable 'new_period_ns' is declared here
struct timespec64 new_period_ns;
^
>> drivers/ptp/ptp-intel-pmc-tgpio.c:738:36: warning: unused variable 'intel_pmc_acpi_match' [-Wunused-const-variable]
static const struct acpi_device_id intel_pmc_acpi_match[] = {
^
3 warnings generated.
vim +388 drivers/ptp/ptp-intel-pmc-tgpio.c
381
382 static int intel_pmc_tgpio_config_output
383 (struct intel_pmc_tgpio_t *tgpio, struct ptp_perout_request *perout, int on)
384 {
385 struct timespec64 new_start_ns;
386 struct timespec64 new_period_ns;
387
> 388 if (on || perout->flags & PTP_PEROUT_ONE_SHOT) {
389 new_start_ns = ptp_clock_time_to_ts64(perout->start);
390 new_period_ns = ptp_clock_time_to_ts64(perout->period);
391 new_period_ns = ktime_to_timespec64
392 (ktime_divns(timespec64_to_ktime(new_period_ns), 2));
393 }
394
395 return _intel_pmc_tgpio_config_output
396 (tgpio, perout->index, new_start_ns, new_period_ns,
397 perout->flags, on);
398 }
399
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/dma/fsl_raid.c:115:17: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: powerpc-randconfig-s031-20200811 (attached as .config)
compiler: powerpc64-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 670d0a4b10704667765f7d18f7592993d02783aa
# 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=powerpc
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/dma/fsl_raid.c:115:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int const volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
>> drivers/dma/fsl_raid.c:115:17: sparse: expected unsigned int const volatile [noderef] [usertype] __iomem *addr
drivers/dma/fsl_raid.c:115:17: sparse: got restricted __be32 *
>> drivers/dma/fsl_raid.c:129:34: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
>> drivers/dma/fsl_raid.c:129:34: sparse: expected unsigned int volatile [noderef] [usertype] __iomem *addr
drivers/dma/fsl_raid.c:129:34: sparse: got restricted __be32 *
drivers/dma/fsl_raid.c:171:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int const volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:171:17: sparse: expected unsigned int const volatile [noderef] [usertype] __iomem *addr
drivers/dma/fsl_raid.c:171:17: sparse: got restricted __be32 *
drivers/dma/fsl_raid.c:196:34: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:196:34: sparse: expected unsigned int volatile [noderef] [usertype] __iomem *addr
drivers/dma/fsl_raid.c:196:34: sparse: got restricted __be32 *
drivers/dma/fsl_raid.c:210:36: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int const volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:210:36: sparse: expected unsigned int const volatile [noderef] [usertype] __iomem *addr
drivers/dma/fsl_raid.c:210:36: sparse: got restricted __be32 *
drivers/dma/fsl_raid.c:220:42: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int const volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:220:42: sparse: expected unsigned int const volatile [noderef] [usertype] __iomem *addr
drivers/dma/fsl_raid.c:220:42: sparse: got restricted __be32 *
drivers/dma/fsl_raid.c:226:26: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:226:26: sparse: expected unsigned int volatile [noderef] [usertype] __iomem *addr
drivers/dma/fsl_raid.c:226:26: sparse: got restricted __be32 *
drivers/dma/fsl_raid.c:246:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] efrl32 @@ got unsigned int [assigned] [usertype] efrl @@
drivers/dma/fsl_raid.c:246:26: sparse: expected restricted __be32 [usertype] efrl32
drivers/dma/fsl_raid.c:246:26: sparse: got unsigned int [assigned] [usertype] efrl
drivers/dma/fsl_raid.c:247:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] addr_high @@ got unsigned int [usertype] @@
drivers/dma/fsl_raid.c:247:29: sparse: expected restricted __be32 [usertype] addr_high
drivers/dma/fsl_raid.c:247:29: sparse: got unsigned int [usertype]
drivers/dma/fsl_raid.c:248:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] addr_low @@ got unsigned int [usertype] @@
drivers/dma/fsl_raid.c:248:28: sparse: expected restricted __be32 [usertype] addr_low
drivers/dma/fsl_raid.c:248:28: sparse: got unsigned int [usertype]
drivers/dma/fsl_raid.c:260:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] fmt32 @@ got int @@
drivers/dma/fsl_raid.c:260:28: sparse: expected restricted __be32 [usertype] fmt32
drivers/dma/fsl_raid.c:260:28: sparse: got int
drivers/dma/fsl_raid.c:261:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] lbea32 @@ got unsigned int [usertype] @@
drivers/dma/fsl_raid.c:261:29: sparse: expected restricted __be32 [usertype] lbea32
drivers/dma/fsl_raid.c:261:29: sparse: got unsigned int [usertype]
drivers/dma/fsl_raid.c:262:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] addr_low @@ got unsigned int [usertype] @@
drivers/dma/fsl_raid.c:262:31: sparse: expected restricted __be32 [usertype] addr_low
drivers/dma/fsl_raid.c:262:31: sparse: got unsigned int [usertype]
drivers/dma/fsl_raid.c:338:18: sparse: sparse: incompatible types for operation (<=):
drivers/dma/fsl_raid.c:338:18: sparse: struct fsl_re_desc *[assigned] desc
drivers/dma/fsl_raid.c:338:18: sparse: int
drivers/dma/fsl_raid.c:462:18: sparse: sparse: incompatible types for operation (<=):
drivers/dma/fsl_raid.c:462:18: sparse: struct fsl_re_desc *[assigned] desc
drivers/dma/fsl_raid.c:462:18: sparse: int
drivers/dma/fsl_raid.c:546:18: sparse: sparse: incompatible types for operation (<=):
drivers/dma/fsl_raid.c:546:18: sparse: struct fsl_re_desc *[assigned] desc
drivers/dma/fsl_raid.c:546:18: sparse: int
drivers/dma/fsl_raid.c:712:23: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:714:23: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:716:23: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:718:23: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:720:23: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:722:23: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:726:31: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int const volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:729:23: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:735:23: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
>> drivers/dma/fsl_raid.c:768:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct fsl_re_ctrl *re_regs @@ got void [noderef] __iomem * @@
drivers/dma/fsl_raid.c:773:26: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:776:26: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:778:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int const volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:778:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int const volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
drivers/dma/fsl_raid.c:778:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int const volatile [noderef] [usertype] __iomem *addr @@ got restricted __be32 * @@
vim +115 drivers/dma/fsl_raid.c
ad80da658bbcaa Xuelin Shi 2015-03-03 103
ad80da658bbcaa Xuelin Shi 2015-03-03 104 /* Copy descriptor from per chan software queue into hardware job ring */
ad80da658bbcaa Xuelin Shi 2015-03-03 105 static void fsl_re_issue_pending(struct dma_chan *chan)
ad80da658bbcaa Xuelin Shi 2015-03-03 106 {
ad80da658bbcaa Xuelin Shi 2015-03-03 107 struct fsl_re_chan *re_chan;
ad80da658bbcaa Xuelin Shi 2015-03-03 108 int avail;
ad80da658bbcaa Xuelin Shi 2015-03-03 109 struct fsl_re_desc *desc, *_desc;
ad80da658bbcaa Xuelin Shi 2015-03-03 110 unsigned long flags;
ad80da658bbcaa Xuelin Shi 2015-03-03 111
ad80da658bbcaa Xuelin Shi 2015-03-03 112 re_chan = container_of(chan, struct fsl_re_chan, chan);
ad80da658bbcaa Xuelin Shi 2015-03-03 113
ad80da658bbcaa Xuelin Shi 2015-03-03 114 spin_lock_irqsave(&re_chan->desc_lock, flags);
ad80da658bbcaa Xuelin Shi 2015-03-03 @115 avail = FSL_RE_SLOT_AVAIL(
ad80da658bbcaa Xuelin Shi 2015-03-03 116 in_be32(&re_chan->jrregs->inbring_slot_avail));
ad80da658bbcaa Xuelin Shi 2015-03-03 117
ad80da658bbcaa Xuelin Shi 2015-03-03 118 list_for_each_entry_safe(desc, _desc, &re_chan->submit_q, node) {
ad80da658bbcaa Xuelin Shi 2015-03-03 119 if (!avail)
ad80da658bbcaa Xuelin Shi 2015-03-03 120 break;
ad80da658bbcaa Xuelin Shi 2015-03-03 121
ad80da658bbcaa Xuelin Shi 2015-03-03 122 list_move_tail(&desc->node, &re_chan->active_q);
ad80da658bbcaa Xuelin Shi 2015-03-03 123
ad80da658bbcaa Xuelin Shi 2015-03-03 124 memcpy(&re_chan->inb_ring_virt_addr[re_chan->inb_count],
ad80da658bbcaa Xuelin Shi 2015-03-03 125 &desc->hwdesc, sizeof(struct fsl_re_hw_desc));
ad80da658bbcaa Xuelin Shi 2015-03-03 126
ad80da658bbcaa Xuelin Shi 2015-03-03 127 re_chan->inb_count = (re_chan->inb_count + 1) &
ad80da658bbcaa Xuelin Shi 2015-03-03 128 FSL_RE_RING_SIZE_MASK;
ad80da658bbcaa Xuelin Shi 2015-03-03 @129 out_be32(&re_chan->jrregs->inbring_add_job, FSL_RE_ADD_JOB(1));
ad80da658bbcaa Xuelin Shi 2015-03-03 130 avail--;
ad80da658bbcaa Xuelin Shi 2015-03-03 131 }
ad80da658bbcaa Xuelin Shi 2015-03-03 132 spin_unlock_irqrestore(&re_chan->desc_lock, flags);
ad80da658bbcaa Xuelin Shi 2015-03-03 133 }
ad80da658bbcaa Xuelin Shi 2015-03-03 134
:::::: The code at line 115 was first introduced by commit
:::::: ad80da658bbcaaac1d3617ea6cb0f4d5e16da422 dmaengine: Driver support for FSL RaidEngine device.
:::::: TO: Xuelin Shi <xuelin.shi(a)freescale.com>
:::::: CC: Vinod Koul <vinod.koul(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
kernel/trace/ftrace.c:5477:35: sparse: expected struct ftrace_hash __rcu ftrace_graph_hash
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: arm64-randconfig-s032-20200811 (attached as .config)
compiler: aarch64-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 670d0a4b10704667765f7d18f7592993d02783aa
# 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=arm64
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 >>)
kernel/trace/ftrace.c:292:16: sparse: expected struct ftrace_ops **p
kernel/trace/ftrace.c:292:16: sparse: got struct ftrace_ops [noderef] __rcu **list
kernel/trace/ftrace.c:292:50: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops **p @@ got struct ftrace_ops [noderef] __rcu ** @@
kernel/trace/ftrace.c:292:50: sparse: expected struct ftrace_ops **p
kernel/trace/ftrace.c:292:50: sparse: got struct ftrace_ops [noderef] __rcu **
kernel/trace/ftrace.c:299:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops * @@ got struct ftrace_ops [noderef] __rcu *next @@
kernel/trace/ftrace.c:299:12: sparse: expected struct ftrace_ops *
kernel/trace/ftrace.c:299:12: sparse: got struct ftrace_ops [noderef] __rcu *next
kernel/trace/ftrace.c:587:5: sparse: sparse: symbol 'ftrace_profile_pages_init' was not declared. Should it be static?
kernel/trace/ftrace.c:1043:43: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *notrace_hash @@ got struct ftrace_hash * @@
kernel/trace/ftrace.c:1043:43: sparse: expected struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1043:43: sparse: got struct ftrace_hash *
kernel/trace/ftrace.c:1044:43: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *filter_hash @@ got struct ftrace_hash * @@
kernel/trace/ftrace.c:1044:43: sparse: expected struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1044:43: sparse: got struct ftrace_hash *
kernel/trace/ftrace.c:1263:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1263:40: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1263:40: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1264:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:1264:40: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1264:40: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1959:54: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash *old_hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1959:54: sparse: expected struct ftrace_hash *old_hash
kernel/trace/ftrace.c:1959:54: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1445:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/trace/ftrace.c:1445:9: sparse: struct ftrace_hash [noderef] __rcu *
kernel/trace/ftrace.c:1445:9: sparse: struct ftrace_hash *
kernel/trace/ftrace.c:1461:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1461:39: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1461:39: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1462:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1462:40: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1462:40: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1463:40: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:1463:40: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1463:40: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1464:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:1464:42: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1464:42: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1618:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops *ops @@ got struct ftrace_ops [noderef] __rcu *[addressable] [toplevel] ftrace_ops_list @@
kernel/trace/ftrace.c:1618:18: sparse: expected struct ftrace_ops *ops
kernel/trace/ftrace.c:1618:18: sparse: got struct ftrace_ops [noderef] __rcu *[addressable] [toplevel] ftrace_ops_list
kernel/trace/ftrace.c:1619:43: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops *ops @@ got struct ftrace_ops [noderef] __rcu *next @@
kernel/trace/ftrace.c:1619:43: sparse: expected struct ftrace_ops *ops
kernel/trace/ftrace.c:1619:43: sparse: got struct ftrace_ops [noderef] __rcu *next
kernel/trace/ftrace.c:1665:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1665:22: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1665:22: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1666:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *other_hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:1666:28: sparse: expected struct ftrace_hash *other_hash
kernel/trace/ftrace.c:1666:28: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1671:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:1671:22: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1671:22: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:1672:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *other_hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1672:28: sparse: expected struct ftrace_hash *other_hash
kernel/trace/ftrace.c:1672:28: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1937:50: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1937:50: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1937:50: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:1948:50: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:1948:50: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:1948:50: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:3220:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:3220:14: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3220:14: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:3237:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:3237:22: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3237:22: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:3712:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:3712:22: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3712:22: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:3715:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:3715:22: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3715:22: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:4117:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4117:27: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4117:27: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:4119:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4119:27: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4119:27: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:4491:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4491:19: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4491:19: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:4633:19: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4633:19: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4633:19: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:4639:34: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *filter_hash @@ got struct ftrace_hash *[assigned] old_hash @@
kernel/trace/ftrace.c:4639:34: sparse: expected struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:4639:34: sparse: got struct ftrace_hash *[assigned] old_hash
kernel/trace/ftrace.c:4891:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4891:27: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4891:27: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:4893:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:4893:27: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:4893:27: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:5477:35: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *extern [addressable] [toplevel] ftrace_graph_hash @@ got struct ftrace_hash *[assigned] hash @@
>> kernel/trace/ftrace.c:5477:35: sparse: expected struct ftrace_hash [noderef] __rcu *extern [addressable] [toplevel] ftrace_graph_hash
kernel/trace/ftrace.c:5477:35: sparse: got struct ftrace_hash *[assigned] hash
kernel/trace/ftrace.c:5479:43: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *extern [addressable] [toplevel] ftrace_graph_notrace_hash @@ got struct ftrace_hash *[assigned] hash @@
>> kernel/trace/ftrace.c:5479:43: sparse: expected struct ftrace_hash [noderef] __rcu *extern [addressable] [toplevel] ftrace_graph_notrace_hash
kernel/trace/ftrace.c:5479:43: sparse: got struct ftrace_hash *[assigned] hash
kernel/trace/ftrace.c:5538:35: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:5538:35: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:5538:35: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:5542:35: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_hash **orig_hash @@ got struct ftrace_hash [noderef] __rcu ** @@
kernel/trace/ftrace.c:5542:35: sparse: expected struct ftrace_hash **orig_hash
kernel/trace/ftrace.c:5542:35: sparse: got struct ftrace_hash [noderef] __rcu **
kernel/trace/ftrace.c:5596:47: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *[addressable] [toplevel] ftrace_graph_hash @@ got struct ftrace_hash * @@
>> kernel/trace/ftrace.c:5596:47: sparse: expected struct ftrace_hash [noderef] __rcu *[addressable] [toplevel] ftrace_graph_hash
kernel/trace/ftrace.c:5596:47: sparse: got struct ftrace_hash *
kernel/trace/ftrace.c:5597:55: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ftrace_hash [noderef] __rcu *[addressable] [toplevel] ftrace_graph_notrace_hash @@ got struct ftrace_hash * @@
>> kernel/trace/ftrace.c:5597:55: sparse: expected struct ftrace_hash [noderef] __rcu *[addressable] [toplevel] ftrace_graph_notrace_hash
kernel/trace/ftrace.c:5597:55: sparse: got struct ftrace_hash *
kernel/trace/ftrace.c:6192:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops *ops @@ got struct ftrace_ops [noderef] __rcu *[addressable] [toplevel] ftrace_ops_list @@
kernel/trace/ftrace.c:6192:18: sparse: expected struct ftrace_ops *ops
kernel/trace/ftrace.c:6192:18: sparse: got struct ftrace_ops [noderef] __rcu *[addressable] [toplevel] ftrace_ops_list
kernel/trace/ftrace.c:6192:66: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ftrace_ops *ops @@ got struct ftrace_ops [noderef] __rcu *next @@
kernel/trace/ftrace.c:6192:66: sparse: expected struct ftrace_ops *ops
kernel/trace/ftrace.c:6192:66: sparse: got struct ftrace_ops [noderef] __rcu *next
kernel/trace/ftrace.c:6233:59: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:6233:59: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:6233:59: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:6234:59: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:6234:59: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:6234:59: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:6589:62: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:6589:62: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:6589:62: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:6590:62: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:6590:62: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:6590:62: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:6636:36: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/trace/ftrace.c:6636:36: sparse: struct ftrace_ops [noderef] __rcu *
kernel/trace/ftrace.c:6636:36: sparse: struct ftrace_ops *
kernel/trace/ftrace.c:7423:43: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void * @@ got void [noderef] __user *buffer @@
kernel/trace/ftrace.c:7423:43: sparse: expected void *
kernel/trace/ftrace.c:7423:43: sparse: got void [noderef] __user *buffer
kernel/trace/ftrace.c:203:20: sparse: sparse: dereference of noderef expression
kernel/trace/ftrace.c:203:20: sparse: sparse: dereference of noderef expression
kernel/trace/ftrace.c:203:20: sparse: sparse: dereference of noderef expression
kernel/trace/ftrace.c:3011:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:3011:46: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3011:46: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:3012:47: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:3012:47: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3012:47: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:3016:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:3016:44: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:3016:44: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
kernel/trace/ftrace.c:2988:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *filter_hash @@
kernel/trace/ftrace.c:2988:48: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:2988:48: sparse: got struct ftrace_hash [noderef] __rcu *filter_hash
kernel/trace/ftrace.c:2989:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct ftrace_hash *hash @@ got struct ftrace_hash [noderef] __rcu *notrace_hash @@
kernel/trace/ftrace.c:2989:49: sparse: expected struct ftrace_hash *hash
kernel/trace/ftrace.c:2989:49: sparse: got struct ftrace_hash [noderef] __rcu *notrace_hash
vim +5477 kernel/trace/ftrace.c
0d7d9a16ce11268 Namhyung Kim 2014-06-13 5456
0d7d9a16ce11268 Namhyung Kim 2014-06-13 5457 static void __init set_ftrace_early_graph(char *buf, int enable)
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5458 {
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5459 int ret;
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5460 char *func;
b9b0c831bed2682 Namhyung Kim 2017-01-20 5461 struct ftrace_hash *hash;
0d7d9a16ce11268 Namhyung Kim 2014-06-13 5462
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 5463) hash = alloc_ftrace_hash(FTRACE_HASH_DEFAULT_BITS);
24589e3a20876dc Steven Rostedt (VMware 2020-01-25 5464) if (MEM_FAIL(!hash, "Failed to allocate hash\n"))
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 5465) return;
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5466
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5467 while (buf) {
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5468 func = strsep(&buf, ",");
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5469 /* we allow only one expression at a time */
b9b0c831bed2682 Namhyung Kim 2017-01-20 5470 ret = ftrace_graph_set_hash(hash, func);
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5471 if (ret)
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5472 printk(KERN_DEBUG "ftrace: function %s not "
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5473 "traceable\n", func);
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5474 }
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 5475)
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 5476) if (enable)
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 @5477) ftrace_graph_hash = hash;
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 5478) else
92ad18ec26611e8 Steven Rostedt (VMware 2017-03-02 @5479) ftrace_graph_notrace_hash = hash;
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5480 }
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5481 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5482
2a85a37f168d2b4 Steven Rostedt 2011-12-19 5483 void __init
2a85a37f168d2b4 Steven Rostedt 2011-12-19 5484 ftrace_set_early_filter(struct ftrace_ops *ops, char *buf, int enable)
2af15d6a44b871a Steven Rostedt 2009-05-28 5485 {
2af15d6a44b871a Steven Rostedt 2009-05-28 5486 char *func;
2af15d6a44b871a Steven Rostedt 2009-05-28 5487
f04f24fb7e48d44 Masami Hiramatsu 2013-05-09 5488 ftrace_ops_init(ops);
f04f24fb7e48d44 Masami Hiramatsu 2013-05-09 5489
2af15d6a44b871a Steven Rostedt 2009-05-28 5490 while (buf) {
2af15d6a44b871a Steven Rostedt 2009-05-28 5491 func = strsep(&buf, ",");
f45948e898e7bc7 Steven Rostedt 2011-05-02 5492 ftrace_set_regex(ops, func, strlen(func), 0, enable);
2af15d6a44b871a Steven Rostedt 2009-05-28 5493 }
2af15d6a44b871a Steven Rostedt 2009-05-28 5494 }
2af15d6a44b871a Steven Rostedt 2009-05-28 5495
2af15d6a44b871a Steven Rostedt 2009-05-28 5496 static void __init set_ftrace_early_filters(void)
2af15d6a44b871a Steven Rostedt 2009-05-28 5497 {
2af15d6a44b871a Steven Rostedt 2009-05-28 5498 if (ftrace_filter_buf[0])
2a85a37f168d2b4 Steven Rostedt 2011-12-19 5499 ftrace_set_early_filter(&global_ops, ftrace_filter_buf, 1);
2af15d6a44b871a Steven Rostedt 2009-05-28 5500 if (ftrace_notrace_buf[0])
2a85a37f168d2b4 Steven Rostedt 2011-12-19 5501 ftrace_set_early_filter(&global_ops, ftrace_notrace_buf, 0);
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5502 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5503 if (ftrace_graph_buf[0])
0d7d9a16ce11268 Namhyung Kim 2014-06-13 5504 set_ftrace_early_graph(ftrace_graph_buf, 1);
0d7d9a16ce11268 Namhyung Kim 2014-06-13 5505 if (ftrace_graph_notrace_buf[0])
0d7d9a16ce11268 Namhyung Kim 2014-06-13 5506 set_ftrace_early_graph(ftrace_graph_notrace_buf, 0);
369bc18f9a6c4e2 Stefan Assmann 2009-10-12 5507 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
2af15d6a44b871a Steven Rostedt 2009-05-28 5508 }
2af15d6a44b871a Steven Rostedt 2009-05-28 5509
fc13cb0ce45296f Steven Rostedt 2011-12-19 5510 int ftrace_regex_release(struct inode *inode, struct file *file)
5072c59fd45e997 Steven Rostedt 2008-05-12 5511 {
5072c59fd45e997 Steven Rostedt 2008-05-12 5512 struct seq_file *m = (struct seq_file *)file->private_data;
5072c59fd45e997 Steven Rostedt 2008-05-12 5513 struct ftrace_iterator *iter;
33dc9b1267d59ce Steven Rostedt 2011-05-02 5514 struct ftrace_hash **orig_hash;
689fd8b65d669b9 jolsa(a)redhat.com 2009-09-11 5515 struct trace_parser *parser;
ed926f9b35cda09 Steven Rostedt 2011-05-03 5516 int filter_hash;
33dc9b1267d59ce Steven Rostedt 2011-05-02 5517 int ret;
5072c59fd45e997 Steven Rostedt 2008-05-12 5518
5072c59fd45e997 Steven Rostedt 2008-05-12 5519 if (file->f_mode & FMODE_READ) {
5072c59fd45e997 Steven Rostedt 2008-05-12 5520 iter = m->private;
5072c59fd45e997 Steven Rostedt 2008-05-12 5521 seq_release(inode, file);
5072c59fd45e997 Steven Rostedt 2008-05-12 5522 } else
5072c59fd45e997 Steven Rostedt 2008-05-12 5523 iter = file->private_data;
5072c59fd45e997 Steven Rostedt 2008-05-12 5524
689fd8b65d669b9 jolsa(a)redhat.com 2009-09-11 5525 parser = &iter->parser;
689fd8b65d669b9 jolsa(a)redhat.com 2009-09-11 5526 if (trace_parser_loaded(parser)) {
1cf41dd79993389 Steven Rostedt 2011-04-29 5527 ftrace_match_records(iter->hash, parser->buffer, parser->idx);
5072c59fd45e997 Steven Rostedt 2008-05-12 5528 }
5072c59fd45e997 Steven Rostedt 2008-05-12 5529
058e297d34a404c Steven Rostedt 2011-04-29 5530 trace_parser_put(parser);
058e297d34a404c Steven Rostedt 2011-04-29 5531
33b7f99cf003ca6 Steven Rostedt (Red Hat 2014-08-15 5532) mutex_lock(&iter->ops->func_hash->regex_lock);
3f2367ba7cbf13e Masami Hiramatsu 2013-05-09 5533
058e297d34a404c Steven Rostedt 2011-04-29 5534 if (file->f_mode & FMODE_WRITE) {
ed926f9b35cda09 Steven Rostedt 2011-05-03 5535 filter_hash = !!(iter->flags & FTRACE_ITER_FILTER);
ed926f9b35cda09 Steven Rostedt 2011-05-03 5536
8c08f0d5c6fb10f Steven Rostedt (VMware 2017-06-26 5537) if (filter_hash) {
33b7f99cf003ca6 Steven Rostedt (Red Hat 2014-08-15 5538) orig_hash = &iter->ops->func_hash->filter_hash;
69d71879d2cf67a Steven Rostedt (VMware 2017-07-05 5539) if (iter->tr && !list_empty(&iter->tr->mod_trace))
8c08f0d5c6fb10f Steven Rostedt (VMware 2017-06-26 5540) iter->hash->flags |= FTRACE_HASH_FL_MOD;
8c08f0d5c6fb10f Steven Rostedt (VMware 2017-06-26 5541) } else
33b7f99cf003ca6 Steven Rostedt (Red Hat 2014-08-15 5542) orig_hash = &iter->ops->func_hash->notrace_hash;
33dc9b1267d59ce Steven Rostedt 2011-05-02 5543
e6ea44e9b4c1232 Steven Rostedt 2009-02-14 5544 mutex_lock(&ftrace_lock);
e16b35ddb840788 Steven Rostedt (VMware 2017-04-04 5545) ret = ftrace_hash_move_and_update_ops(iter->ops, orig_hash,
e16b35ddb840788 Steven Rostedt (VMware 2017-04-04 5546) iter->hash, filter_hash);
e6ea44e9b4c1232 Steven Rostedt 2009-02-14 5547 mutex_unlock(&ftrace_lock);
c20489dad156dd9 Steven Rostedt (VMware 2017-03-29 5548) } else {
c20489dad156dd9 Steven Rostedt (VMware 2017-03-29 5549) /* For read only, the hash is the ops hash */
c20489dad156dd9 Steven Rostedt (VMware 2017-03-29 5550) iter->hash = NULL;
058e297d34a404c Steven Rostedt 2011-04-29 5551 }
3f2367ba7cbf13e Masami Hiramatsu 2013-05-09 5552
33b7f99cf003ca6 Steven Rostedt (Red Hat 2014-08-15 5553) mutex_unlock(&iter->ops->func_hash->regex_lock);
33dc9b1267d59ce Steven Rostedt 2011-05-02 5554 free_ftrace_hash(iter->hash);
9ef16693aff8137 Steven Rostedt (VMware 2019-10-11 5555) if (iter->tr)
9ef16693aff8137 Steven Rostedt (VMware 2019-10-11 5556) trace_array_put(iter->tr);
33dc9b1267d59ce Steven Rostedt 2011-05-02 5557 kfree(iter);
689fd8b65d669b9 jolsa(a)redhat.com 2009-09-11 5558
5072c59fd45e997 Steven Rostedt 2008-05-12 5559 return 0;
5072c59fd45e997 Steven Rostedt 2008-05-12 5560 }
5072c59fd45e997 Steven Rostedt 2008-05-12 5561
5e2336a0d47c966 Steven Rostedt 2009-03-05 5562 static const struct file_operations ftrace_avail_fops = {
5072c59fd45e997 Steven Rostedt 2008-05-12 5563 .open = ftrace_avail_open,
5072c59fd45e997 Steven Rostedt 2008-05-12 5564 .read = seq_read,
5072c59fd45e997 Steven Rostedt 2008-05-12 5565 .llseek = seq_lseek,
3be04b471b95b87 Li Zefan 2009-08-17 5566 .release = seq_release_private,
5072c59fd45e997 Steven Rostedt 2008-05-12 5567 };
5072c59fd45e997 Steven Rostedt 2008-05-12 5568
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5569 static const struct file_operations ftrace_enabled_fops = {
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5570 .open = ftrace_enabled_open,
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5571 .read = seq_read,
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5572 .llseek = seq_lseek,
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5573 .release = seq_release_private,
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5574 };
647bcd03d5b2fb4 Steven Rostedt 2011-05-03 5575
5e2336a0d47c966 Steven Rostedt 2009-03-05 5576 static const struct file_operations ftrace_filter_fops = {
5072c59fd45e997 Steven Rostedt 2008-05-12 5577 .open = ftrace_filter_open,
850a80cfaa5aec3 Lai Jiangshan 2009-03-13 5578 .read = seq_read,
5072c59fd45e997 Steven Rostedt 2008-05-12 5579 .write = ftrace_filter_write,
098c879e1f2d6ee Steven Rostedt (Red Hat 2013-12-21 5580) .llseek = tracing_lseek,
1cf41dd79993389 Steven Rostedt 2011-04-29 5581 .release = ftrace_regex_release,
5072c59fd45e997 Steven Rostedt 2008-05-12 5582 };
5072c59fd45e997 Steven Rostedt 2008-05-12 5583
5e2336a0d47c966 Steven Rostedt 2009-03-05 5584 static const struct file_operations ftrace_notrace_fops = {
41c52c0db9607e5 Steven Rostedt 2008-05-22 5585 .open = ftrace_notrace_open,
850a80cfaa5aec3 Lai Jiangshan 2009-03-13 5586 .read = seq_read,
41c52c0db9607e5 Steven Rostedt 2008-05-22 5587 .write = ftrace_notrace_write,
098c879e1f2d6ee Steven Rostedt (Red Hat 2013-12-21 5588) .llseek = tracing_lseek,
1cf41dd79993389 Steven Rostedt 2011-04-29 5589 .release = ftrace_regex_release,
41c52c0db9607e5 Steven Rostedt 2008-05-22 5590 };
41c52c0db9607e5 Steven Rostedt 2008-05-22 5591
ea4e2bc4d9f7370 Steven Rostedt 2008-12-03 5592 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
ea4e2bc4d9f7370 Steven Rostedt 2008-12-03 5593
ea4e2bc4d9f7370 Steven Rostedt 2008-12-03 5594 static DEFINE_MUTEX(graph_lock);
ea4e2bc4d9f7370 Steven Rostedt 2008-12-03 5595
24a9729f831462b Amol Grover 2020-02-01 @5596 struct ftrace_hash __rcu *ftrace_graph_hash = EMPTY_HASH;
fd0e6852c407dd9 Amol Grover 2020-02-05 @5597 struct ftrace_hash __rcu *ftrace_graph_notrace_hash = EMPTY_HASH;
b9b0c831bed2682 Namhyung Kim 2017-01-20 5598
:::::: The code at line 5477 was first introduced by commit
:::::: 92ad18ec26611e8a47639e600bd9dc42fbe2edcf ftrace/graph: Do not modify the EMPTY_HASH for the function_graph filter
:::::: TO: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
:::::: CC: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
include/linux/rwlock_api_smp.h:226:9: sparse: sparse: context imbalance in 'raw_seq_stop' - unexpected unlock
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: addfc38672c73efd5c4e559a2e455b086e3e20c5 arm64: atomics: avoid out-of-line ll/sc atomics
date: 12 months ago
config: arm64-randconfig-s032-20200811 (attached as .config)
compiler: aarch64-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 addfc38672c73efd5c4e559a2e455b086e3e20c5
# 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=arm64
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/ipv4/raw.c: note: in included file (through include/net/checksum.h, include/linux/skbuff.h, include/linux/pim.h, ...):
arch/arm64/include/asm/checksum.h:34:27: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __wsum [usertype] csum @@ got unsigned int [usertype] @@
arch/arm64/include/asm/checksum.h:34:27: sparse: expected restricted __wsum [usertype] csum
arch/arm64/include/asm/checksum.h:34:27: sparse: got unsigned int [usertype]
net/ipv4/raw.c:1041:21: sparse: sparse: context imbalance in 'raw_seq_start' - wrong count at exit
net/ipv4/raw.c: note: in included file (through include/linux/spinlock_api_smp.h, include/linux/spinlock.h, include/linux/wait.h, ...):
>> include/linux/rwlock_api_smp.h:226:9: sparse: sparse: context imbalance in 'raw_seq_stop' - unexpected unlock
--
net/ipv6/anycast.c: note: in included file (through include/linux/spinlock_api_smp.h, include/linux/spinlock.h, include/linux/seqlock.h, ...):
>> include/linux/rwlock_api_smp.h:250:9: sparse: sparse: context imbalance in 'ac6_get_next' - unexpected unlock
net/ipv6/anycast.c:530:9: sparse: sparse: context imbalance in 'ac6_get_idx' - wrong count at exit
net/ipv6/anycast.c: note: in included file (through include/linux/rbtree.h, include/linux/mm_types.h, include/linux/mmzone.h, ...):
include/linux/rcupdate.h:644:9: sparse: sparse: context imbalance in 'ac6_seq_stop' - unexpected unlock
--
net/ipv6/mcast.c:259:25: sparse: sparse: context imbalance in 'ip6_mc_find_dev_rcu' - different lock contexts for basic block
net/ipv6/mcast.c: note: in included file (through include/linux/spinlock_api_smp.h, include/linux/spinlock.h, include/linux/seqlock.h, ...):
>> include/linux/rwlock_api_smp.h:250:9: sparse: sparse: context imbalance in 'ip6_mc_source' - unexpected unlock
>> include/linux/rwlock_api_smp.h:250:9: sparse: sparse: context imbalance in 'ip6_mc_msfilter' - unexpected unlock
>> include/linux/rwlock_api_smp.h:250:9: sparse: sparse: context imbalance in 'ip6_mc_msfget' - unexpected unlock
>> include/linux/rwlock_api_smp.h:250:9: sparse: sparse: context imbalance in 'igmp6_mc_get_next' - unexpected unlock
net/ipv6/mcast.c:2725:9: sparse: sparse: context imbalance in 'igmp6_mc_get_idx' - wrong count at exit
net/ipv6/mcast.c:2752:9: sparse: sparse: context imbalance in 'igmp6_mc_seq_stop' - unexpected unlock
net/ipv6/mcast.c:2824:31: sparse: sparse: context imbalance in 'igmp6_mcf_get_next' - unexpected unlock
net/ipv6/mcast.c:2856:9: sparse: sparse: context imbalance in 'igmp6_mcf_get_idx' - wrong count at exit
net/ipv6/mcast.c:2873:9: sparse: sparse: context imbalance in 'igmp6_mcf_seq_next' - wrong count at exit
>> include/linux/rwlock_api_smp.h:250:9: sparse: sparse: context imbalance in 'igmp6_mcf_seq_stop' - unexpected unlock
--
fs/btrfs/locking.c: note: in included file (through include/linux/spinlock_api_smp.h, include/linux/spinlock.h, include/linux/wait.h, ...):
>> include/linux/rwlock_api_smp.h:226:9: sparse: sparse: context imbalance in 'btrfs_set_lock_blocking_read' - unexpected unlock
fs/btrfs/locking.c:115:17: sparse: sparse: context imbalance in 'btrfs_set_lock_blocking_write' - unexpected unlock
fs/btrfs/locking.c:122:6: sparse: sparse: context imbalance in 'btrfs_clear_lock_blocking_read' - different lock contexts for basic block
fs/btrfs/locking.c:140:6: sparse: sparse: context imbalance in 'btrfs_clear_lock_blocking_write' - different lock contexts for basic block
fs/btrfs/locking.c:162:6: sparse: sparse: context imbalance in 'btrfs_tree_read_lock' - different lock contexts for basic block
fs/btrfs/locking.c:201:5: sparse: sparse: context imbalance in 'btrfs_tree_read_lock_atomic' - different lock contexts for basic block
fs/btrfs/locking.c:221:5: sparse: sparse: context imbalance in 'btrfs_try_tree_read_lock' - different lock contexts for basic block
fs/btrfs/locking.c:243:5: sparse: sparse: context imbalance in 'btrfs_try_tree_write_lock' - different lock contexts for basic block
>> include/linux/rwlock_api_smp.h:226:9: sparse: sparse: context imbalance in 'btrfs_tree_read_unlock' - unexpected unlock
fs/btrfs/locking.c:326:9: sparse: sparse: context imbalance in 'btrfs_tree_lock' - wrong count at exit
fs/btrfs/locking.c:356:17: sparse: sparse: context imbalance in 'btrfs_tree_unlock' - unexpected unlock
vim +/raw_seq_stop +226 include/linux/rwlock_api_smp.h
6b6b4792f89346 Thomas Gleixner 2009-11-16 222
9c1721aa4994f6 Thomas Gleixner 2009-12-03 223 static inline void __raw_read_unlock(rwlock_t *lock)
6b6b4792f89346 Thomas Gleixner 2009-11-16 224 {
6b6b4792f89346 Thomas Gleixner 2009-11-16 225 rwlock_release(&lock->dep_map, 1, _RET_IP_);
9828ea9d75c38f Thomas Gleixner 2009-12-03 @226 do_raw_read_unlock(lock);
6b6b4792f89346 Thomas Gleixner 2009-11-16 227 preempt_enable();
6b6b4792f89346 Thomas Gleixner 2009-11-16 228 }
6b6b4792f89346 Thomas Gleixner 2009-11-16 229
9c1721aa4994f6 Thomas Gleixner 2009-12-03 230 static inline void
9c1721aa4994f6 Thomas Gleixner 2009-12-03 231 __raw_read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
6b6b4792f89346 Thomas Gleixner 2009-11-16 232 {
6b6b4792f89346 Thomas Gleixner 2009-11-16 233 rwlock_release(&lock->dep_map, 1, _RET_IP_);
9828ea9d75c38f Thomas Gleixner 2009-12-03 234 do_raw_read_unlock(lock);
6b6b4792f89346 Thomas Gleixner 2009-11-16 235 local_irq_restore(flags);
6b6b4792f89346 Thomas Gleixner 2009-11-16 236 preempt_enable();
6b6b4792f89346 Thomas Gleixner 2009-11-16 237 }
6b6b4792f89346 Thomas Gleixner 2009-11-16 238
9c1721aa4994f6 Thomas Gleixner 2009-12-03 239 static inline void __raw_read_unlock_irq(rwlock_t *lock)
6b6b4792f89346 Thomas Gleixner 2009-11-16 240 {
6b6b4792f89346 Thomas Gleixner 2009-11-16 241 rwlock_release(&lock->dep_map, 1, _RET_IP_);
9828ea9d75c38f Thomas Gleixner 2009-12-03 242 do_raw_read_unlock(lock);
6b6b4792f89346 Thomas Gleixner 2009-11-16 243 local_irq_enable();
6b6b4792f89346 Thomas Gleixner 2009-11-16 244 preempt_enable();
6b6b4792f89346 Thomas Gleixner 2009-11-16 245 }
6b6b4792f89346 Thomas Gleixner 2009-11-16 246
9c1721aa4994f6 Thomas Gleixner 2009-12-03 247 static inline void __raw_read_unlock_bh(rwlock_t *lock)
6b6b4792f89346 Thomas Gleixner 2009-11-16 248 {
6b6b4792f89346 Thomas Gleixner 2009-11-16 249 rwlock_release(&lock->dep_map, 1, _RET_IP_);
9828ea9d75c38f Thomas Gleixner 2009-12-03 @250 do_raw_read_unlock(lock);
9ea4c380066fbe Peter Zijlstra 2013-11-19 251 __local_bh_enable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET);
6b6b4792f89346 Thomas Gleixner 2009-11-16 252 }
6b6b4792f89346 Thomas Gleixner 2009-11-16 253
:::::: The code at line 226 was first introduced by commit
:::::: 9828ea9d75c38fe3dce05d00566eed61c85732e6 locking: Further name space cleanups
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[acrn:4.19/lts 25/85] drivers/i2c/busses/i2c-virtio.c:75:24: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://github.com/projectacrn/acrn-kernel 4.19/lts
head: 8abec6c5ebdace7220ecfa35b317c76f62e29c31
commit: d91916aa26f01021b2eaaabbe7ab5429bba4c6c9 [25/85] add support for virtio-i2c FE driver
config: alpha-randconfig-s032-20200811 (attached as .config)
compiler: alpha-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 d91916aa26f01021b2eaaabbe7ab5429bba4c6c9
# 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=alpha
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-virtio.c:75:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __virtio16 [usertype] addr @@ got unsigned short [usertype] addr @@
>> drivers/i2c/busses/i2c-virtio.c:75:24: sparse: expected restricted __virtio16 [usertype] addr
>> drivers/i2c/busses/i2c-virtio.c:75:24: sparse: got unsigned short [usertype] addr
>> drivers/i2c/busses/i2c-virtio.c:76:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __virtio16 [usertype] flags @@ got unsigned short [usertype] flags @@
>> drivers/i2c/busses/i2c-virtio.c:76:25: sparse: expected restricted __virtio16 [usertype] flags
>> drivers/i2c/busses/i2c-virtio.c:76:25: sparse: got unsigned short [usertype] flags
>> drivers/i2c/busses/i2c-virtio.c:77:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __virtio16 [usertype] len @@ got unsigned short [usertype] len @@
>> drivers/i2c/busses/i2c-virtio.c:77:23: sparse: expected restricted __virtio16 [usertype] len
>> drivers/i2c/busses/i2c-virtio.c:77:23: sparse: got unsigned short [usertype] len
>> drivers/i2c/busses/i2c-virtio.c:80:46: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned long [usertype] size @@ got restricted __virtio16 [usertype] len @@
>> drivers/i2c/busses/i2c-virtio.c:80:46: sparse: expected unsigned long [usertype] size
>> drivers/i2c/busses/i2c-virtio.c:80:46: sparse: got restricted __virtio16 [usertype] len
>> drivers/i2c/busses/i2c-virtio.c:85:30: sparse: sparse: restricted __virtio16 degrades to integer
drivers/i2c/busses/i2c-virtio.c:167:40: sparse: sparse: restricted __virtio16 degrades to integer
>> drivers/i2c/busses/i2c-virtio.c:168:75: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned long @@ got restricted __virtio16 [usertype] len @@
>> drivers/i2c/busses/i2c-virtio.c:168:75: sparse: expected unsigned long
drivers/i2c/busses/i2c-virtio.c:168:75: sparse: got restricted __virtio16 [usertype] len
drivers/i2c/busses/i2c-virtio.c: note: in included file (through include/linux/bitops.h, include/linux/kernel.h, include/linux/list.h, ...):
arch/alpha/include/asm/bitops.h:380:13: sparse: sparse: undefined identifier '__builtin_alpha_cmpbge'
arch/alpha/include/asm/bitops.h:382:13: sparse: sparse: undefined identifier '__builtin_alpha_extbl'
drivers/i2c/busses/i2c-virtio.c: In function 'virtio_i2c_probe':
drivers/i2c/busses/i2c-virtio.c:236:17: warning: unused variable 'pdev' [-Wunused-variable]
236 | struct device *pdev = vdev->dev.parent;
| ^~~~
vim +75 drivers/i2c/busses/i2c-virtio.c
67
68 static int virtio_queue_add_msg(struct virtqueue *vq,
69 struct virtio_i2c_msg *vmsg,
70 struct i2c_msg *msg)
71 {
72 struct scatterlist *sgs[3], hdr, bout, bin, status;
73 int outcnt = 0, incnt = 0;
74
> 75 vmsg->hdr.addr = msg->addr;
> 76 vmsg->hdr.flags = msg->flags;
> 77 vmsg->hdr.len = msg->len;
78
79 if (vmsg->hdr.len)
> 80 vmsg->buf = kzalloc(vmsg->hdr.len, GFP_KERNEL);
81
82 sg_init_one(&hdr, &vmsg->hdr, sizeof(struct virtio_i2c_hdr));
83 sgs[outcnt++] = &hdr;
84 if (vmsg->buf) {
> 85 if (vmsg->hdr.flags & I2C_M_RD) {
86 sg_init_one(&bin, vmsg->buf, msg->len);
87 sgs[outcnt + incnt++] = &bin;
88 } else {
89 memcpy(vmsg->buf, msg->buf, msg->len);
90 sg_init_one(&bout, vmsg->buf, msg->len);
91 sgs[outcnt++] = &bout;
92 }
93 }
94 sg_init_one(&status, &vmsg->status, 1);
95 sgs[outcnt + incnt++] = &status;
96
97 return virtqueue_add_sgs(vq, sgs, outcnt, incnt, vmsg, GFP_KERNEL);
98 }
99
100 static int virtio_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
101 {
102 struct virtio_i2c *virtio_i2c = i2c_get_adapdata(adap);
103 struct virtqueue *vq = virtio_i2c->msg_vq.vq;
104 struct virtio_i2c_msg *vmsg, *msg_r;
105 int len, i, ret;
106 unsigned long time_left;
107
108 ret = 0;
109 if (unlikely(!vq))
110 return ret;
111
112 vmsg = kzalloc(sizeof(*vmsg), GFP_KERNEL);
113 if (unlikely(!vmsg))
114 return ret;
115
116 mutex_lock(&virtio_i2c->i2c_lock);
117 vmsg->buf = NULL;
118 for (i = 0; i < num; i++) {
119 dev_dbg(&adap->dev,
120 "start to add msg[%d]: addr:0x%x\n",
121 i,
122 msgs[i].addr);
123
124 ret = virtio_queue_add_msg(vq, vmsg, &msgs[i]);
125 if (ret) {
126 dev_err(&adap->dev,
127 "failed to add msg[%d] to virtqueue\n",
128 i);
129 ret = 0;
130 goto err;
131 }
132
133 virtqueue_kick(vq);
134 dev_dbg(&adap->dev, "wait for complete...\n");
135 /*wait for complete*/
136 time_left = wait_for_completion_timeout(&virtio_i2c->completion,
137 adap->timeout);
138 if (!time_left) {
139 dev_err(&adap->dev,
140 "msg[%d]: addr=0x%x timeout\n",
141 i,
142 msgs[i].addr);
143 ret = i ? (i - 1) : 0;
144 goto err;
145 }
146 msg_r = (struct virtio_i2c_msg *)virtqueue_get_buf(vq, &len);
147 if (msg_r) {
148 /* msg_r should point to the same address with vmsg */
149 if (msg_r != vmsg) {
150 dev_err(&adap->dev,
151 "msg[%d]: addr=0x%x virtqueue error\n",
152 i,
153 msg_r->hdr.addr);
154 ret = i - 1;
155 goto err;
156 }
157
158 if (msg_r->status != VIRTIO_I2C_MSG_OK) {
159 dev_dbg(&adap->dev,
160 "msg[%d]: addr=0x%x error=%d\n",
161 i,
162 msg_r->hdr.addr,
163 msg_r->status);
164 ret = i - 1;
165 goto err;
166 }
167 if ((msg_r->hdr.flags & I2C_M_RD) && msg_r->hdr.len)
> 168 memcpy(msgs[i].buf, msg_r->buf, msg_r->hdr.len);
169 kfree(msg_r->buf);
170 msg_r->buf = NULL;
171 }
172 reinit_completion(&virtio_i2c->completion);
173 dev_dbg(&adap->dev, "msg[%d] ok\n", i);
174 }
175 if (i == num)
176 ret = num;
177
178 err:
179 mutex_unlock(&virtio_i2c->i2c_lock);
180 if (vmsg) {
181 kfree(vmsg->buf);
182 vmsg->buf = NULL;
183 kfree(vmsg);
184 }
185 return ret;
186 }
187
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[linux-next:master 13398/13940] drivers/net/ethernet/sfc/ef100_nic.c:610: undefined reference to `__umoddi3'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d15fe4ec043588beee823781602ddb51d0bc84c8
commit: adcfc3482ffff813fa2c34e5902005853f79c2aa [13398/13940] sfc_ef100: read Design Parameters at probe time
config: microblaze-randconfig-r032-20200805 (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 adcfc3482ffff813fa2c34e5902005853f79c2aa
# 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: drivers/net/ethernet/sfc/ef100_nic.o: in function `ef100_process_design_param':
>> drivers/net/ethernet/sfc/ef100_nic.c:610: undefined reference to `__umoddi3'
vim +610 drivers/net/ethernet/sfc/ef100_nic.c
567
568 static int ef100_process_design_param(struct efx_nic *efx,
569 const struct ef100_tlv_state *reader)
570 {
571 struct ef100_nic_data *nic_data = efx->nic_data;
572
573 switch (reader->type) {
574 case ESE_EF100_DP_GZ_PAD: /* padding, skip it */
575 return 0;
576 case ESE_EF100_DP_GZ_PARTIAL_TSTAMP_SUB_NANO_BITS:
577 /* Driver doesn't support timestamping yet, so we don't care */
578 return 0;
579 case ESE_EF100_DP_GZ_EVQ_UNSOL_CREDIT_SEQ_BITS:
580 /* Driver doesn't support unsolicited-event credits yet, so
581 * we don't care
582 */
583 return 0;
584 case ESE_EF100_DP_GZ_NMMU_GROUP_SIZE:
585 /* Driver doesn't manage the NMMU (so we don't care) */
586 return 0;
587 case ESE_EF100_DP_GZ_RX_L4_CSUM_PROTOCOLS:
588 /* Driver uses CHECKSUM_COMPLETE, so we don't care about
589 * protocol checksum validation
590 */
591 return 0;
592 case ESE_EF100_DP_GZ_TSO_MAX_HDR_LEN:
593 nic_data->tso_max_hdr_len = min_t(u64, reader->value, 0xffff);
594 return 0;
595 case ESE_EF100_DP_GZ_TSO_MAX_HDR_NUM_SEGS:
596 /* We always put HDR_NUM_SEGS=1 in our TSO descriptors */
597 if (!reader->value) {
598 netif_err(efx, probe, efx->net_dev,
599 "TSO_MAX_HDR_NUM_SEGS < 1\n");
600 return -EOPNOTSUPP;
601 }
602 return 0;
603 case ESE_EF100_DP_GZ_RXQ_SIZE_GRANULARITY:
604 case ESE_EF100_DP_GZ_TXQ_SIZE_GRANULARITY:
605 /* Our TXQ and RXQ sizes are always power-of-two and thus divisible by
606 * EFX_MIN_DMAQ_SIZE, so we just need to check that
607 * EFX_MIN_DMAQ_SIZE is divisible by GRANULARITY.
608 * This is very unlikely to fail.
609 */
> 610 if (EFX_MIN_DMAQ_SIZE % reader->value) {
611 netif_err(efx, probe, efx->net_dev,
612 "%s size granularity is %llu, can't guarantee safety\n",
613 reader->type == ESE_EF100_DP_GZ_RXQ_SIZE_GRANULARITY ? "RXQ" : "TXQ",
614 reader->value);
615 return -EOPNOTSUPP;
616 }
617 return 0;
618 case ESE_EF100_DP_GZ_TSO_MAX_PAYLOAD_LEN:
619 nic_data->tso_max_payload_len = min_t(u64, reader->value, GSO_MAX_SIZE);
620 efx->net_dev->gso_max_size = nic_data->tso_max_payload_len;
621 return 0;
622 case ESE_EF100_DP_GZ_TSO_MAX_PAYLOAD_NUM_SEGS:
623 nic_data->tso_max_payload_num_segs = min_t(u64, reader->value, 0xffff);
624 efx->net_dev->gso_max_segs = nic_data->tso_max_payload_num_segs;
625 return 0;
626 case ESE_EF100_DP_GZ_TSO_MAX_NUM_FRAMES:
627 nic_data->tso_max_frames = min_t(u64, reader->value, 0xffff);
628 return 0;
629 case ESE_EF100_DP_GZ_COMPAT:
630 if (reader->value) {
631 netif_err(efx, probe, efx->net_dev,
632 "DP_COMPAT has unknown bits %#llx, driver not compatible with this hw\n",
633 reader->value);
634 return -EOPNOTSUPP;
635 }
636 return 0;
637 case ESE_EF100_DP_GZ_MEM2MEM_MAX_LEN:
638 /* Driver doesn't use mem2mem transfers */
639 return 0;
640 case ESE_EF100_DP_GZ_EVQ_TIMER_TICK_NANOS:
641 /* Driver doesn't currently use EVQ_TIMER */
642 return 0;
643 case ESE_EF100_DP_GZ_NMMU_PAGE_SIZES:
644 /* Driver doesn't manage the NMMU (so we don't care) */
645 return 0;
646 case ESE_EF100_DP_GZ_VI_STRIDES:
647 /* We never try to set the VI stride, and we don't rely on
648 * being able to find VIs past VI 0 until after we've learned
649 * the current stride from MC_CMD_GET_CAPABILITIES.
650 * So the value of this shouldn't matter.
651 */
652 if (reader->value != ESE_EF100_DP_GZ_VI_STRIDES_DEFAULT)
653 netif_dbg(efx, probe, efx->net_dev,
654 "NIC has other than default VI_STRIDES (mask "
655 "%#llx), early probing might use wrong one\n",
656 reader->value);
657 return 0;
658 case ESE_EF100_DP_GZ_RX_MAX_RUNT:
659 /* Driver doesn't look at L2_STATUS:LEN_ERR bit, so we don't
660 * care whether it indicates runt or overlength for any given
661 * packet, so we don't care about this parameter.
662 */
663 return 0;
664 default:
665 /* Host interface says "Drivers should ignore design parameters
666 * that they do not recognise."
667 */
668 netif_dbg(efx, probe, efx->net_dev,
669 "Ignoring unrecognised design parameter %u\n",
670 reader->type);
671 return 0;
672 }
673 }
674
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
include/linux/rwlock_api_smp.h:226:9: sparse: sparse: context imbalance in 'prb_clear_blk_fill_status' - unexpected unlock
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: 632ca50f2cbd8809a2fc1934b4b2c9c49bd55e98 af_packet: TPACKET_V3: replace busy-wait loop
date: 4 weeks ago
config: arm64-randconfig-s032-20200811 (attached as .config)
compiler: aarch64-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 632ca50f2cbd8809a2fc1934b4b2c9c49bd55e98
# 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=arm64
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/packet/af_packet.c: note: in included file (through include/linux/spinlock_api_smp.h, include/linux/spinlock.h, include/linux/mmzone.h, ...):
>> include/linux/rwlock_api_smp.h:226:9: sparse: sparse: context imbalance in 'prb_clear_blk_fill_status' - unexpected unlock
net/packet/af_packet.c:1001:9: sparse: sparse: context imbalance in 'prb_fill_curr_block' - wrong count at exit
net/packet/af_packet.c: note: in included file (through arch/arm64/include/asm/smp.h, include/linux/smp.h, arch/arm64/include/asm/arch_timer.h, ...):
arch/arm64/include/asm/percpu.h:112:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
arch/arm64/include/asm/percpu.h:112:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
vim +/prb_clear_blk_fill_status +226 include/linux/rwlock_api_smp.h
6b6b4792f89346 Thomas Gleixner 2009-11-16 222
9c1721aa4994f6 Thomas Gleixner 2009-12-03 223 static inline void __raw_read_unlock(rwlock_t *lock)
6b6b4792f89346 Thomas Gleixner 2009-11-16 224 {
5facae4f3549b5 Qian Cai 2019-09-19 225 rwlock_release(&lock->dep_map, _RET_IP_);
9828ea9d75c38f Thomas Gleixner 2009-12-03 @226 do_raw_read_unlock(lock);
6b6b4792f89346 Thomas Gleixner 2009-11-16 227 preempt_enable();
6b6b4792f89346 Thomas Gleixner 2009-11-16 228 }
6b6b4792f89346 Thomas Gleixner 2009-11-16 229
:::::: The code at line 226 was first introduced by commit
:::::: 9828ea9d75c38fe3dce05d00566eed61c85732e6 locking: Further name space cleanups
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month