diff mbox series

[RFC,1/5] thermal: rename thermal_cooling_device_stats_update()

Message ID 20200408041917.2329-1-rui.zhang@intel.com (mailing list archive)
State Rejected
Delegated to: Zhang Rui
Headers show
Series [RFC,1/5] thermal: rename thermal_cooling_device_stats_update() | expand

Commit Message

Zhang, Rui April 8, 2020, 4:19 a.m. UTC
Rename thermal_cooling_device_stats_update() to
thermal_cdev_stats_update_cur()

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
---
 drivers/thermal/thermal_core.h    | 4 ++--
 drivers/thermal/thermal_helpers.c | 2 +-
 drivers/thermal/thermal_sysfs.c   | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

Comments

Takashi Iwai April 8, 2020, 9:47 a.m. UTC | #1
On Wed, 08 Apr 2020 06:19:13 +0200,
Zhang Rui wrote:
> 
> Rename thermal_cooling_device_stats_update() to
> thermal_cdev_stats_update_cur()
> 
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>

Thanks for the patch set!  I did a quick test and it seems working
fine.  Also through a glance, the patches are good, just a few trivial
issues as posted in another mail.

So, feel free to take my tags for the whole series:
  Tested-by: Takashi Iwai <tiwai@suse.de>
  Reviewed-by: Takashi Iwai <tiwai@suse.de>


Takashi
Zhang, Rui April 9, 2020, 2:59 a.m. UTC | #2
On Wed, 2020-04-08 at 11:47 +0200, Takashi Iwai wrote:
> On Wed, 08 Apr 2020 06:19:13 +0200,
> Zhang Rui wrote:
> > 
> > Rename thermal_cooling_device_stats_update() to
> > thermal_cdev_stats_update_cur()
> > 
> > Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> 
> Thanks for the patch set!  I did a quick test and it seems working
> fine.  Also through a glance, the patches are good, just a few
> trivial
> issues as posted in another mail.
> 
> So, feel free to take my tags for the whole series:
>   Tested-by: Takashi Iwai <tiwai@suse.de>
>   Reviewed-by: Takashi Iwai <tiwai@suse.de>
> 
Thanks for the test and review.

I will refresh the patch set with your comments addressed and also with
the changelog of your patch rephrased.

thanks,
rui
Amit Kucheria May 6, 2020, 12:07 p.m. UTC | #3
On Wed, Apr 8, 2020 at 9:49 AM Zhang Rui <rui.zhang@intel.com> wrote:
>
> Rename thermal_cooling_device_stats_update() to
> thermal_cdev_stats_update_cur()

Missing a reason for this change.

>
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>

> ---
>  drivers/thermal/thermal_core.h    | 4 ++--
>  drivers/thermal/thermal_helpers.c | 2 +-
>  drivers/thermal/thermal_sysfs.c   | 4 ++--
>  3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
> index a9bf00e91d64..722902d5724a 100644
> --- a/drivers/thermal/thermal_core.h
> +++ b/drivers/thermal/thermal_core.h
> @@ -81,11 +81,11 @@ ssize_t weight_store(struct device *, struct device_attribute *, const char *,
>                      size_t);
>
>  #ifdef CONFIG_THERMAL_STATISTICS
> -void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
> +void thermal_cdev_stats_update_cur(struct thermal_cooling_device *cdev,
>                                          unsigned long new_state);
>  #else
>  static inline void
> -thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
> +thermal_cdev_stats_update_cur(struct thermal_cooling_device *cdev,
>                                     unsigned long new_state) {}
>  #endif /* CONFIG_THERMAL_STATISTICS */
>
> diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c
> index 2ba756af76b7..3af895e5dfce 100644
> --- a/drivers/thermal/thermal_helpers.c
> +++ b/drivers/thermal/thermal_helpers.c
> @@ -186,7 +186,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
>         }
>
>         if (!cdev->ops->set_cur_state(cdev, target))
> -               thermal_cooling_device_stats_update(cdev, target);
> +               thermal_cdev_stats_update_cur(cdev, target);
>
>         cdev->updated = true;
>         mutex_unlock(&cdev->lock);
> diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
> index aa99edb4dff7..00caa7787b71 100644
> --- a/drivers/thermal/thermal_sysfs.c
> +++ b/drivers/thermal/thermal_sysfs.c
> @@ -716,7 +716,7 @@ cur_state_store(struct device *dev, struct device_attribute *attr,
>
>         result = cdev->ops->set_cur_state(cdev, state);
>         if (!result)
> -               thermal_cooling_device_stats_update(cdev, state);
> +               thermal_cdev_stats_update_cur(cdev, state);
>
>         mutex_unlock(&cdev->lock);
>         return result ? result : count;
> @@ -765,7 +765,7 @@ static void update_time_in_state(struct cooling_dev_stats *stats)
>         stats->last_time = now;
>  }
>
> -void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
> +void thermal_cdev_stats_update_cur(struct thermal_cooling_device *cdev,
>                                          unsigned long new_state)
>  {
>         struct cooling_dev_stats *stats = cdev->stats;
> --
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index a9bf00e91d64..722902d5724a 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -81,11 +81,11 @@  ssize_t weight_store(struct device *, struct device_attribute *, const char *,
 		     size_t);
 
 #ifdef CONFIG_THERMAL_STATISTICS
-void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
+void thermal_cdev_stats_update_cur(struct thermal_cooling_device *cdev,
 					 unsigned long new_state);
 #else
 static inline void
-thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
+thermal_cdev_stats_update_cur(struct thermal_cooling_device *cdev,
 				    unsigned long new_state) {}
 #endif /* CONFIG_THERMAL_STATISTICS */
 
diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c
index 2ba756af76b7..3af895e5dfce 100644
--- a/drivers/thermal/thermal_helpers.c
+++ b/drivers/thermal/thermal_helpers.c
@@ -186,7 +186,7 @@  void thermal_cdev_update(struct thermal_cooling_device *cdev)
 	}
 
 	if (!cdev->ops->set_cur_state(cdev, target))
-		thermal_cooling_device_stats_update(cdev, target);
+		thermal_cdev_stats_update_cur(cdev, target);
 
 	cdev->updated = true;
 	mutex_unlock(&cdev->lock);
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index aa99edb4dff7..00caa7787b71 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -716,7 +716,7 @@  cur_state_store(struct device *dev, struct device_attribute *attr,
 
 	result = cdev->ops->set_cur_state(cdev, state);
 	if (!result)
-		thermal_cooling_device_stats_update(cdev, state);
+		thermal_cdev_stats_update_cur(cdev, state);
 
 	mutex_unlock(&cdev->lock);
 	return result ? result : count;
@@ -765,7 +765,7 @@  static void update_time_in_state(struct cooling_dev_stats *stats)
 	stats->last_time = now;
 }
 
-void thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
+void thermal_cdev_stats_update_cur(struct thermal_cooling_device *cdev,
 					 unsigned long new_state)
 {
 	struct cooling_dev_stats *stats = cdev->stats;