[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170628114500.bw2yhctvm6feo3hp@mwanda>
Date: Wed, 28 Jun 2017 14:45:00 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Len Brown <len.brown@...el.com>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] tools/power x86_energy_perf_policy: remove unneeded check
"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@...cle.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);
Powered by blists - more mailing lists