From: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
To: shuah@kernel.org, jwyatt@redhat.com, jkacur@redhat.com
Cc: linux-pm@vger.kernel.org,
Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Subject: [PATCH] cpupower: remove extern declarations in cmd_set()
Date: Tue, 31 Mar 2026 10:29:06 +0530 [thread overview]
Message-ID: <20260331045906.1935188-1-kaushlendra.kumar@intel.com> (raw)
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
next reply other threads:[~2026-03-31 5:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 4:59 Kaushlendra Kumar [this message]
2026-03-31 23:53 ` [PATCH] cpupower: remove extern declarations in cmd_set() Shuah Khan
2026-04-01 2:49 ` Kumar, Kaushlendra
2026-04-01 18:53 ` Shuah Khan
2026-04-02 15:45 ` Kumar, Kaushlendra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260331045906.1935188-1-kaushlendra.kumar@intel.com \
--to=kaushlendra.kumar@intel.com \
--cc=jkacur@redhat.com \
--cc=jwyatt@redhat.com \
--cc=linux-pm@vger.kernel.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox