linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Daniel Baluta <daniel.baluta@oss.nxp.com>,
	khilman@kernel.org, ulf.hansson@linaro.org,
	linux-pm@vger.kernel.org, rjw@rjwysocki.net
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	linux-imx@nxp.com, kernel@pengutronix.de,
	alsa-devel@alsa-project.org
Subject: Re: [RESEND PATCH v2 1/2] PM / domains: Introduce multi PM domains helpers
Date: Tue, 23 Jun 2020 23:00:30 +0800	[thread overview]
Message-ID: <202006232209.IFbEr8i4%lkp@intel.com> (raw)
In-Reply-To: <20200623113301.631-2-daniel.baluta@oss.nxp.com>

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

Hi Daniel,

I love your patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on shawnguo/for-next linux/master linus/master v5.8-rc2 next-20200623]
[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/Daniel-Baluta/Introduce-multi-PM-domains-helpers/20200623-193706
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-s022-20200623 (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=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> drivers/base/power/common.c:260:33: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned long [usertype] size @@     got restricted gfp_t @@
>> drivers/base/power/common.c:260:33: sparse:     expected unsigned long [usertype] size
   drivers/base/power/common.c:260:33: sparse:     got restricted gfp_t
>> drivers/base/power/common.c:260:45: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected restricted gfp_t [usertype] gfp @@     got unsigned long @@
   drivers/base/power/common.c:260:45: sparse:     expected restricted gfp_t [usertype] gfp
>> drivers/base/power/common.c:260:45: sparse:     got unsigned long

vim +260 drivers/base/power/common.c

   231	
   232	/**
   233	 * dev_multi_pm_attach - power up device associated power domains
   234	 * @dev: The device used to lookup the PM domains
   235	 *
   236	 * Parse device's OF node to find all PM domains specifiers. For each power
   237	 * domain found, create a virtual device and associate it with the
   238	 * current power domain.
   239	 *
   240	 * This function should typically be invoked by a driver during the
   241	 * probe phase, in the case its device requires power management through
   242	 * multiple PM domains.
   243	 *
   244	 * Returns a pointer to @dev_multi_pm_domain_data if successfully attached PM
   245	 * domains, NULL when the device doesn't need a PM domain or when single
   246	 * power-domains exists for it, else an ERR_PTR() in case of
   247	 * failures.
   248	 */
   249	struct dev_multi_pm_domain_data *dev_multi_pm_attach(struct device *dev)
   250	{
   251		struct dev_multi_pm_domain_data *mpd, *retp;
   252		int num_domains;
   253		int i;
   254	
   255		num_domains = of_count_phandle_with_args(dev->of_node, "power-domains",
   256							 "#power-domain-cells");
   257		if (num_domains < 2)
   258			return NULL;
   259	
 > 260		mpd = devm_kzalloc(dev, GFP_KERNEL, sizeof(*mpd));
   261		if (!mpd)
   262			return ERR_PTR(-ENOMEM);
   263	
   264		mpd->dev = dev;
   265		mpd->num_domains = num_domains;
   266	
   267		mpd->virt_devs = devm_kmalloc_array(dev, mpd->num_domains,
   268						    sizeof(*mpd->virt_devs),
   269						    GFP_KERNEL);
   270		if (!mpd->virt_devs)
   271			return ERR_PTR(-ENOMEM);
   272	
   273		mpd->links = devm_kmalloc_array(dev, mpd->num_domains,
   274						sizeof(*mpd->links), GFP_KERNEL);
   275		if (!mpd->links)
   276			return ERR_PTR(-ENOMEM);
   277	
   278		for (i = 0; i < mpd->num_domains; i++) {
   279			mpd->virt_devs[i] = dev_pm_domain_attach_by_id(dev, i);
   280			if (IS_ERR(mpd->virt_devs[i])) {
   281				retp = (struct dev_multi_pm_domain_data *)
   282					mpd->virt_devs[i];
   283				goto exit_unroll_pm;
   284			}
   285			mpd->links[i] = device_link_add(dev, mpd->virt_devs[i],
   286							DL_FLAG_STATELESS |
   287							DL_FLAG_PM_RUNTIME |
   288							DL_FLAG_RPM_ACTIVE);
   289			if (!mpd->links[i]) {
   290				retp = ERR_PTR(-ENOMEM);
   291				dev_pm_domain_detach(mpd->virt_devs[i], false);
   292				goto exit_unroll_pm;
   293			}
   294		}
   295		return mpd;
   296	
   297	exit_unroll_pm:
   298		while (--i >= 0) {
   299			device_link_del(mpd->links[i]);
   300			dev_pm_domain_detach(mpd->virt_devs[i], false);
   301		}
   302	
   303		return retp;
   304	}
   305	EXPORT_SYMBOL(dev_multi_pm_attach);
   306	

---
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: 34735 bytes --]

  parent reply	other threads:[~2020-06-23 15:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 11:32 [RESEND PATCH v2 0/2] Introduce multi PM domains helpers Daniel Baluta
2020-06-23 11:33 ` [RESEND PATCH v2 1/2] PM / domains: " Daniel Baluta
2020-06-23 12:30   ` kernel test robot
2020-06-23 12:42   ` kernel test robot
2020-06-23 14:25   ` kernel test robot
2020-06-23 15:00   ` kernel test robot [this message]
2020-06-23 11:33 ` [RESEND PATCH v2 2/2] ASoC: SOF: Use " Daniel Baluta

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=202006232209.IFbEr8i4%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=daniel.baluta@oss.nxp.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel@pengutronix.de \
    --cc=khilman@kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.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).