linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Sowjanya Komatineni <skomatineni@nvidia.com>,
	thierry.reding@gmail.com, jonathanh@nvidia.com,
	daniel.lezcano@linaro.org, robh+dt@kernel.org
Cc: ksitaraman@nvidia.com, sanjayc@nvidia.com,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v1 4/5] cpuidle: Add Tegra194 cpuidle driver
Date: Fri, 5 Mar 2021 16:50:12 +0300	[thread overview]
Message-ID: <7c21e0cc-d266-87db-b92d-663561924537@gmail.com> (raw)
In-Reply-To: <1614838092-30398-5-git-send-email-skomatineni@nvidia.com>

04.03.2021 09:08, Sowjanya Komatineni пишет:
...
> +static int __init tegra194_cpuidle_probe(struct platform_device *pdev)
> +{
> +	struct cpumask *cpumask;
> +	int cpu, ret;
> +
> +	if (!check_mce_version()) {
> +		pr_err("cpuidle: incompatible MCE version, cannot register driver\n");

Should be dev_err() everywhere.

> +		return -ENODEV;
> +	}
> +
> +	tsc_per_usec = arch_timer_get_cntfrq() / 1000000;
> +
> +	cpumask = devm_kzalloc(&pdev->dev, cpumask_size(), GFP_KERNEL);
> +	for_each_online_cpu(cpu)
> +		cpumask_set_cpu(cpu, cpumask);

cpumask_copy(..)?

> +	t194_cpu_idle_driver.cpumask = cpumask;

Depending on 'online' mask instead of the 'present' mask looks odd. Is
this really intended to be so?

...
> +static int tegra194_cpuidle_remove(struct platform_device *pdev)
> +{
> +	unregister_pm_notifier(&suspend_notifier);
> +	cpuhp_remove_state(hp_state);
> +	cpuidle_unregister(&t194_cpu_idle_driver);
> +	kfree(t194_cpu_idle_driver.cpumask);

kfree() of a managed resource.

  reply	other threads:[~2021-03-05 13:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04  6:08 [PATCH v1 0/5] Add cpuidle support for Tegra194 Sowjanya Komatineni
2021-03-04  6:08 ` [PATCH v1 1/5] MAINTAINERS: Add Tegra CPUIDLE driver section Sowjanya Komatineni
2021-03-04  8:01   ` Daniel Lezcano
2021-03-04  6:08 ` [PATCH v1 2/5] firmware: tegra: Add Tegra194 MCE ARI driver Sowjanya Komatineni
2021-03-04  6:08 ` [PATCH v1 3/5] dt-bindings: arm: Add cpu-idle-states to Tegra194 CPU nodes Sowjanya Komatineni
2021-03-04 20:47   ` Rob Herring
2021-03-08  4:37   ` Sudeep Holla
2021-03-08 18:32     ` Sowjanya Komatineni
2021-03-10 23:19       ` Sowjanya Komatineni
2021-03-11  2:52       ` Sudeep Holla
2021-03-11 21:11         ` Sowjanya Komatineni
2021-03-16  5:38           ` Sudeep Holla
     [not found]           ` <08ac26c1-8257-4c6d-d274-595fee28a00f@nvidia.com>
2021-03-16  6:57             ` Sudeep Holla
     [not found]             ` <4b21f4c7-19cd-fcea-dd1b-9203be60a523@nvidia.com>
2021-03-15 19:26               ` Sowjanya Komatineni
2021-03-16  7:18               ` Sudeep Holla
2021-03-16 11:24                 ` Sowjanya Komatineni
2021-03-04  6:08 ` [PATCH v1 4/5] cpuidle: Add Tegra194 cpuidle driver Sowjanya Komatineni
2021-03-05 13:50   ` Dmitry Osipenko [this message]
2021-03-04  6:08 ` [PATCH v1 5/5] arm64: dts: tegra194: Add CPU idle states Sowjanya Komatineni

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=7c21e0cc-d266-87db-b92d-663561924537@gmail.com \
    --to=digetx@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=ksitaraman@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sanjayc@nvidia.com \
    --cc=skomatineni@nvidia.com \
    --cc=thierry.reding@gmail.com \
    /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).