diff mbox

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

Message ID 1350246738-31699-22-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Oct. 14, 2012, 8:32 p.m. UTC
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(-)

Comments

Alex Hung Oct. 15, 2012, 6:03 a.m. UTC | #1
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. UTC | #2
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>
diff mbox

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
 };