Commit 2fd3b83c authored by Kaushlendra Kumar's avatar Kaushlendra Kumar Committed by Shuah Khan
Browse files

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: default avatarKaushlendra Kumar <kaushlendra.kumar@intel.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 8bbd81dd
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;
+0 −2
Original line number Diff line number Diff line
@@ -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;
+0 −2
Original line number Diff line number Diff line
@@ -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;

+0 −2
Original line number Diff line number Diff line
@@ -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;
+0 −2
Original line number Diff line number Diff line
@@ -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;

Loading