From: Shuah Khan <skhan@linuxfoundation.org>
To: Kaushlendra Kumar <kaushlendra.kumar@intel.com>,
shuah@kernel.org, jwyatt@redhat.com, jkacur@redhat.com
Cc: linux-pm@vger.kernel.org, Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] cpupower: remove extern declarations in cmd_set()
Date: Tue, 31 Mar 2026 17:53:56 -0600 [thread overview]
Message-ID: <3c2101df-c3a8-4761-80d1-ca7b7c6aaac6@linuxfoundation.org> (raw)
In-Reply-To: <20260331045906.1935188-1-kaushlendra.kumar@intel.com>
On 3/30/26 22:59, Kaushlendra Kumar wrote:
> 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.
Okay - are there errors from compilers or static checkers? How
did you find the problem?
>
> 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;
>
thanks,
-- Shuah
next prev parent reply other threads:[~2026-03-31 23:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 4:59 [PATCH] cpupower: remove extern declarations in cmd_set() Kaushlendra Kumar
2026-03-31 23:53 ` Shuah Khan [this message]
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=3c2101df-c3a8-4761-80d1-ca7b7c6aaac6@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=jkacur@redhat.com \
--cc=jwyatt@redhat.com \
--cc=kaushlendra.kumar@intel.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