> On Mon, 25 Aug 2025 18:15:59 -0700
> lon...@linuxonhyperv.com wrote:
> 
> > From: Long Li <lon...@microsoft.com>
> >
> > If a device is hot removed and hot plugged, it needs the same driver
> > parameters that are passed to EAL. However, during device removal, all
> > EAL driver parameters are freed as part of the cleanup.
> >
> > Cache those driver parameters for future hot plug events. Because we
> > don't know which device will show up, cache all the PCI driver parameters.
> >
> > Signed-off-by: Long Li <lon...@microsoft.com>
> 
> Please fix this warning.

Will fix it. Thank you.

> 
> *Build Failed #1:
> OS: OpenAnolis8.10-64
> Target: x86_64-native-linuxapp-gcc
> FAILED: drivers/libtmp_rte_net_netvsc.a.p/net_netvsc_hn_ethdev.c.o
> gcc -Idrivers/libtmp_rte_net_netvsc.a.p -Idrivers -I../drivers -
> Idrivers/net/netvsc -I../drivers/net/netvsc -Ilib/ethdev -I../lib/ethdev -
> Ilib/eal/common -I../lib/eal/common -I. -I.. -Iconfig -I../config 
> -Ilib/eal/include
> -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -
> Ilib/eal/x86/include -I../lib/eal/x86/include -I../kernel/linux -Ilib/eal 
> -I../lib/eal
> -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics 
> -I../lib/metrics -
> Ilib/telemetry -I../lib/telemetry -Ilib/net -I../lib/net -Ilib/mbuf 
> -I../lib/mbuf -
> Ilib/mempool -I../lib/mempool -Ilib/ring -I../lib/ring -Ilib/meter 
> -I../lib/meter -
> Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/pci -
> I../lib/pci -Idrivers/bus/vdev -I../drivers/bus/vdev -Idrivers/bus/vmbus -
> I../drivers/bus/vmbus -I../drivers/bus/vmbus/linux -fdiagnostics-
> color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -
> std=c11 -O3 -include rte_config.h -Wvla -Wcast-qual -Wdeprecated -Wformat
> -Wformat-nonliteral -Wformat-security -Wmissing-declarations -Wmissing-
> prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wsign-
> compare -Wstrict-prototypes -Wundef -Wwrite-strings -Wno-packed-not-
> aligned -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=native -
> mrtm -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-
> truncation -Wno-vla -DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.netvsc -MD -
> MQ drivers/libtmp_rte_net_netvsc.a.p/net_netvsc_hn_ethdev.c.o -MF
> drivers/libtmp_rte_net_netvsc.a.p/net_netvsc_hn_ethdev.c.o.d -o
> drivers/libtmp_rte_net_netvsc.a.p/net_netvsc_hn_ethdev.c.o -
> c ../drivers/net/netvsc/hn_ethdev.c
> ../drivers/net/netvsc/hn_ethdev.c: In function ‘populate_cache_list’:
> ../drivers/net/netvsc/hn_ethdev.c:1469:40: error: argument to ‘sizeof’ in
> ‘strncpy’ call is the same expression as the source; did you mean to use the 
> size
> of the destination? [-Werror=sizeof-pointer-memaccess]
>    strncpy(cache->name, da->name, sizeof(da->name));

Reply via email to