mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
cpupower: remove extern declarations in cmd functions
extern char *optarg and extern int optind, opterr, optopt are already declared by <getopt.h>, which is included at the top of the file. Repeating extern declarations inside a function body is misleading and unnecessary. Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
8bbd81ddbe
commit
2fd3b83cac
|
|
@ -542,8 +542,6 @@ static struct option info_opts[] = {
|
|||
|
||||
int cmd_freq_info(int argc, char **argv)
|
||||
{
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
int ret = 0, cont = 1;
|
||||
unsigned int cpu = 0;
|
||||
unsigned int human = 0;
|
||||
|
|
|
|||
|
|
@ -195,8 +195,6 @@ static int do_one_cpu(unsigned int cpu, struct cpufreq_policy *new_pol,
|
|||
|
||||
int cmd_freq_set(int argc, char **argv)
|
||||
{
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
int ret = 0, cont = 1;
|
||||
int double_parm = 0, related = 0, policychange = 0;
|
||||
unsigned long freq = 0;
|
||||
|
|
|
|||
|
|
@ -139,8 +139,6 @@ static inline void cpuidle_exit(int fail)
|
|||
|
||||
int cmd_idle_info(int argc, char **argv)
|
||||
{
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
int ret = 0, cont = 1, output_param = 0, verbose = 1;
|
||||
unsigned int cpu = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@ static struct option info_opts[] = {
|
|||
|
||||
int cmd_idle_set(int argc, char **argv)
|
||||
{
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
int ret = 0, cont = 1, param = 0, disabled;
|
||||
unsigned long long latency = 0, state_latency;
|
||||
unsigned int cpu = 0, idlestate = 0, idlestates = 0;
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ static void print_wrong_arg_exit(void)
|
|||
|
||||
int cmd_info(int argc, char **argv)
|
||||
{
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
unsigned int cpu;
|
||||
struct utsname uts;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@ static void print_wrong_arg_exit(void)
|
|||
|
||||
int cmd_set(int argc, char **argv)
|
||||
{
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
unsigned int cpu;
|
||||
struct utsname uts;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user