From: Ian Rogers <irogers@google.com>
To: Ian Rogers <irogers@google.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Jesper Juhl <jesperjuhl76@gmail.com>, Sam James <sam@gentoo.org>,
Namhyung Kim <namhyung@kernel.org>,
linux-kernel@vger.kernel.org, Kan Liang <kan.liang@intel.com>
Subject: [PATCH v1] tools lib api cpu: Remove unused file
Date: Thu, 19 Dec 2024 12:54:45 -0800 [thread overview]
Message-ID: <20241219205445.103071-1-irogers@google.com> (raw)
No use in tools could be found, remove to simplify the code base.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/lib/api/Build | 1 -
tools/lib/api/Makefile | 2 +-
tools/lib/api/cpu.c | 19 -------------------
tools/lib/api/cpu.h | 7 -------
4 files changed, 1 insertion(+), 28 deletions(-)
delete mode 100644 tools/lib/api/cpu.c
delete mode 100644 tools/lib/api/cpu.h
diff --git a/tools/lib/api/Build b/tools/lib/api/Build
index 6e2373db5598..2be979407615 100644
--- a/tools/lib/api/Build
+++ b/tools/lib/api/Build
@@ -1,6 +1,5 @@
libapi-y += fd/
libapi-y += fs/
-libapi-y += cpu.o
libapi-y += debug.o
libapi-y += str_error_r.o
diff --git a/tools/lib/api/Makefile b/tools/lib/api/Makefile
index 7f6396087b46..bc08bccc94cb 100644
--- a/tools/lib/api/Makefile
+++ b/tools/lib/api/Makefile
@@ -95,7 +95,7 @@ install_lib: $(LIBFILE)
$(call do_install_mkdir,$(libdir_SQ)); \
cp -fpR $(LIBFILE) $(DESTDIR)$(libdir_SQ)
-HDRS := cpu.h debug.h io.h
+HDRS := debug.h io.h
FD_HDRS := fd/array.h
FS_HDRS := fs/fs.h fs/tracing_path.h
INSTALL_HDRS_PFX := $(DESTDIR)$(prefix)/include/api
diff --git a/tools/lib/api/cpu.c b/tools/lib/api/cpu.c
deleted file mode 100644
index 4af6d4b7aa07..000000000000
--- a/tools/lib/api/cpu.c
+++ /dev/null
@@ -1,19 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <stdio.h>
-
-#include "cpu.h"
-#include "fs/fs.h"
-
-int cpu__get_max_freq(unsigned long long *freq)
-{
- char entry[PATH_MAX];
- int cpu;
-
- if (sysfs__read_int("devices/system/cpu/online", &cpu) < 0)
- return -1;
-
- snprintf(entry, sizeof(entry),
- "devices/system/cpu/cpu%d/cpufreq/cpuinfo_max_freq", cpu);
-
- return sysfs__read_ull(entry, freq);
-}
diff --git a/tools/lib/api/cpu.h b/tools/lib/api/cpu.h
deleted file mode 100644
index 90a102fb20de..000000000000
--- a/tools/lib/api/cpu.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __API_CPU__
-#define __API_CPU__
-
-int cpu__get_max_freq(unsigned long long *freq);
-
-#endif /* __API_CPU__ */
--
2.47.1.613.gc27f4b7a9f-goog
next reply other threads:[~2024-12-19 20:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 20:54 Ian Rogers [this message]
2025-01-06 22:32 ` Ian Rogers
2025-01-07 14:22 ` Liang, Kan
2025-01-07 16:01 ` Ian Rogers
2025-01-07 19:12 ` Liang, Kan
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=20241219205445.103071-1-irogers@google.com \
--to=irogers@google.com \
--cc=acme@redhat.com \
--cc=jesperjuhl76@gmail.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=sam@gentoo.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®