public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpupower: remove extern declarations in cmd_set()
@ 2026-03-31  4:59 Kaushlendra Kumar
  2026-03-31 23:53 ` Shuah Khan
  0 siblings, 1 reply; 5+ messages in thread
From: Kaushlendra Kumar @ 2026-03-31  4:59 UTC (permalink / raw)
  To: shuah, jwyatt, jkacur; +Cc: linux-pm, Kaushlendra Kumar

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>
---
 tools/power/cpupower/utils/cpupower-set.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/power/cpupower/utils/cpupower-set.c b/tools/power/cpupower/utils/cpupower-set.c
index dcbdff5c9ae5..64d2d4b070b4 100644
--- a/tools/power/cpupower/utils/cpupower-set.c
+++ b/tools/power/cpupower/utils/cpupower-set.c
@@ -51,8 +51,6 @@ static int parse_int_range(const char *arg, int min, int max, int *out)
 
 int cmd_set(int argc, char **argv)
 {
-	extern char *optarg;
-	extern int optind, opterr, optopt;
 	unsigned int cpu;
 	struct utsname uts;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-02 15:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31  4:59 [PATCH] cpupower: remove extern declarations in cmd_set() Kaushlendra Kumar
2026-03-31 23:53 ` Shuah Khan
2026-04-01  2:49   ` Kumar, Kaushlendra
2026-04-01 18:53     ` Shuah Khan
2026-04-02 15:45       ` Kumar, Kaushlendra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox