From: Dan Carpenter <dan.carpenter@oracle.com>
To: Len Brown <len.brown@intel.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] tools/power x86_energy_perf_policy: remove unneeded check
Date: Wed, 28 Jun 2017 14:45:00 +0300 [thread overview]
Message-ID: <20170628114500.bw2yhctvm6feo3hp@mwanda> (raw)
"i" is an int so this test is only ever possible with 32 bit systems.
The error message is not very useful and there are better tests directly
afterward so this test isn't needed. Let's just delete these lines.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
index 65bbe627a425..de4a888f1a3e 100644
--- a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
+++ b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
@@ -332,8 +332,6 @@ int parse_optarg_string(char *s)
fprintf(stderr, "no digits in \"%s\"\n", s);
usage();
}
- if (i == LONG_MIN || i == LONG_MAX)
- errx(-1, "%s", s);
if (i > 0xFF)
errx(-1, "%d (0x%x) must be < 256", i, i);
next reply other threads:[~2017-06-28 11:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 11:45 Dan Carpenter [this message]
2019-08-15 8:27 Dan Carpenter
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=20170628114500.bw2yhctvm6feo3hp@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®