* Re: [PATCH v3] ethernet: tlan: Convert to use jiffies macro
[not found] <20250827155455583-PdvmDYA9SD3J37_XRza5@zte.com.cn>
@ 2026-08-16 0:35 ` kernel test robot
2026-08-16 3:56 ` kernel test robot
1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-08-16 0:35 UTC (permalink / raw)
To: zhang.enpei, chessman
Cc: llvm, oe-kbuild-all, andrew+netdev, davem, edumazet, kuba, pabeni,
netdev, linux-kernel
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
[also build test WARNING on net/main linus/master v7.2-rc7 next-20260721]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/zhang-enpei-zte-com-cn/ethernet-tlan-Convert-to-use-jiffies-macro/20260813-185229
base: net-next/main
patch link: https://lore.kernel.org/r/20250827155455583-PdvmDYA9SD3J37_XRza5%40zte.com.cn
patch subject: [PATCH v3] ethernet: tlan: Convert to use jiffies macro
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260816/202608160257.LKzb3DiV-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260816/202608160257.LKzb3DiV-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608160257.LKzb3DiV-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/ti/tlan.c:1833:8: warning: comparison of distinct pointer types ('unsigned long *' and 'typeof (priv->timer_set_at + (250 / 10)) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
1833 | if (time_is_before_eq_jiffies(priv->timer_set_at + TLAN_TIMER_ACT_DELAY)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/jiffies.h:288:38: note: expanded from macro 'time_is_before_eq_jiffies'
288 | #define time_is_before_eq_jiffies(a) time_after_eq(jiffies, a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/jiffies.h:145:3: note: expanded from macro 'time_after_eq'
145 | typecheck(unsigned long, b) && \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/typecheck.h:12:18: note: expanded from macro 'typecheck'
12 | (void)(&__dummy == &__dummy2); \
| ~~~~~~~~ ^ ~~~~~~~~~
drivers/net/ethernet/ti/tlan.c:2057:7: warning: variable 'def_tx' set but not used [-Wunused-but-set-variable]
2057 | u32 def_tx, crc, code;
| ^
2 warnings generated.
vim +1833 drivers/net/ethernet/ti/tlan.c
1771
1772
1773 /***************************************************************
1774 * tlan_timer
1775 *
1776 * Returns:
1777 * Nothing
1778 * Parms:
1779 * data A value given to add timer when
1780 * add_timer was called.
1781 *
1782 * This function handles timed functionality for the
1783 * TLAN driver. The two current timer uses are for
1784 * delaying for autonegotionation and driving the ACT LED.
1785 * - Autonegotiation requires being allowed about
1786 * 2 1/2 seconds before attempting to transmit a
1787 * packet. It would be a very bad thing to hang
1788 * the kernel this long, so the driver doesn't
1789 * allow transmission 'til after this time, for
1790 * certain PHYs. It would be much nicer if all
1791 * PHYs were interrupt-capable like the internal
1792 * PHY.
1793 * - The ACT LED, which shows adapter activity, is
1794 * driven by the driver, and so must be left on
1795 * for a short period to power up the LED so it
1796 * can be seen. This delay can be changed by
1797 * changing the TLAN_TIMER_ACT_DELAY in tlan.h,
1798 * if desired. 100 ms produces a slightly
1799 * sluggish response.
1800 *
1801 **************************************************************/
1802
1803 static void tlan_timer(struct timer_list *t)
1804 {
1805 struct tlan_priv *priv = timer_container_of(priv, t, timer);
1806 struct net_device *dev = priv->dev;
1807 unsigned long flags = 0;
1808
1809 priv->timer.function = NULL;
1810
1811 switch (priv->timer_type) {
1812 case TLAN_TIMER_PHY_PDOWN:
1813 tlan_phy_power_down(dev);
1814 break;
1815 case TLAN_TIMER_PHY_PUP:
1816 tlan_phy_power_up(dev);
1817 break;
1818 case TLAN_TIMER_PHY_RESET:
1819 tlan_phy_reset(dev);
1820 break;
1821 case TLAN_TIMER_PHY_START_LINK:
1822 tlan_phy_start_link(dev);
1823 break;
1824 case TLAN_TIMER_PHY_FINISH_AN:
1825 tlan_phy_finish_auto_neg(dev);
1826 break;
1827 case TLAN_TIMER_FINISH_RESET:
1828 tlan_finish_reset(dev);
1829 break;
1830 case TLAN_TIMER_ACTIVITY:
1831 spin_lock_irqsave(&priv->lock, flags);
1832 if (priv->timer.function == NULL) {
> 1833 if (time_is_before_eq_jiffies(priv->timer_set_at + TLAN_TIMER_ACT_DELAY)) {
1834 tlan_dio_write8(dev->base_addr,
1835 TLAN_LED_REG, TLAN_LED_LINK);
1836 } else {
1837 priv->timer.expires = priv->timer_set_at
1838 + TLAN_TIMER_ACT_DELAY;
1839 spin_unlock_irqrestore(&priv->lock, flags);
1840 add_timer(&priv->timer);
1841 break;
1842 }
1843 }
1844 spin_unlock_irqrestore(&priv->lock, flags);
1845 break;
1846 default:
1847 break;
1848 }
1849
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v3] ethernet: tlan: Convert to use jiffies macro
[not found] <20250827155455583-PdvmDYA9SD3J37_XRza5@zte.com.cn>
2026-08-16 0:35 ` [PATCH v3] ethernet: tlan: Convert to use jiffies macro kernel test robot
@ 2026-08-16 3:56 ` kernel test robot
1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-08-16 3:56 UTC (permalink / raw)
To: zhang.enpei, chessman
Cc: llvm, oe-kbuild-all, andrew+netdev, davem, edumazet, kuba, pabeni,
netdev, linux-kernel
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
[also build test WARNING on net/main linus/master v7.2-rc7 next-20260814]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/zhang-enpei-zte-com-cn/ethernet-tlan-Convert-to-use-jiffies-macro/20260813-185229
base: net-next/main
patch link: https://lore.kernel.org/r/20250827155455583-PdvmDYA9SD3J37_XRza5%40zte.com.cn
patch subject: [PATCH v3] ethernet: tlan: Convert to use jiffies macro
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260816/202608161140.4HTNVNNa-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260816/202608161140.4HTNVNNa-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608161140.4HTNVNNa-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/ti/tlan.c:1833:8: warning: comparison of distinct pointer types ('unsigned long *' and 'typeof (priv->timer_set_at + (250 / 10)) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
1833 | if (time_is_before_eq_jiffies(priv->timer_set_at + TLAN_TIMER_ACT_DELAY)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/jiffies.h:288:38: note: expanded from macro 'time_is_before_eq_jiffies'
288 | #define time_is_before_eq_jiffies(a) time_after_eq(jiffies, a)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/jiffies.h:145:3: note: expanded from macro 'time_after_eq'
145 | typecheck(unsigned long, b) && \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/typecheck.h:12:18: note: expanded from macro 'typecheck'
12 | (void)(&__dummy == &__dummy2); \
| ~~~~~~~~ ^ ~~~~~~~~~
drivers/net/ethernet/ti/tlan.c:2057:7: warning: variable 'def_tx' set but not used [-Wunused-but-set-variable]
2057 | u32 def_tx, crc, code;
| ^
2 warnings generated.
vim +1833 drivers/net/ethernet/ti/tlan.c
1771
1772
1773 /***************************************************************
1774 * tlan_timer
1775 *
1776 * Returns:
1777 * Nothing
1778 * Parms:
1779 * data A value given to add timer when
1780 * add_timer was called.
1781 *
1782 * This function handles timed functionality for the
1783 * TLAN driver. The two current timer uses are for
1784 * delaying for autonegotionation and driving the ACT LED.
1785 * - Autonegotiation requires being allowed about
1786 * 2 1/2 seconds before attempting to transmit a
1787 * packet. It would be a very bad thing to hang
1788 * the kernel this long, so the driver doesn't
1789 * allow transmission 'til after this time, for
1790 * certain PHYs. It would be much nicer if all
1791 * PHYs were interrupt-capable like the internal
1792 * PHY.
1793 * - The ACT LED, which shows adapter activity, is
1794 * driven by the driver, and so must be left on
1795 * for a short period to power up the LED so it
1796 * can be seen. This delay can be changed by
1797 * changing the TLAN_TIMER_ACT_DELAY in tlan.h,
1798 * if desired. 100 ms produces a slightly
1799 * sluggish response.
1800 *
1801 **************************************************************/
1802
1803 static void tlan_timer(struct timer_list *t)
1804 {
1805 struct tlan_priv *priv = timer_container_of(priv, t, timer);
1806 struct net_device *dev = priv->dev;
1807 unsigned long flags = 0;
1808
1809 priv->timer.function = NULL;
1810
1811 switch (priv->timer_type) {
1812 case TLAN_TIMER_PHY_PDOWN:
1813 tlan_phy_power_down(dev);
1814 break;
1815 case TLAN_TIMER_PHY_PUP:
1816 tlan_phy_power_up(dev);
1817 break;
1818 case TLAN_TIMER_PHY_RESET:
1819 tlan_phy_reset(dev);
1820 break;
1821 case TLAN_TIMER_PHY_START_LINK:
1822 tlan_phy_start_link(dev);
1823 break;
1824 case TLAN_TIMER_PHY_FINISH_AN:
1825 tlan_phy_finish_auto_neg(dev);
1826 break;
1827 case TLAN_TIMER_FINISH_RESET:
1828 tlan_finish_reset(dev);
1829 break;
1830 case TLAN_TIMER_ACTIVITY:
1831 spin_lock_irqsave(&priv->lock, flags);
1832 if (priv->timer.function == NULL) {
> 1833 if (time_is_before_eq_jiffies(priv->timer_set_at + TLAN_TIMER_ACT_DELAY)) {
1834 tlan_dio_write8(dev->base_addr,
1835 TLAN_LED_REG, TLAN_LED_LINK);
1836 } else {
1837 priv->timer.expires = priv->timer_set_at
1838 + TLAN_TIMER_ACT_DELAY;
1839 spin_unlock_irqrestore(&priv->lock, flags);
1840 add_timer(&priv->timer);
1841 break;
1842 }
1843 }
1844 spin_unlock_irqrestore(&priv->lock, flags);
1845 break;
1846 default:
1847 break;
1848 }
1849
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread