dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Vinod Koul <vkoul@kernel.org>,
	dmaengine@vger.kernel.org
Cc: kbuild-all@lists.01.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v1] dmaengine: acpi: Drop double check for ACPI companion device
Date: Mon, 22 Jun 2020 21:54:15 +0800	[thread overview]
Message-ID: <202006222123.t5rVCvWQ%lkp@intel.com> (raw)
In-Reply-To: <20200622090807.28533-1-andriy.shevchenko@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 3482 bytes --]

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-a006-20200622 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/dma/acpi-dma.c: In function 'acpi_dma_request_slave_chan_by_index':
>> drivers/dma/acpi-dma.c:380:10: warning: return makes pointer from integer without a cast [-Wint-conversion]
return 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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33330 bytes --]

  parent reply	other threads:[~2020-06-22 13:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22  9:08 [PATCH v1] dmaengine: acpi: Drop double check for ACPI companion device Andy Shevchenko
2020-06-22 13:21 ` kernel test robot
2020-06-22 13:30 ` kernel test robot
2020-06-22 13:54 ` kernel test robot [this message]
2020-06-22 16:23 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202006222123.t5rVCvWQ%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).