All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: zhang.enpei@zte.com.cn, chessman@tux.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	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: Sun, 16 Aug 2026 11:56:35 +0800	[thread overview]
Message-ID: <202608161140.4HTNVNNa-lkp@intel.com> (raw)
In-Reply-To: <20250827155455583-PdvmDYA9SD3J37_XRza5@zte.com.cn>

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

      parent reply	other threads:[~2026-08-16  3:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27  7:54 [PATCH v3] ethernet: tlan: Convert to use jiffies macro zhang.enpei
2025-08-27 22:22 ` Jacob Keller
2025-08-28 17:27 ` Simon Horman
2026-08-16  0:35 ` kernel test robot
2026-08-16  3:56 ` kernel test robot [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=202608161140.4HTNVNNa-lkp@intel.com \
    --to=lkp@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=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --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 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.