Patchwork [21/26] cpu: maxfreq: remove redundant init and deinit functions

login
register
mail settings
Submitter Colin King
Date Oct. 14, 2012, 8:32 p.m.
Message ID <1350246738-31699-22-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/191411/
State Accepted
Headers show

Comments

Colin King - Oct. 14, 2012, 8:32 p.m.
From: Colin Ian King <colin.king@canonical.com>

We can remove redundant maxfreq_init and maxfreq_deinit
functions - if they are null then we don't need to call
them at start and completion of the test.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/cpu/maxfreq/maxfreq.c |   12 ------------
 1 file changed, 12 deletions(-)
Alex Hung - Oct. 15, 2012, 6:03 a.m.
On 10/15/2012 04:32 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> We can remove redundant maxfreq_init and maxfreq_deinit
> functions - if they are null then we don't need to call
> them at start and completion of the test.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/cpu/maxfreq/maxfreq.c |   12 ------------
>   1 file changed, 12 deletions(-)
>
> diff --git a/src/cpu/maxfreq/maxfreq.c b/src/cpu/maxfreq/maxfreq.c
> index 16a8732..bc70fc9 100644
> --- a/src/cpu/maxfreq/maxfreq.c
> +++ b/src/cpu/maxfreq/maxfreq.c
> @@ -28,16 +28,6 @@
>   #define CPU_FREQ_PATH	"/sys/devices/system/cpu"
>   #define CPU_INFO_PATH	"/proc/cpuinfo"
>
> -static int maxfreq_init(fwts_framework *fw)
> -{
> -	return FWTS_OK;
> -}
> -
> -static int maxfreq_deinit(fwts_framework *fw)
> -{
> -	return FWTS_OK;
> -}
> -
>   typedef struct {
>   	int cpu;
>   	int speed;
> @@ -199,8 +189,6 @@ static fwts_framework_minor_test maxfreq_tests[] = {
>
>   static fwts_framework_ops maxfreq_ops = {
>   	.description = "Check max CPU frequencies against max scaling frequency.",
> -	.init        = maxfreq_init,
> -	.deinit      = maxfreq_deinit,
>   	.minor_tests = maxfreq_tests
>   };
>
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - Oct. 17, 2012, 7:56 a.m.
On Mon, Oct 15, 2012 at 4:32 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> We can remove redundant maxfreq_init and maxfreq_deinit
> functions - if they are null then we don't need to call
> them at start and completion of the test.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/cpu/maxfreq/maxfreq.c |   12 ------------
>  1 file changed, 12 deletions(-)
>
> diff --git a/src/cpu/maxfreq/maxfreq.c b/src/cpu/maxfreq/maxfreq.c
> index 16a8732..bc70fc9 100644
> --- a/src/cpu/maxfreq/maxfreq.c
> +++ b/src/cpu/maxfreq/maxfreq.c
> @@ -28,16 +28,6 @@
>  #define CPU_FREQ_PATH  "/sys/devices/system/cpu"
>  #define CPU_INFO_PATH  "/proc/cpuinfo"
>
> -static int maxfreq_init(fwts_framework *fw)
> -{
> -       return FWTS_OK;
> -}
> -
> -static int maxfreq_deinit(fwts_framework *fw)
> -{
> -       return FWTS_OK;
> -}
> -
>  typedef struct {
>         int cpu;
>         int speed;
> @@ -199,8 +189,6 @@ static fwts_framework_minor_test maxfreq_tests[] = {
>
>  static fwts_framework_ops maxfreq_ops = {
>         .description = "Check max CPU frequencies against max scaling frequency.",
> -       .init        = maxfreq_init,
> -       .deinit      = maxfreq_deinit,
>         .minor_tests = maxfreq_tests
>  };
>
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/cpu/maxfreq/maxfreq.c b/src/cpu/maxfreq/maxfreq.c
index 16a8732..bc70fc9 100644
--- a/src/cpu/maxfreq/maxfreq.c
+++ b/src/cpu/maxfreq/maxfreq.c
@@ -28,16 +28,6 @@ 
 #define CPU_FREQ_PATH	"/sys/devices/system/cpu"
 #define CPU_INFO_PATH	"/proc/cpuinfo"
 
-static int maxfreq_init(fwts_framework *fw)
-{
-	return FWTS_OK;
-}
-
-static int maxfreq_deinit(fwts_framework *fw)
-{
-	return FWTS_OK;
-}
-
 typedef struct {
 	int cpu;
 	int speed;
@@ -199,8 +189,6 @@  static fwts_framework_minor_test maxfreq_tests[] = {
 
 static fwts_framework_ops maxfreq_ops = {
 	.description = "Check max CPU frequencies against max scaling frequency.",
-	.init        = maxfreq_init,
-	.deinit      = maxfreq_deinit,
 	.minor_tests = maxfreq_tests
 };