All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] filesetup: make longest_existing_path() static and const-correct
@ 2025-07-31 12:20 Tomas Winkler
  2025-07-31 12:20 ` [PATCH 2/2] eta: convert skip_eta() to ANSI C declaration Tomas Winkler
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tomas Winkler @ 2025-07-31 12:20 UTC (permalink / raw)
  To: fio, Jens Axboe, Vincent Fu; +Cc: Tomas Winkler

Mark longest_existing_path() as static since it is only used within
filesetup.c. Also, declare the 'path' parameter as const char *
because it is not modified within the function.

Signed-off-by: Tomas Winkler tomas.winkler@sandisk.com
---
 filesetup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/filesetup.c b/filesetup.c
index a94d3b38..bcbd871e 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -1002,7 +1002,8 @@ uint64_t get_start_offset(struct thread_data *td, struct fio_file *f)
 /*
  * Find longest path component that exists and return its length
  */
-int longest_existing_path(char *path) {
+static int longest_existing_path(const char *path)
+{
 	char buf[PATH_MAX];
 	bool done;
 	char *buf_pos;
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-31 17:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31 12:20 [PATCH 1/2] filesetup: make longest_existing_path() static and const-correct Tomas Winkler
2025-07-31 12:20 ` [PATCH 2/2] eta: convert skip_eta() to ANSI C declaration Tomas Winkler
2025-07-31 16:20 ` [PATCH 1/2] filesetup: make longest_existing_path() static and const-correct Vincent Fu
2025-07-31 17:34 ` fiotestbot

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.