* [openeuler:OLK-6.6 2464/2464] drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:5611:11: warning: default initialization of an object of type 'const u8[6]' (aka 'const unsigned char[6]') leaves the object uninitialized
@ 2025-07-04 23:44 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-04 23:44 UTC (permalink / raw)
To: kernel; +Cc: oe-kbuild-all
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 016a2eb38be5e29bea5011bd5fed627886f59f65
commit: eba3cbcfeafedc65b74eea8faf68aae00aebd5b6 [2464/2464] drivers: initial support for rnpgbe drivers from Mucse Technology
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20250705/202507050704.uDK4BfSC-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 61529d9e36fa86782a2458e6bdeedf7f376ef4b5)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250705/202507050704.uDK4BfSC-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/202507050704.uDK4BfSC-lkp@intel.com/
All warnings (new ones prefixed by >>):
| ^
In file included from drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:35:
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_common.h:275:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable]
275 | bool has_mac, has_trans;
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_common.h:275:16: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable]
275 | bool has_mac, has_trans;
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_common.h:276:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable]
276 | int headroom, tailroom;
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_common.h:276:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable]
276 | int headroom, tailroom;
| ^
In file included from drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:40:
In file included from include/net/vxlan.h:7:
In file included from include/net/udp_tunnel.h:5:
In file included from include/net/ip_tunnels.h:19:
In file included from include/net/dst_cache.h:8:
include/net/ip6_fib.h:269:10: warning: default initialization of an object of type 'typeof (f6i->expires)' (aka 'const unsigned long') leaves the object uninitialized [-Wdefault-const-init-var-unsafe]
269 | return time_after(jiffies, f6i->expires);
| ^
include/linux/jiffies.h:126:3: note: expanded from macro 'time_after'
126 | typecheck(unsigned long, b) && \
| ^
include/linux/typecheck.h:11:12: note: expanded from macro 'typecheck'
11 | typeof(x) __dummy2; \
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:271:6: warning: no previous prototype for function 'rnpgbe_disable_eee_mode' [-Wmissing-prototypes]
271 | void rnpgbe_disable_eee_mode(struct rnpgbe_adapter *adapter)
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:271:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
271 | void rnpgbe_disable_eee_mode(struct rnpgbe_adapter *adapter)
| ^
| static
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:730:5: warning: no previous prototype for function 'rnpgbe_rx_ring_reinit' [-Wmissing-prototypes]
730 | int rnpgbe_rx_ring_reinit(struct rnpgbe_adapter *adapter,
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:730:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
730 | int rnpgbe_rx_ring_reinit(struct rnpgbe_adapter *adapter,
| ^
| static
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:1933:7: warning: variable 'xdp_xmit' set but not used [-Wunused-but-set-variable]
1933 | bool xdp_xmit = false;
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:2170:6: warning: no previous prototype for function 'rnpgbe_write_eitr_rx' [-Wmissing-prototypes]
2170 | void rnpgbe_write_eitr_rx(struct rnpgbe_q_vector *q_vector)
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:2170:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
2170 | void rnpgbe_write_eitr_rx(struct rnpgbe_q_vector *q_vector)
| ^
| static
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:2350:6: warning: variable 'cleaned_total' set but not used [-Wunused-but-set-variable]
2350 | int cleaned_total = 0;
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:2893:6: warning: variable 'rxctrl' set but not used [-Wunused-but-set-variable]
2893 | u32 rxctrl = 0, dma_axi_ctl;
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:3209:6: warning: no previous prototype for function 'rnpgbe_vlan_stags_flag' [-Wmissing-prototypes]
3209 | void rnpgbe_vlan_stags_flag(struct rnpgbe_adapter *adapter)
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:3209:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3209 | void rnpgbe_vlan_stags_flag(struct rnpgbe_adapter *adapter)
| ^
| static
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:3314:6: warning: no previous prototype for function 'rnpgbe_reinit_locked' [-Wmissing-prototypes]
3314 | void rnpgbe_reinit_locked(struct rnpgbe_adapter *adapter)
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:3314:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3314 | void rnpgbe_reinit_locked(struct rnpgbe_adapter *adapter)
| ^
| static
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:3487:5: warning: no previous prototype for function 'rnpgbe_xmit_nop_frame_ring' [-Wmissing-prototypes]
3487 | int rnpgbe_xmit_nop_frame_ring(struct rnpgbe_adapter *adapter,
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:3487:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3487 | int rnpgbe_xmit_nop_frame_ring(struct rnpgbe_adapter *adapter,
| ^
| static
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:3503:6: warning: no previous prototype for function 'print_status' [-Wmissing-prototypes]
3503 | void print_status(struct rnpgbe_adapter *adapter)
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:3503:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3503 | void print_status(struct rnpgbe_adapter *adapter)
| ^
| static
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:4624:6: warning: no previous prototype for function 'rnpgbe_eee_init' [-Wmissing-prototypes]
4624 | bool rnpgbe_eee_init(struct rnpgbe_adapter *adapter)
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:4624:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
4624 | bool rnpgbe_eee_init(struct rnpgbe_adapter *adapter)
| ^
| static
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:4651:5: warning: no previous prototype for function 'rnpgbe_phy_init_eee' [-Wmissing-prototypes]
4651 | int rnpgbe_phy_init_eee(struct rnpgbe_adapter *adapter)
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:4651:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
4651 | int rnpgbe_phy_init_eee(struct rnpgbe_adapter *adapter)
| ^
| static
>> drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:5611:11: warning: default initialization of an object of type 'const u8[6]' (aka 'const unsigned char[6]') leaves the object uninitialized [-Wdefault-const-init-var-unsafe]
5611 | const u8 target_addr[ETH_ALEN];
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:6132:6: warning: no previous prototype for function 'rnpgbe_assign_netdev_ops' [-Wmissing-prototypes]
6132 | void rnpgbe_assign_netdev_ops(struct net_device *dev)
| ^
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:6132:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
6132 | void rnpgbe_assign_netdev_ops(struct net_device *dev)
| ^
| static
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:6166:29: warning: unused function 'rnpgbe_tso_features' [-Wunused-function]
6166 | static inline unsigned long rnpgbe_tso_features(struct rnpgbe_hw *hw)
| ^~~~~~~~~~~~~~~~~~~
26 warnings generated.
vim +5611 drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c
5598
5599 /**
5600 * rnpgbe_set_mac - Change the Ethernet Address of the NIC
5601 * @netdev: network interface device structure
5602 * @p: pointer to an address structure
5603 *
5604 * Returns 0 on success, negative on failure
5605 **/
5606 static int rnpgbe_set_mac(struct net_device *netdev, void *p)
5607 {
5608 struct rnpgbe_adapter *adapter = netdev_priv(netdev);
5609 struct rnpgbe_hw *hw = &adapter->hw;
5610 struct sockaddr *addr = p;
> 5611 const u8 target_addr[ETH_ALEN];
5612 bool sriov_flag = !!(adapter->flags & RNP_FLAG_SRIOV_ENABLED);
5613
5614 memcpy((void *)target_addr, addr->sa_data, netdev->addr_len);
5615
5616 if (!is_valid_ether_addr(target_addr))
5617 return -EADDRNOTAVAIL;
5618
5619 eth_hw_addr_set(netdev, target_addr);
5620 memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len);
5621 hw->ops.set_mac(hw, hw->mac.addr, sriov_flag);
5622 /* reset veb table */
5623 rnpgbe_configure_virtualization(adapter);
5624
5625 return 0;
5626 }
5627
--
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-07-04 23:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-04 23:44 [openeuler:OLK-6.6 2464/2464] drivers/net/ethernet/mucse/rnpgbe/rnpgbe_main.c:5611:11: warning: default initialization of an object of type 'const u8[6]' (aka 'const unsigned char[6]') leaves the object uninitialized kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.