tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 7999516e20bd9bb5d1f7351cbd05ca529a3a8d60 commit: 04e6bb0d6bb127bac929fb35edd2dd01613c9520 [5399/6030] spi: modify set_cs_timing parameter config: arm64-randconfig-s032-20210806 (attached as .config) compiler: aarch64-linux-gcc (GCC) 10.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.3-348-gf0e6938b-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=04e6bb0d6bb127bac929fb35edd2dd01613c9520 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 04e6bb0d6bb127bac929fb35edd2dd01613c9520 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/spi/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) >> drivers/spi/spi-mt65xx.c:242:24: sparse: sparse: incompatible types in comparison expression (different type sizes): >> drivers/spi/spi-mt65xx.c:242:24: sparse: unsigned short * >> drivers/spi/spi-mt65xx.c:242:24: sparse: int * drivers/spi/spi-mt65xx.c:243:25: sparse: sparse: incompatible types in comparison expression (different type sizes): drivers/spi/spi-mt65xx.c:243:25: sparse: unsigned short * drivers/spi/spi-mt65xx.c:243:25: sparse: int * drivers/spi/spi-mt65xx.c:251:24: sparse: sparse: incompatible types in comparison expression (different type sizes): drivers/spi/spi-mt65xx.c:251:24: sparse: unsigned short * drivers/spi/spi-mt65xx.c:251:24: sparse: int * drivers/spi/spi-mt65xx.c:252:25: sparse: sparse: incompatible types in comparison expression (different type sizes): drivers/spi/spi-mt65xx.c:252:25: sparse: unsigned short * drivers/spi/spi-mt65xx.c:252:25: sparse: int * drivers/spi/spi-mt65xx.c:261:20: sparse: sparse: incompatible types in comparison expression (different type sizes): drivers/spi/spi-mt65xx.c:261:20: sparse: unsigned short * drivers/spi/spi-mt65xx.c:261:20: sparse: int * vim +242 drivers/spi/spi-mt65xx.c 210 211 static int mtk_spi_set_hw_cs_timing(struct spi_device *spi) 212 { 213 struct mtk_spi *mdata = spi_master_get_devdata(spi->master); 214 struct spi_delay *cs_setup = &spi->cs_setup; 215 struct spi_delay *cs_hold = &spi->cs_hold; 216 struct spi_delay *cs_inactive = &spi->cs_inactive; 217 u16 setup, hold, inactive; 218 u32 reg_val; 219 int delay; 220 221 delay = spi_delay_to_ns(cs_setup, NULL); 222 if (delay < 0) 223 return delay; 224 setup = (delay * DIV_ROUND_UP(mdata->spi_clk_hz, 1000000)) / 1000; 225 226 delay = spi_delay_to_ns(cs_hold, NULL); 227 if (delay < 0) 228 return delay; 229 hold = (delay * DIV_ROUND_UP(mdata->spi_clk_hz, 1000000)) / 1000; 230 231 delay = spi_delay_to_ns(cs_inactive, NULL); 232 if (delay < 0) 233 return delay; 234 inactive = (delay * DIV_ROUND_UP(mdata->spi_clk_hz, 1000000)) / 1000; 235 236 setup = setup ? setup : 1; 237 hold = hold ? hold : 1; 238 inactive = inactive ? inactive : 1; 239 240 reg_val = readl(mdata->base + SPI_CFG0_REG); 241 if (mdata->dev_comp->enhance_timing) { > 242 hold = min(hold, 0xffff); 243 setup = min(setup, 0xffff); 244 reg_val &= ~(0xffff << SPI_ADJUST_CFG0_CS_HOLD_OFFSET); 245 reg_val |= (((hold - 1) & 0xffff) 246 << SPI_ADJUST_CFG0_CS_HOLD_OFFSET); 247 reg_val &= ~(0xffff << SPI_ADJUST_CFG0_CS_SETUP_OFFSET); 248 reg_val |= (((setup - 1) & 0xffff) 249 << SPI_ADJUST_CFG0_CS_SETUP_OFFSET); 250 } else { 251 hold = min(hold, 0xff); 252 setup = min(setup, 0xff); 253 reg_val &= ~(0xff << SPI_CFG0_CS_HOLD_OFFSET); 254 reg_val |= (((hold - 1) & 0xff) << SPI_CFG0_CS_HOLD_OFFSET); 255 reg_val &= ~(0xff << SPI_CFG0_CS_SETUP_OFFSET); 256 reg_val |= (((setup - 1) & 0xff) 257 << SPI_CFG0_CS_SETUP_OFFSET); 258 } 259 writel(reg_val, mdata->base + SPI_CFG0_REG); 260 261 inactive = min(inactive, 0xff); 262 reg_val = readl(mdata->base + SPI_CFG1_REG); 263 reg_val &= ~SPI_CFG1_CS_IDLE_MASK; 264 reg_val |= (((inactive - 1) & 0xff) << SPI_CFG1_CS_IDLE_OFFSET); 265 writel(reg_val, mdata->base + SPI_CFG1_REG); 266 267 return 0; 268 } 269 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip