public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation: EM: Fix typos in example driver code
@ 2025-05-11  7:11 Atul Kumar Pant
  2025-05-22  8:01 ` Lukasz Luba
  0 siblings, 1 reply; 2+ messages in thread
From: Atul Kumar Pant @ 2025-05-11  7:11 UTC (permalink / raw)
  To: lukasz.luba, rafael, len.brown, pavel
  Cc: Atul Kumar Pant, linux-pm, linux-kernel

Fix the API name to free the allocated table in the example driver code
that modifies the EM. Also fix the passing of correct table when
updating the cost.

Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com>
---
 Documentation/power/energy-model.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/power/energy-model.rst b/Documentation/power/energy-model.rst
index ada4938c3..29388f6d1 100644
--- a/Documentation/power/energy-model.rst
+++ b/Documentation/power/energy-model.rst
@@ -381,17 +381,17 @@ up periodically to check the temperature and modify the EM data::
   26		rcu_read_unlock();
   27
   28		/* Calculate 'cost' values for EAS */
-  29		ret = em_dev_compute_costs(dev, table, pd->nr_perf_states);
+  29		ret = em_dev_compute_costs(dev, new_table, pd->nr_perf_states);
   30		if (ret) {
   31			dev_warn(dev, "EM: compute costs failed %d\n", ret);
-  32			em_free_table(em_table);
+  32			em_table_free(em_table);
   33			return;
   34		}
   35
   36		ret = em_dev_update_perf_domain(dev, em_table);
   37		if (ret) {
   38			dev_warn(dev, "EM: update failed %d\n", ret);
-  39			em_free_table(em_table);
+  39			em_table_free(em_table);
   40			return;
   41		}
   42
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Documentation: EM: Fix typos in example driver code
  2025-05-11  7:11 [PATCH] Documentation: EM: Fix typos in example driver code Atul Kumar Pant
@ 2025-05-22  8:01 ` Lukasz Luba
  0 siblings, 0 replies; 2+ messages in thread
From: Lukasz Luba @ 2025-05-22  8:01 UTC (permalink / raw)
  To: Atul Kumar Pant; +Cc: linux-pm, linux-kernel, rafael, len.brown, pavel



On 5/11/25 08:11, Atul Kumar Pant wrote:
> Fix the API name to free the allocated table in the example driver code
> that modifies the EM. Also fix the passing of correct table when
> updating the cost.
> 
> Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com>
> ---
>   Documentation/power/energy-model.rst | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/power/energy-model.rst b/Documentation/power/energy-model.rst
> index ada4938c3..29388f6d1 100644
> --- a/Documentation/power/energy-model.rst
> +++ b/Documentation/power/energy-model.rst
> @@ -381,17 +381,17 @@ up periodically to check the temperature and modify the EM data::
>     26		rcu_read_unlock();
>     27
>     28		/* Calculate 'cost' values for EAS */
> -  29		ret = em_dev_compute_costs(dev, table, pd->nr_perf_states);
> +  29		ret = em_dev_compute_costs(dev, new_table, pd->nr_perf_states);
>     30		if (ret) {
>     31			dev_warn(dev, "EM: compute costs failed %d\n", ret);
> -  32			em_free_table(em_table);
> +  32			em_table_free(em_table);
>     33			return;
>     34		}
>     35
>     36		ret = em_dev_update_perf_domain(dev, em_table);
>     37		if (ret) {
>     38			dev_warn(dev, "EM: update failed %d\n", ret);
> -  39			em_free_table(em_table);
> +  39			em_table_free(em_table);
>     40			return;
>     41		}
>     42

Thanks for having a look at this, LGTM.

Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-22  8:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-11  7:11 [PATCH] Documentation: EM: Fix typos in example driver code Atul Kumar Pant
2025-05-22  8:01 ` Lukasz Luba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox