From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
To: Alex Elder <elder@riscstar.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
greybus-dev@lists.linaro.org, outreachy@lists.linux.dev,
pure.logic@nexus-software.ie, johan@kernel.org, elder@kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: greybus: loopback: Use fsleep() for delay
Date: Fri, 23 Oct 2026 19:44:47 +0530 [thread overview]
Message-ID: <attr11CuxTty7rPn@user> (raw)
In-Reply-To: <fc3a1fb9-181d-4994-9bf2-45272dafc86e@riscstar.com>
On Fri, Oct 23, 2026 at 08:18:04AM -0500, Alex Elder wrote:
> On 10/23/26 8:04 AM, Greg KH wrote:
> > On Fri, Oct 23, 2026 at 07:48:54AM -0500, Alex Elder wrote:
> > > On 10/22/26 3:24 PM, pavankumaryalagada@gmail.com wrote:
> > > > From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
> > > >
> > > > In the loopback function, usleep_range() is used for short delays
> > > > and msleep() for longer delays. This requires choosing the delay
> > > > function based on the requested time and converting microseconds
> > > > to milliseconds when using msleep().
> > > >
> > > > Replace both functions with fsleep(), which chooses a delay
> > > > delay method based on the requested time. For short delays,
> > >
> > > s/delay delay/delay/
> > >
> > > I think "checkpatch.pl" would have caught this.
> > >
> > > Maybe Greg can fix this up.
> >
> > Nope, not for staging patches, this is for "learning" :)
>
> Sounds good.
>
> Please provide version 3. And given that, I'll add one more
> suggestion.
Yes, sure. I will send version 3.
>
> You don't provide the *reason* for making this change in your
> description. You say that fsleep() does roughly the same thing
> as the existing code. But... why make the change?
Understood, I will make the reason for this change clearer in the
commit message.
>
> The answer is roughly that fsleep() is a common or "standard"
> function, and it's better to use those where available. I can
> think of at least three reasons:
> - It's better to use a well-known common function where available,
> because reviewers will already be familiar with what it does
> - A common function might get optimizations and improvements that
> your code would otherwise not benefit from
> - It might (slightly) reduce code size
>
> I am not suggesting you include all that, but you should
> understand it. My point is that you should be clear on
> the reason for the suggested change in your patch header.
>
> Even something like:
> Replace this block of code with a simple call to fsleep(),
> which does the same thing.
> is enough to explain *why*.
Yes, I understand.
Thank you for explaining the reasons behind this change.
I will update the commit message accordingly.
>
> Also, before sending *any* patch for review, please *always*
> re-run checkpatch.pl so it can find trivial problems for you.
I did run checkpatch.pl before sending v2, but it didn't catch
the duplicate word. I should have checked the commit message
more carefully myself. I will be more careful with future
patches.
Thanks for your guidance.
Pavan
>
> -Alex
>
> >
> > thanks.
> >
> > greg k-h
>
prev parent reply other threads:[~2026-10-23 14:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 20:24 [PATCH v2] staging: greybus: loopback: Use fsleep() for delay pavankumaryalagada
2026-10-23 12:48 ` Alex Elder
2026-10-23 13:04 ` Greg KH
2026-10-23 13:18 ` Alex Elder
2026-10-23 14:14 ` Yalagada Pavan Kumar [this message]
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=attr11CuxTty7rPn@user \
--to=pavankumaryalagada@gmail.com \
--cc=elder@kernel.org \
--cc=elder@riscstar.com \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
--cc=pure.logic@nexus-software.ie \
/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.