From: Jacob Keller <jacob.e.keller@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 v3] ethernet: tlan: Convert to use jiffies macro
Date: Wed, 27 Aug 2025 15:22:22 -0700 [thread overview]
Message-ID: <a254a4ef-2220-4a72-80ca-1a9fa046c1c6@intel.com> (raw)
In-Reply-To: <20250827155455583-PdvmDYA9SD3J37_XRza5@zte.com.cn>
[-- Attachment #1.1: Type: text/plain, Size: 1365 bytes --]
On 8/27/2025 12:54 AM, zhang.enpei@zte.com.cn wrote:
> From: Zhang Enpei <zhang.enpei@zte.com.cn>
>
> Use time_is_before_eq_jiffies macro instead of using jiffies directly to
> handle wraparound.
>
> Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
> ---
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> drivers/net/ethernet/ti/tlan.c | 4 +---
> 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..7c5e51284942 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_is_before_eq_jiffies(priv->timer_set_at + TLAN_TIMER_ACT_DELAY)) {
> tlan_dio_write8(dev->base_addr,
> TLAN_LED_REG, TLAN_LED_LINK);
> } else {
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2025-08-27 22:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 7:54 zhang.enpei
2025-08-27 22:22 ` Jacob Keller [this message]
2025-08-28 17:27 ` Simon Horman
2026-08-16 0:35 ` kernel test robot
2026-08-16 3:56 ` kernel test robot
2026-08-16 11:13 ` kernel test robot
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=a254a4ef-2220-4a72-80ca-1a9fa046c1c6@intel.com \
--to=jacob.e.keller@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®