mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Jakub Kicinski <kuba@kernel.org>
Subject: drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:582:6-8: opportunity for str_enabled_disabled(on)
Date: Tue, 11 Feb 2025 16:35:34 +0800	[thread overview]
Message-ID: <202502111616.xnebdSv1-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-02-11  8:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202502111616.xnebdSv1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®