Re: [PATCH v3] ethernet: tlan: Convert to use jiffies macro
From: Simon Horman <horms@kernel.org>
Date: 2025-08-28 17:27:10
Also in:
lkml
On Wed, Aug 27, 2025 at 03:54:55PM +0800, zhang.enpei@zte.com.cn wrote:
From: Zhang Enpei <redacted> Use time_is_before_eq_jiffies macro instead of using jiffies directly to handle wraparound. Signed-off-by: Zhang Enpei <redacted>
Unfortunately W=1 builds fail with this patch.
GCC 15.1.o says:
In file included from ./include/linux/bitops.h:7,
from ./include/linux/kernel.h:23,
from ./include/linux/cpumask.h:11,
from ./include/linux/alloc_tag.h:13,
from ./include/linux/percpu.h:5,
from ./include/linux/context_tracking_state.h:5,
from ./include/linux/hardirq.h:5,
from drivers/net/ethernet/ti/tlan.c:32:
drivers/net/ethernet/ti/tlan.c: In function 'tlan_timer':
./include/linux/typecheck.h:12:25: warning: comparison of distinct pointer types lacks a cast [-Wcompare-distinct-pointer-types]
12 | (void)(&__dummy == &__dummy2); \
| ^~
./include/linux/jiffies.h:149:10: note: in expansion of macro 'typecheck'
149 | typecheck(unsigned long, b) && \
| ^~~~~~~~~
./include/linux/jiffies.h:292:38: note: in expansion of macro 'time_after_eq'
292 | #define time_is_before_eq_jiffies(a) time_after_eq(jiffies, a)
| ^~~~~~~~~~~~~
drivers/net/ethernet/ti/tlan.c:1846:29: note: in expansion of macro 'time_is_before_eq_jiffies'
1846 | if (time_is_before_eq_jiffies(priv->timer_set_at + TLAN_TIMER_ACT_DELAY)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
--
pw-bot: changes-requested