From fb8eaeb7ab96b09c910e36abf7df7f9ecbb0fb60 Mon Sep 17 00:00:00 2001
From: Palmer Cox
Date: Tue, 27 Nov 2012 13:17:44 +0100
Subject: cpupower tools: Fix minor warnings
Fix minor warnings reported with GCC 4.6:
* The sysfs_write_file function is unused - remove it.
* The pr_mon_len in the print_header function is unsed - remove it.
Signed-off-by: Palmer Cox
Signed-off-by: Thomas Renninger
Signed-off-by: Rafael J. Wysocki
---
tools/power/cpupower/utils/helpers/sysfs.c | 19 -------------------
1 file changed, 19 deletions(-)
(limited to 'tools/power/cpupower/utils/helpers/sysfs.c')
diff --git a/tools/power/cpupower/utils/helpers/sysfs.c b/tools/power/cpupower/utils/helpers/sysfs.c
index 96e28c124b5c..38ab91629463 100644
--- a/tools/power/cpupower/utils/helpers/sysfs.c
+++ b/tools/power/cpupower/utils/helpers/sysfs.c
@@ -37,25 +37,6 @@ unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen)
return (unsigned int) numread;
}
-static unsigned int sysfs_write_file(const char *path,
- const char *value, size_t len)
-{
- int fd;
- ssize_t numwrite;
-
- fd = open(path, O_WRONLY);
- if (fd == -1)
- return 0;
-
- numwrite = write(fd, value, len);
- if (numwrite < 1) {
- close(fd);
- return 0;
- }
- close(fd);
- return (unsigned int) numwrite;
-}
-
/*
* Detect whether a CPU is online
*
--
cgit v1.2.3