aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarat Dukhan <marat@fb.com>2017-08-18 00:54:38 -0700
committerMarat Dukhan <marat@fb.com>2017-08-18 00:54:38 -0700
commit1d91a109f8f9ca77aa60cc5ef95e52c71705cb8a (patch)
tree2f45d4d6709f5d251898e214055a8dcc58fb0d1c
parenta45efef3c649e28d47ab682863256c9f219ea8c9 (diff)
downloadcpuinfo-1d91a109f8f9ca77aa60cc5ef95e52c71705cb8a.tar.gz
Remove dead code on Linux
-rw-r--r--src/arm/linux/cpuinfo.c27
-rw-r--r--src/linux/smallfile.c14
2 files changed, 0 insertions, 41 deletions
diff --git a/src/arm/linux/cpuinfo.c b/src/arm/linux/cpuinfo.c
index b098abc..9233b52 100644
--- a/src/arm/linux/cpuinfo.c
+++ b/src/arm/linux/cpuinfo.c
@@ -868,33 +868,6 @@ static bool parse_line(
return true;
}
-// static bool parse_proc_cpuinfo_line(
-// const char* line_start,
-// const char* line_end,
-// struct proc_cpuinfo_parser_state state[restrict static 1],
-// uint64_t line_number)
-// {
-// const uint32_t processor_index = state->processor_index;
-// const uint32_t max_processors_count = state->max_processors_count;
-// struct cpuinfo_arm_linux_processor* processors = state->processors;
-
-// uint32_t new_processor_index;
-// if (parse_line(line_start, line_end, processor_index, &new_processor_index,
-// processor_index < max_processors_count ? &processors[processor_index] : &state->dummy_processor))
-// {
-// if (new_processor_index < max_processors_count) {
-// /* Record that the processor was mentioned in /proc/cpuinfo */
-// processors[new_processor_index].flags |= CPUINFO_ARM_LINUX_VALID_PROCESSOR;
-// } else {
-// /* Log and ignore processor */
-// cpuinfo_log_warning("processor %"PRIu32" in /proc/cpuinfo is ignored: index exceeds system limit %"PRIu32,
-// new_processor_index, max_processors_count - 1);
-// }
-// state->processor_index = new_processor_index;
-// }
-// return true;
-// }
-
bool cpuinfo_arm_linux_parse_proc_cpuinfo(
uint32_t max_processors_count,
struct cpuinfo_arm_linux_processor processors[restrict static max_processors_count])
diff --git a/src/linux/smallfile.c b/src/linux/smallfile.c
index cc92146..207dd91 100644
--- a/src/linux/smallfile.c
+++ b/src/linux/smallfile.c
@@ -16,20 +16,6 @@
#include <log.h>
-inline static const char* parse_number(const char* string, const char* end, uint32_t number_ptr[restrict static 1]) {
- uint32_t number = 0;
- while (string != end) {
- const uint32_t digit = (uint32_t) (*string) - (uint32_t) '0';
- if (digit >= 10) {
- return string;
- }
- number = number * UINT32_C(10) + digit;
- string += 1;
- }
- *number_ptr = number;
- return end;
-}
-
bool cpuinfo_linux_parse_small_file(const char* filename, size_t buffer_size, cpuinfo_smallfile_callback callback, void* context) {
int file = -1;
bool status = false;