[PATCH 3/3] engines: make engines static-correct
Tomas Winkler <[email protected]> Wed, 20 Aug 2025 16:03:21 +0300
| Newsgroups | org.kernel.vger.fio |
|---|---|
| Message-ID | <[email protected]> |
Mark internal function static. Signed-off-by: Tomas Winkler <[email protected]> --- engines/cpu.c | 4 ++-- engines/exec.c | 6 +++--- engines/nvme.c | 4 ++-- engines/sg.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/engines/cpu.c b/engines/cpu.c index ce74dbce..898fc00e 100644 --- a/engines/cpu.c +++ b/engines/cpu.c @@ -9,7 +9,7 @@ #include "../optgroup.h" // number of 32 bit integers to sort -size_t qsort_size = (256 * (1ULL << 10)); // 256KB +static size_t qsort_size = (256 * (1ULL << 10)); // 256KB struct mwc { uint32_t w; @@ -93,7 +93,7 @@ static struct fio_option options[] = { * fast pseudo random number generator, see * http://www.cse.yorku.ca/~oz/marsaglia-rng.html */ -uint32_t mwc32(struct mwc *mwc) +static uint32_t mwc32(struct mwc *mwc) { mwc->z = 36969 * (mwc->z & 65535) + (mwc->z >> 16); mwc->w = 18000 * (mwc->w & 65535) + (mwc->w >> 16); diff --git a/engines/exec.c b/engines/exec.c index 20e50e00..af20d5e1 100644 --- a/engines/exec.c +++ b/engines/exec.c @@ -62,7 +62,7 @@ static struct fio_option options[] = { }, }; -char *str_replace(char *orig, const char *rep, const char *with) +static char *str_replace(char *orig, const char *rep, const char *with) { /* * Replace a substring by another. @@ -106,7 +106,7 @@ char *str_replace(char *orig, const char *rep, const char *with) return result; } -char *expand_variables(struct thread_options *o, char *arguments) +static char *expand_variables(const struct thread_options *o, char *arguments) { char str[16]; char *expanded_runtime, *expanded_name; @@ -122,7 +122,7 @@ char *expand_variables(struct thread_options *o, char *arguments) return expanded_name; } -static int exec_background(struct thread_options *o, struct exec_options *eo) +static int exec_background(const struct thread_options *o, struct exec_options *eo) { char *outfilename = NULL, *errfilename = NULL; int outfd = 0, errfd = 0; diff --git a/engines/nvme.c b/engines/nvme.c index 4b3d3860..528b2a29 100644 --- a/engines/nvme.c +++ b/engines/nvme.c @@ -312,8 +312,8 @@ next: return 0; } -void fio_nvme_uring_cmd_trim_prep(struct nvme_uring_cmd *cmd, struct io_u *io_u, - struct nvme_dsm *dsm) +static void fio_nvme_uring_cmd_trim_prep(struct nvme_uring_cmd *cmd, struct io_u *io_u, + struct nvme_dsm *dsm) { struct nvme_data *data = FILE_ENG_DATA(io_u->file); struct trim_range *range; diff --git a/engines/sg.c b/engines/sg.c index 9df70bd2..7912e9c8 100644 --- a/engines/sg.c +++ b/engines/sg.c @@ -1136,7 +1136,7 @@ static int fio_sgio_open(struct thread_data *td, struct fio_file *f) return 0; } -int fio_sgio_close(struct thread_data *td, struct fio_file *f) +static int fio_sgio_close(struct thread_data *td, struct fio_file *f) { struct sg_options *o = td->eo; int ret; -- 2.43.0