All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Fu <vincentfu@gmail.com>
To: Tomas Winkler <tomas.winkler@sandisk.com>,
	fio@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH 1/2] filesetup: make longest_existing_path() static and const-correct
Date: Thu, 31 Jul 2025 12:20:17 -0400	[thread overview]
Message-ID: <4b0299d7-e4a3-40ec-ad6c-5bd25330c50e@gmail.com> (raw)
In-Reply-To: <20250731122011.539660-1-tomas.winkler@sandisk.com>

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

  parent reply	other threads:[~2025-07-31 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-07-31 17:34 ` [PATCH 1/2] filesetup: make longest_existing_path() static and const-correct fiotestbot

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=4b0299d7-e4a3-40ec-ad6c-5bd25330c50e@gmail.com \
    --to=vincentfu@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=tomas.winkler@sandisk.com \
    /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.