All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@treblig.org
To: irogers@google.com, peterz@infradead.org, mingo@redhat.com,
	acme@kernel.org, namhyung@kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	adrian.hunter@intel.com, kan.liang@linux.intel.com
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH] perf tools: Remove unused is_executable_file
Date: Sun, 22 Dec 2024 21:58:31 +0000	[thread overview]
Message-ID: <20241222215831.283248-1-linux@treblig.org> (raw)

From: "Dr. David Alan Gilbert" <linux@treblig.org>

is_executable_file()  has been unused since 2022's
commit 7391db645938 ("perf test: Refactor shell tests allowing subdirs")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 tools/perf/util/path.c | 12 ------------
 tools/perf/util/path.h |  1 -
 2 files changed, 13 deletions(-)

diff --git a/tools/perf/util/path.c b/tools/perf/util/path.c
index 00adf872bf00..e923e2d9e8ad 100644
--- a/tools/perf/util/path.c
+++ b/tools/perf/util/path.c
@@ -67,15 +67,3 @@ bool is_directory(const char *base_path, const struct dirent *dent)
 
 	return S_ISDIR(st.st_mode);
 }
-
-bool is_executable_file(const char *base_path, const struct dirent *dent)
-{
-	char path[PATH_MAX];
-	struct stat st;
-
-	snprintf(path, sizeof(path), "%s/%s", base_path, dent->d_name);
-	if (stat(path, &st))
-		return false;
-
-	return !S_ISDIR(st.st_mode) && (st.st_mode & S_IXUSR);
-}
diff --git a/tools/perf/util/path.h b/tools/perf/util/path.h
index d94902c22222..083429b7efa3 100644
--- a/tools/perf/util/path.h
+++ b/tools/perf/util/path.h
@@ -12,6 +12,5 @@ int path__join3(char *bf, size_t size, const char *path1, const char *path2, con
 
 bool is_regular_file(const char *file);
 bool is_directory(const char *base_path, const struct dirent *dent);
-bool is_executable_file(const char *base_path, const struct dirent *dent);
 
 #endif /* _PERF_PATH_H */
-- 
2.47.1


             reply	other threads:[~2024-12-22 21:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-22 21:58 linux [this message]
2024-12-23 16:32 ` [PATCH] perf tools: Remove unused is_executable_file Arnaldo Carvalho de Melo
2024-12-23 16:33   ` Arnaldo Carvalho de Melo
2024-12-23 16:37     ` Arnaldo Carvalho de Melo
2024-12-23 16:41     ` Dr. David Alan Gilbert
2024-12-23 16:36   ` Dr. David Alan Gilbert

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=20241222215831.283248-1-linux@treblig.org \
    --to=linux@treblig.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.