Hi Andy, I love your patch! Perhaps something to improve: [auto build test WARNING on slave-dma/next] [also build test WARNING on linus/master v5.8-rc2 next-20200622] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/dmaengine-acpi-Drop-double-check-for-ACPI-companion-device/20200622-170946 base: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git next config: i386-randconfig-s002-20200622 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.2-dirty # save the attached .config to linux build tree make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/dma/acpi-dma.c:380:24: sparse: sparse: incorrect type in return expression (different base types) @@ expected struct dma_chan * @@ got int [assigned] ret @@ >> drivers/dma/acpi-dma.c:380:24: sparse: expected struct dma_chan * >> drivers/dma/acpi-dma.c:380:24: sparse: got int [assigned] ret vim +380 drivers/dma/acpi-dma.c 347 348 /** 349 * acpi_dma_request_slave_chan_by_index - Get the DMA slave channel 350 * @dev: struct device to get DMA request from 351 * @index: index of FixedDMA descriptor for @dev 352 * 353 * Return: 354 * Pointer to appropriate dma channel on success or an error pointer. 355 */ 356 struct dma_chan *acpi_dma_request_slave_chan_by_index(struct device *dev, 357 size_t index) 358 { 359 struct acpi_dma_parser_data pdata; 360 struct acpi_dma_spec *dma_spec = &pdata.dma_spec; 361 struct acpi_device *adev = ACPI_COMPANION(dev); 362 struct list_head resource_list; 363 struct acpi_dma *adma; 364 struct dma_chan *chan = NULL; 365 int found; 366 int ret; 367 368 memset(&pdata, 0, sizeof(pdata)); 369 pdata.index = index; 370 371 /* Initial values for the request line and channel */ 372 dma_spec->chan_id = -1; 373 dma_spec->slave_id = -1; 374 375 INIT_LIST_HEAD(&resource_list); 376 ret = acpi_dev_get_resources(adev, &resource_list, 377 acpi_dma_parse_fixed_dma, &pdata); 378 acpi_dev_free_resource_list(&resource_list); 379 if (ret < 0) > 380 return ret; 381 382 if (dma_spec->slave_id < 0 || dma_spec->chan_id < 0) 383 return ERR_PTR(-ENODEV); 384 385 mutex_lock(&acpi_dma_lock); 386 387 list_for_each_entry(adma, &acpi_dma_list, dma_controllers) { 388 /* 389 * We are not going to call translation function if slave_id 390 * doesn't fall to the request range. 391 */ 392 found = acpi_dma_update_dma_spec(adma, dma_spec); 393 if (found < 0) 394 continue; 395 chan = adma->acpi_dma_xlate(dma_spec, adma); 396 /* 397 * Try to get a channel only from the DMA controller that 398 * matches the slave_id. See acpi_dma_update_dma_spec() 399 * description for the details. 400 */ 401 if (found > 0 || chan) 402 break; 403 } 404 405 mutex_unlock(&acpi_dma_lock); 406 return chan ? chan : ERR_PTR(-EPROBE_DEFER); 407 } 408 EXPORT_SYMBOL_GPL(acpi_dma_request_slave_chan_by_index); 409 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org