Skip to content

Commit

Permalink
legiond: not use extern
Browse files Browse the repository at this point in the history
  • Loading branch information
st0nie committed Apr 26, 2024
1 parent a0c9495 commit 691b0e5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion extra/service/legiond/modules/parseconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static void init_config(LEGIOND_CONFIG *config)
reload = true;
}

extern int parseconf(LEGIOND_CONFIG *config)
int parseconf(LEGIOND_CONFIG *config)
{
init_config(config);
if (ini_parse(config_path, handler, config)) {
Expand Down
2 changes: 1 addition & 1 deletion extra/service/legiond/modules/parseconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ typedef struct _LEGIOND_CONFIG {
const char *gpu_tdp_ac_p;
} LEGIOND_CONFIG;

extern int parseconf(LEGIOND_CONFIG *config);
int parseconf(LEGIOND_CONFIG *config);

#endif // PARSECONF_H_
2 changes: 1 addition & 1 deletion extra/service/legiond/modules/powerstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static POWER_STATE get_ppdstate()
return -1;
}

extern POWER_STATE get_powerstate()
POWER_STATE get_powerstate()
{
static bool use_ppd = false;
static bool reload = false;
Expand Down
2 changes: 1 addition & 1 deletion extra/service/legiond/modules/powerstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ typedef enum _POWER_STATE {
#define ac_path "/sys/class/power_supply/ADP0/online"
#define profile_path "/sys/firmware/acpi/platform_profile"

extern POWER_STATE get_powerstate();
POWER_STATE get_powerstate();

#endif // POWERSTATE_H_
8 changes: 4 additions & 4 deletions extra/service/legiond/modules/setapply.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <stdlib.h>
#include <string.h>

extern int set_cpu(POWER_STATE power_state, LEGIOND_CONFIG *config)
int set_cpu(POWER_STATE power_state, LEGIOND_CONFIG *config)
{
if (config->cpu_control == 0) {
printf("cpu_control is set to false\n");
Expand Down Expand Up @@ -54,7 +54,7 @@ extern int set_cpu(POWER_STATE power_state, LEGIOND_CONFIG *config)
return result;
}

extern int set_fancurve(POWER_STATE power_state, LEGIOND_CONFIG *config)
int set_fancurve(POWER_STATE power_state, LEGIOND_CONFIG *config)
{
if (config->fan_control == 0) {
printf("fan_control is set to false\n");
Expand Down Expand Up @@ -105,7 +105,7 @@ extern int set_fancurve(POWER_STATE power_state, LEGIOND_CONFIG *config)
return result;
}

extern int set_gpu(POWER_STATE power_state, LEGIOND_CONFIG *config)
int set_gpu(POWER_STATE power_state, LEGIOND_CONFIG *config)
{
if (strcmp(config->gpu_control, "false") == 0) {
printf("gpu_control is set to false\n");
Expand Down Expand Up @@ -161,7 +161,7 @@ extern int set_gpu(POWER_STATE power_state, LEGIOND_CONFIG *config)
return result;
}

extern int set_all(POWER_STATE power_state, LEGIOND_CONFIG *config)
int set_all(POWER_STATE power_state, LEGIOND_CONFIG *config)
{
set_fancurve(power_state, config);
set_cpu(power_state, config);
Expand Down
8 changes: 4 additions & 4 deletions extra/service/legiond/modules/setapply.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include "parseconf.h"
#include "powerstate.h"

extern int set_fancurve(POWER_STATE power_state, LEGIOND_CONFIG *config);
extern int set_cpu(POWER_STATE power_state, LEGIOND_CONFIG *config);
extern int set_gpu(POWER_STATE power_state, LEGIOND_CONFIG *config);
extern int set_all(POWER_STATE power_state, LEGIOND_CONFIG *config);
int set_fancurve(POWER_STATE power_state, LEGIOND_CONFIG *config);
int set_cpu(POWER_STATE power_state, LEGIOND_CONFIG *config);
int set_gpu(POWER_STATE power_state, LEGIOND_CONFIG *config);
int set_all(POWER_STATE power_state, LEGIOND_CONFIG *config);

#endif // SETAPPLY_H_

0 comments on commit 691b0e5

Please sign in to comment.