From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: <zhang.enpei@zte.com.cn>, <chessman@tux.org>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ethernet: tlan: Convert to use jiffies macro
Date: Wed, 20 Aug 2025 11:29:37 +0200 [thread overview]
Message-ID: <8ffb7fa5-641b-47b7-963c-480c8494c85c@intel.com> (raw)
In-Reply-To: <20250819161616455E67Ux3eifLtzWBrN8i6Fr@zte.com.cn>
On 8/19/25 10:16, zhang.enpei@zte.com.cn wrote:
> From: Zhang Enpei <zhang.enpei@zte.com.cn>
>
> Use time_after_eq macro instead of using jiffies directly to handle
> wraparound.
>
> Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
> ---
> drivers/net/ethernet/ti/tlan.c | 4 +---
change looks good, and it seems that there is no more candidates in ti/
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
> index a55b0f951181..78e439834f26 100644
> --- a/drivers/net/ethernet/ti/tlan.c
> +++ b/drivers/net/ethernet/ti/tlan.c
> @@ -1817,7 +1817,6 @@ static void tlan_timer(struct timer_list *t)
> {
> struct tlan_priv *priv = timer_container_of(priv, t, timer);
> struct net_device *dev = priv->dev;
> - u32 elapsed;
> unsigned long flags = 0;
>
> priv->timer.function = NULL;
> @@ -1844,8 +1843,7 @@ static void tlan_timer(struct timer_list *t)
> case TLAN_TIMER_ACTIVITY:
> spin_lock_irqsave(&priv->lock, flags);
> if (priv->timer.function == NULL) {
> - elapsed = jiffies - priv->timer_set_at;
> - if (elapsed >= TLAN_TIMER_ACT_DELAY) {
> + if (time_after_eq(jiffies, priv->timer_set_at + TLAN_TIMER_ACT_DELAY)) {
> tlan_dio_write8(dev->base_addr,
> TLAN_LED_REG, TLAN_LED_LINK);
> } else {
next prev parent reply other threads:[~2025-08-20 9:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 8:16 zhang.enpei
2025-08-20 9:29 ` Przemek Kitszel [this message]
2025-08-21 22:50 ` Jakub Kicinski
-- strict thread matches above, loose matches on Subject: below --
2025-08-07 12:17 zhang.enpei
2025-08-08 19:52 ` Jakub Kicinski
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=8ffb7fa5-641b-47b7-963c-480c8494c85c@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=chessman@tux.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=zhang.enpei@zte.com.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®