mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c:107:23: sparse: sparse: restricted __le32 degrades to integer
Date: Sat, 11 Nov 2023 11:51:51 +0800	[thread overview]
Message-ID: <202311111127.0cYR4j6Z-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3ca112b71f35dd5d99fc4571a56b5fc6f0c15814
commit: 25e80cd05ff81e51750106f1ae12364449ec38e7 net: stmmac: Get correct timestamp values from XGMAC
date:   4 years, 3 months ago
config: i386-randconfig-062-20230914 (https://download.01.org/0day-ci/archive/20231111/202311111127.0cYR4j6Z-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231111/202311111127.0cYR4j6Z-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/202311111127.0cYR4j6Z-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c:107:23: sparse: sparse: restricted __le32 degrades to integer
   drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c:107:50: sparse: sparse: restricted __le32 degrades to integer

vim +107 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c

    94	
    95	static int dwxgmac2_rx_check_timestamp(void *desc)
    96	{
    97		struct dma_desc *p = (struct dma_desc *)desc;
    98		unsigned int rdes3 = le32_to_cpu(p->des3);
    99		bool desc_valid, ts_valid;
   100	
   101		dma_rmb();
   102	
   103		desc_valid = !(rdes3 & XGMAC_RDES3_OWN) && (rdes3 & XGMAC_RDES3_CTXT);
   104		ts_valid = !(rdes3 & XGMAC_RDES3_TSD) && (rdes3 & XGMAC_RDES3_TSA);
   105	
   106		if (likely(desc_valid && ts_valid)) {
 > 107			if ((p->des0 == 0xffffffff) && (p->des1 == 0xffffffff))
   108				return -EINVAL;
   109			return 0;
   110		}
   111	
   112		return -EINVAL;
   113	}
   114	

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

                 reply	other threads:[~2023-11-11  3:52 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=202311111127.0cYR4j6Z-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --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®