public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:582:6-8: opportunity for str_enabled_disabled(on)
@ 2025-02-11  8:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-11  8:35 UTC (permalink / raw)
  To: Maxime Chevallier; +Cc: oe-kbuild-all, linux-kernel, Jakub Kicinski

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   febbc555cf0fff895546ddb8ba2c9a523692fb55
commit: 8e7620726beb800d6806dbe7bf0b8cc13c1feb97 net: stmmac: Introduce dwmac1000 ptp_clock_info and operations
date:   3 months ago
config: csky-randconfig-r051-20250211 (https://download.01.org/0day-ci/archive/20250211/202502111616.xnebdSv1-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.2.0

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/202502111616.xnebdSv1-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:582:6-8: opportunity for str_enabled_disabled(on)

vim +582 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c

   557	
   558	int dwmac1000_ptp_enable(struct ptp_clock_info *ptp,
   559				 struct ptp_clock_request *rq, int on)
   560	{
   561		struct stmmac_priv *priv =
   562		    container_of(ptp, struct stmmac_priv, ptp_clock_ops);
   563		void __iomem *ptpaddr = priv->ptpaddr;
   564		int ret = -EOPNOTSUPP;
   565		u32 tcr_val;
   566	
   567		switch (rq->type) {
   568		case PTP_CLK_REQ_EXTTS:
   569			mutex_lock(&priv->aux_ts_lock);
   570			tcr_val = readl(ptpaddr + PTP_TCR);
   571	
   572			if (on) {
   573				tcr_val |= GMAC_PTP_TCR_ATSEN0;
   574				tcr_val |= GMAC_PTP_TCR_ATSFC;
   575				priv->plat->flags |= STMMAC_FLAG_EXT_SNAPSHOT_EN;
   576			} else {
   577				tcr_val &= ~GMAC_PTP_TCR_ATSEN0;
   578				priv->plat->flags &= ~STMMAC_FLAG_EXT_SNAPSHOT_EN;
   579			}
   580	
   581			netdev_dbg(priv->dev, "Auxiliary Snapshot %s.\n",
 > 582				   on ? "enabled" : "disabled");

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-11  8:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-11  8:35 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:582:6-8: opportunity for str_enabled_disabled(on) kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox