All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/cpuidle/cpuidle-psci-domain.c:282 psci_cpuidle_domain_probe() warn: missing error code 'ret'
Date: Sun, 11 Apr 2021 05:12:14 +0800	[thread overview]
Message-ID: <202104110511.8ICs57a4-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Ulf Hansson <ulf.hansson@linaro.org>
CC: "Rafael J. Wysocki" <rjw@rjwysocki.net>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   95c7b07551879c8ad4d6dca10c02de46ddbf55a8
commit: 70c179b49870929ca183421935415622d30875b5 cpuidle: psci: Allow PM domain to be initialized even if no OSI mode
date:   7 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 7 months ago
config: arm64-randconfig-m031-20210411 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0

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

smatch warnings:
drivers/cpuidle/cpuidle-psci-domain.c:282 psci_cpuidle_domain_probe() warn: missing error code 'ret'

vim +/ret +282 drivers/cpuidle/cpuidle-psci-domain.c

a65a397f245137 Ulf Hansson 2019-10-10  251  
ee7c34caac3892 Ulf Hansson 2020-07-07  252  static int psci_cpuidle_domain_probe(struct platform_device *pdev)
a65a397f245137 Ulf Hansson 2019-10-10  253  {
ee7c34caac3892 Ulf Hansson 2020-07-07  254  	struct device_node *np = pdev->dev.of_node;
a65a397f245137 Ulf Hansson 2019-10-10  255  	struct device_node *node;
70c179b4987092 Ulf Hansson 2020-09-01  256  	bool use_osi;
a65a397f245137 Ulf Hansson 2019-10-10  257  	int ret = 0, pd_count = 0;
a65a397f245137 Ulf Hansson 2019-10-10  258  
a65a397f245137 Ulf Hansson 2019-10-10  259  	if (!np)
a65a397f245137 Ulf Hansson 2019-10-10  260  		return -ENODEV;
a65a397f245137 Ulf Hansson 2019-10-10  261  
70c179b4987092 Ulf Hansson 2020-09-01  262  	/* If OSI mode is supported, let's try to enable it. */
70c179b4987092 Ulf Hansson 2020-09-01  263  	use_osi = psci_pd_try_set_osi_mode();
a65a397f245137 Ulf Hansson 2019-10-10  264  
a65a397f245137 Ulf Hansson 2019-10-10  265  	/*
a65a397f245137 Ulf Hansson 2019-10-10  266  	 * Parse child nodes for the "#power-domain-cells" property and
a65a397f245137 Ulf Hansson 2019-10-10  267  	 * initialize a genpd/genpd-of-provider pair when it's found.
a65a397f245137 Ulf Hansson 2019-10-10  268  	 */
a65a397f245137 Ulf Hansson 2019-10-10  269  	for_each_child_of_node(np, node) {
a65a397f245137 Ulf Hansson 2019-10-10  270  		if (!of_find_property(node, "#power-domain-cells", NULL))
a65a397f245137 Ulf Hansson 2019-10-10  271  			continue;
a65a397f245137 Ulf Hansson 2019-10-10  272  
70c179b4987092 Ulf Hansson 2020-09-01  273  		ret = psci_pd_init(node, use_osi);
a65a397f245137 Ulf Hansson 2019-10-10  274  		if (ret)
a65a397f245137 Ulf Hansson 2019-10-10  275  			goto put_node;
a65a397f245137 Ulf Hansson 2019-10-10  276  
a65a397f245137 Ulf Hansson 2019-10-10  277  		pd_count++;
a65a397f245137 Ulf Hansson 2019-10-10  278  	}
a65a397f245137 Ulf Hansson 2019-10-10  279  
a65a397f245137 Ulf Hansson 2019-10-10  280  	/* Bail out if not using the hierarchical CPU topology. */
a65a397f245137 Ulf Hansson 2019-10-10  281  	if (!pd_count)
70c179b4987092 Ulf Hansson 2020-09-01 @282  		goto no_pd;
a65a397f245137 Ulf Hansson 2019-10-10  283  
a65a397f245137 Ulf Hansson 2019-10-10  284  	/* Link genpd masters/subdomains to model the CPU topology. */
70c179b4987092 Ulf Hansson 2020-09-01  285  	ret = psci_pd_init_topology(np);
a65a397f245137 Ulf Hansson 2019-10-10  286  	if (ret)
a65a397f245137 Ulf Hansson 2019-10-10  287  		goto remove_pd;
a65a397f245137 Ulf Hansson 2019-10-10  288  
a65a397f245137 Ulf Hansson 2019-10-10  289  	pr_info("Initialized CPU PM domain topology\n");
ee7c34caac3892 Ulf Hansson 2020-07-07  290  	return 0;
a65a397f245137 Ulf Hansson 2019-10-10  291  
a65a397f245137 Ulf Hansson 2019-10-10  292  put_node:
a65a397f245137 Ulf Hansson 2019-10-10  293  	of_node_put(node);
a65a397f245137 Ulf Hansson 2019-10-10  294  remove_pd:
a65a397f245137 Ulf Hansson 2019-10-10  295  	psci_pd_remove();
a65a397f245137 Ulf Hansson 2019-10-10  296  	pr_err("failed to create CPU PM domains ret=%d\n", ret);
70c179b4987092 Ulf Hansson 2020-09-01  297  no_pd:
70c179b4987092 Ulf Hansson 2020-09-01  298  	if (use_osi)
70c179b4987092 Ulf Hansson 2020-09-01  299  		psci_set_osi_mode(false);
a65a397f245137 Ulf Hansson 2019-10-10  300  	return ret;
a65a397f245137 Ulf Hansson 2019-10-10  301  }
ee7c34caac3892 Ulf Hansson 2020-07-07  302  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

             reply	other threads:[~2021-04-10 21:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-10 21:12 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-25 18:00 drivers/cpuidle/cpuidle-psci-domain.c:282 psci_cpuidle_domain_probe() warn: missing error code 'ret' kernel test robot
2021-02-21 16:13 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=202104110511.8ICs57a4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@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.