From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 1/2] PM / domains: Introduce multi PM domains helpers
Date: Tue, 03 Mar 2020 14:08:02 +0800 [thread overview]
Message-ID: <202003031350.SFfgSjdg%lkp@intel.com> (raw)
In-Reply-To: <20200302205700.29746-2-daniel.baluta@oss.nxp.com>
[-- Attachment #1: Type: text/plain, Size: 4372 bytes --]
Hi Daniel,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on pm/linux-next]
[also build test WARNING on shawnguo/for-next pavel-linux-leds/for-next v5.6-rc4 next-20200302]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Daniel-Baluta/Introduce-multi-PM-domains-helpers/20200303-050542
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-174-g094d5a94-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/base/power/common.c:259:33: sparse: sparse: incorrect type in argument 2 (different base types)
>> drivers/base/power/common.c:259:33: sparse: expected unsigned int [usertype] size
>> drivers/base/power/common.c:259:33: sparse: got restricted gfp_t
drivers/base/power/common.c:259:45: sparse: sparse: incorrect type in argument 3 (different base types)
>> drivers/base/power/common.c:259:45: sparse: expected restricted gfp_t [usertype] gfp
>> drivers/base/power/common.c:259:45: sparse: got unsigned int
vim +259 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 if 0 or 1 PM domains specified, else an ERR_PTR() in case of
246 * failures.
247 */
248 struct dev_multi_pm_domain_data *dev_multi_pm_attach(struct device *dev)
249 {
250 struct dev_multi_pm_domain_data *mpd, *retp;
251 int num_domains;
252 int i;
253
254 num_domains = of_count_phandle_with_args(dev->of_node, "power-domains",
255 "#power-domain-cells");
256 if (num_domains < 2)
257 return NULL;
258
> 259 mpd = devm_kzalloc(dev, GFP_KERNEL, sizeof(*mpd));
260 if (!mpd)
261 return ERR_PTR(-ENOMEM);
262
263 mpd->dev = dev;
264 mpd->num_domains = num_domains;
265
266 mpd->virt_devs = devm_kmalloc_array(dev, mpd->num_domains,
267 sizeof(*mpd->virt_devs),
268 GFP_KERNEL);
269 if (!mpd->virt_devs)
270 return ERR_PTR(-ENOMEM);
271
272 mpd->links = devm_kmalloc_array(dev, mpd->num_domains,
273 sizeof(*mpd->links), GFP_KERNEL);
274 if (!mpd->links)
275 return ERR_PTR(-ENOMEM);
276
277 for (i = 0; i < mpd->num_domains; i++) {
278 mpd->virt_devs[i] = dev_pm_domain_attach_by_id(dev, i);
279 if (IS_ERR(mpd->virt_devs[i])) {
280 retp = (struct dev_multi_pm_domain_data *)
281 mpd->virt_devs[i];
282 goto exit_unroll_pm;
283 }
284 mpd->links[i] = device_link_add(dev, mpd->virt_devs[i],
285 DL_FLAG_STATELESS |
286 DL_FLAG_PM_RUNTIME |
287 DL_FLAG_RPM_ACTIVE);
288 if (!mpd->links[i]) {
289 retp = ERR_PTR(-ENOMEM);
290 dev_pm_domain_detach(mpd->virt_devs[i], false);
291 goto exit_unroll_pm;
292 }
293 }
294 return mpd;
295
296 exit_unroll_pm:
297 while (--i >= 0) {
298 device_link_del(mpd->links[i]);
299 dev_pm_domain_detach(mpd->virt_devs[i], false);
300 }
301
302 return retp;
303 }
304 EXPORT_SYMBOL(dev_multi_pm_attach);
305
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next prev parent reply other threads:[~2020-03-03 6:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 20:56 [RFC PATCH 0/2] Introduce multi PM domains helpers Daniel Baluta
2020-03-02 20:56 ` Daniel Baluta
2020-03-02 20:56 ` Daniel Baluta
2020-03-02 20:56 ` [RFC PATCH 1/2] PM / domains: " Daniel Baluta
2020-03-02 20:56 ` Daniel Baluta
2020-03-02 20:56 ` Daniel Baluta
2020-03-02 21:23 ` Sridharan, Ranjani
2020-03-03 13:29 ` Daniel Baluta
2020-03-03 13:29 ` Daniel Baluta
2020-03-03 13:29 ` Daniel Baluta
2020-03-03 5:36 ` kbuild test robot
2020-03-03 6:08 ` kbuild test robot [this message]
2020-03-03 8:14 ` kbuild test robot
2020-03-02 20:57 ` [RFC PATCH 2/2] ASoC: SOF: Use " Daniel Baluta
2020-03-02 20:57 ` Daniel Baluta
2020-03-02 20:57 ` Daniel Baluta
2020-03-02 21:26 ` Sridharan, Ranjani
2020-03-03 13:17 ` Daniel Baluta
2020-03-03 13:17 ` Daniel Baluta
2020-03-03 13:17 ` 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=202003031350.SFfgSjdg%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.