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

* [PATCH 2/2] eta: convert skip_eta() to ANSI C declaration
  2025-07-31 12:20 [PATCH 1/2] filesetup: make longest_existing_path() static and const-correct Tomas Winkler
@ 2025-07-31 12:20 ` 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
  2 siblings, 0 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

Update skip_eta() to use an ANSI C function declaration
by explicitly specifying the void parameter list.

Signed-off-by: Tomas Winkler <tomas.winkler@sandisk.com>
---
 eta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eta.c b/eta.c
index 7d07708f..16109510 100644
--- a/eta.c
+++ b/eta.c
@@ -381,7 +381,7 @@ bool eta_time_within_slack(unsigned int time)
  * These are the conditions under which we might be able to skip the eta
  * calculation.
  */
-static bool skip_eta()
+static bool skip_eta(void)
 {
 	if (!(output_format & FIO_OUTPUT_NORMAL) && f_out == stdout)
 		return true;
-- 
2.45.2


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

* Re: [PATCH 1/2] filesetup: make longest_existing_path() static and const-correct
  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 ` Vincent Fu
  2025-07-31 17:34 ` fiotestbot
  2 siblings, 0 replies; 4+ messages in thread
From: Vincent Fu @ 2025-07-31 16:20 UTC (permalink / raw)
  To: Tomas Winkler, fio, Jens Axboe

On 7/31/25 8:20 AM, Tomas Winkler wrote:
> 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;

Applied. Thanks. Next time when you post more than one patch please 
include a cover letter.

Vincent

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

* Re: [PATCH 1/2] filesetup: make longest_existing_path() static and const-correct
  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
  2 siblings, 0 replies; 4+ messages in thread
From: fiotestbot @ 2025-07-31 17:34 UTC (permalink / raw)
  To: fio

[-- Attachment #1: Type: text/plain, Size: 144 bytes --]


The result of fio's continuous integration tests was: success

For more details see https://github.com/fiotestbot/fio/actions/runs/16652224455

^ permalink raw reply	[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.