lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202508131032.BQJ5m6ky-lkp@intel.com>
Date: Wed, 13 Aug 2025 12:45:38 +0800
From: kernel test robot <lkp@...el.com>
To: Wei Fang <wei.fang@....com>, robh@...nel.org, krzk+dt@...nel.org,
	conor+dt@...nel.org, richardcochran@...il.com,
	claudiu.manoil@....com, vladimir.oltean@....com,
	xiaoning.wang@....com, andrew+netdev@...n.ch, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	vadim.fedorenko@...ux.dev, Frank.Li@....com, shawnguo@...nel.org,
	s.hauer@...gutronix.de, festevam@...il.com
Cc: oe-kbuild-all@...ts.linux.dev, fushi.peng@....com,
	devicetree@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, imx@...ts.linux.dev,
	kernel@...gutronix.de
Subject: Re: [PATCH v3 net-next 04/15] ptp: netc: add NETC V4 Timer PTP
 driver support

Hi Wei,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Wei-Fang/dt-bindings-ptp-add-NETC-Timer-PTP-clock/20250812-181510
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250812094634.489901-5-wei.fang%40nxp.com
patch subject: [PATCH v3 net-next 04/15] ptp: netc: add NETC V4 Timer PTP driver support
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20250813/202508131032.BQJ5m6ky-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250813/202508131032.BQJ5m6ky-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508131032.BQJ5m6ky-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/ptp/ptp_netc.c: In function 'netc_timer_get_reference_clk_source':
>> drivers/ptp/ptp_netc.c:365:45: warning: left shift count >= width of type [-Wshift-count-overflow]
     365 |         priv->period = div_u64(NSEC_PER_SEC << 32, priv->clk_freq);
         |                                             ^~


vim +365 drivers/ptp/ptp_netc.c

   333	
   334	static int netc_timer_get_reference_clk_source(struct netc_timer *priv)
   335	{
   336		struct device *dev = &priv->pdev->dev;
   337		struct clk *clk;
   338		int i;
   339	
   340		/* Select NETC system clock as the reference clock by default */
   341		priv->clk_select = NETC_TMR_SYSTEM_CLK;
   342		priv->clk_freq = NETC_TMR_SYSCLK_333M;
   343	
   344		/* Update the clock source of the reference clock if the clock
   345		 * is specified in DT node.
   346		 */
   347		for (i = 0; i < ARRAY_SIZE(timer_clk_src); i++) {
   348			clk = devm_clk_get_optional_enabled(dev, timer_clk_src[i]);
   349			if (IS_ERR(clk))
   350				return PTR_ERR(clk);
   351	
   352			if (clk) {
   353				priv->clk_freq = clk_get_rate(clk);
   354				priv->clk_select = i ? NETC_TMR_EXT_OSC :
   355						       NETC_TMR_CCM_TIMER1;
   356				break;
   357			}
   358		}
   359	
   360		/* The period is a 64-bit number, the high 32-bit is the integer
   361		 * part of the period, the low 32-bit is the fractional part of
   362		 * the period. In order to get the desired 32-bit fixed-point
   363		 * format, multiply the numerator of the fraction by 2^32.
   364		 */
 > 365		priv->period = div_u64(NSEC_PER_SEC << 32, priv->clk_freq);
   366	
   367		return 0;
   368	}
   369	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ