[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202410221001.KrzTEU3A-lkp@intel.com>
Date: Tue, 22 Oct 2024 11:11:33 +0800
From: kernel test robot <lkp@...el.com>
To: Pawel Dembicki <paweldembicki@...il.com>, netdev@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Linus Walleij <linus.walleij@...aro.org>,
Pawel Dembicki <paweldembicki@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 1/3] net: dsa: vsc73xx: implement transmit via
control interface
Hi Pawel,
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/Pawel-Dembicki/net-dsa-vsc73xx-implement-packet-reception-via-control-interface/20241021-050041
base: net-next/main
patch link: https://lore.kernel.org/r/20241020205452.2660042-1-paweldembicki%40gmail.com
patch subject: [PATCH net-next 1/3] net: dsa: vsc73xx: implement transmit via control interface
config: openrisc-allyesconfig (https://download.01.org/0day-ci/archive/20241022/202410221001.KrzTEU3A-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241022/202410221001.KrzTEU3A-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/202410221001.KrzTEU3A-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/dsa/vitesse-vsc73xx-core.c: In function 'vsc73xx_inject_frame':
>> drivers/net/dsa/vitesse-vsc73xx-core.c:766:30: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
766 | memset(buf, 0, sizeof(buf));
| ^
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for GET_FREE_REGION
Depends on [n]: SPARSEMEM [=n]
Selected by [y]:
- RESOURCE_KUNIT_TEST [=y] && RUNTIME_TESTING_MENU [=y] && KUNIT [=y]
vim +766 drivers/net/dsa/vitesse-vsc73xx-core.c
750
751 static int
752 vsc73xx_inject_frame(struct vsc73xx *vsc, int port, struct sk_buff *skb)
753 {
754 struct vsc73xx_ifh *ifh;
755 u32 length, i, count;
756 u32 *buf;
757 int ret;
758
759 if (skb->len + VSC73XX_IFH_SIZE < 64)
760 length = 64;
761 else
762 length = skb->len + VSC73XX_IFH_SIZE;
763
764 count = DIV_ROUND_UP(length, 8);
765 buf = kzalloc(count * 8, GFP_KERNEL);
> 766 memset(buf, 0, sizeof(buf));
767
768 ifh = (struct vsc73xx_ifh *)buf;
769 ifh->frame_length = skb->len;
770 ifh->magic = VSC73XX_IFH_MAGIC;
771
772 skb_copy_and_csum_dev(skb, (u8 *)(buf + 2));
773
774 for (i = 0; i < count; i++) {
775 ret = vsc73xx_write_tx_fifo(vsc, port, buf[2 * i],
776 buf[2 * i + 1]);
777 if (ret) {
778 /* Clear buffer after error */
779 vsc73xx_update_bits(vsc, VSC73XX_BLOCK_MAC, port,
780 VSC73XX_MISCFIFO,
781 VSC73XX_MISCFIFO_REWIND_CPU_TX,
782 VSC73XX_MISCFIFO_REWIND_CPU_TX);
783 goto err;
784 }
785 }
786
787 vsc73xx_write(vsc, VSC73XX_BLOCK_MAC, port, VSC73XX_MISCFIFO,
788 VSC73XX_MISCFIFO_CPU_TX);
789
790 skb_tx_timestamp(skb);
791
792 skb->dev->stats.tx_packets++;
793 skb->dev->stats.tx_bytes += skb->len;
794 err:
795 kfree(buf);
796 return ret;
797 }
798
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists