[xilinx-xlnx:xlnx_rebase_v5.15_LTS 270/973] drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2660:5: warning: no previous prototype for 'axienet_ethtools_sset_count'
kernel test robot
lkp at intel.com
Wed Mar 9 11:55:09 PST 2022
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head: 802aff9b79e15ede7cbb84ac784f943f5a66287a
commit: 5e2af855147c7a9c5c9288a6888e298435a1c2c3 [270/973] net: xilinx: Ethtool statistics support
config: m68k-buildonly-randconfig-r003-20220309 (https://download.01.org/0day-ci/archive/20220310/202203100319.tfXB6eLF-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/Xilinx/linux-xlnx/commit/5e2af855147c7a9c5c9288a6888e298435a1c2c3
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.15_LTS
git checkout 5e2af855147c7a9c5c9288a6888e298435a1c2c3
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2660:5: warning: no previous prototype for 'axienet_ethtools_sset_count' [-Wmissing-prototypes]
2660 | int axienet_ethtools_sset_count(struct net_device *ndev, int sset)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2683:6: warning: no previous prototype for 'axienet_ethtools_get_stats' [-Wmissing-prototypes]
2683 | void axienet_ethtools_get_stats(struct net_device *ndev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2710:6: warning: no previous prototype for 'axienet_ethtools_strings' [-Wmissing-prototypes]
2710 | void axienet_ethtools_strings(struct net_device *ndev, u32 sset, u8 *data)
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +/axienet_ethtools_sset_count +2660 drivers/net/ethernet/xilinx/xilinx_axienet_main.c
2650
2651 /**
2652 * axienet_ethtools_sset_count - Get number of strings that
2653 * get_strings will write.
2654 * @ndev: Pointer to net_device structure
2655 * @sset: Get the set strings
2656 *
2657 * Return: number of strings, on success, Non-zero error value on
2658 * failure.
2659 */
> 2660 int axienet_ethtools_sset_count(struct net_device *ndev, int sset)
2661 {
2662 switch (sset) {
2663 case ETH_SS_STATS:
2664 #ifdef CONFIG_AXIENET_HAS_MCDMA
2665 return axienet_sset_count(ndev, sset);
2666 #else
2667 return AXIENET_ETHTOOLS_SSTATS_LEN;
2668 #endif
2669 default:
2670 return -EOPNOTSUPP;
2671 }
2672 }
2673
2674 /**
2675 * axienet_ethtools_get_stats - Get the extended statistics
2676 * about the device.
2677 * @ndev: Pointer to net_device structure
2678 * @stats: Pointer to ethtool_stats structure
2679 * @data: To store the statistics values
2680 *
2681 * Return: None.
2682 */
> 2683 void axienet_ethtools_get_stats(struct net_device *ndev,
2684 struct ethtool_stats *stats,
2685 u64 *data)
2686 {
2687 unsigned int i = 0;
2688
2689 data[i++] = ndev->stats.tx_packets;
2690 data[i++] = ndev->stats.rx_packets;
2691 data[i++] = ndev->stats.tx_bytes;
2692 data[i++] = ndev->stats.rx_bytes;
2693 data[i++] = ndev->stats.tx_errors;
2694 data[i++] = ndev->stats.rx_missed_errors + ndev->stats.rx_frame_errors;
2695
2696 #ifdef CONFIG_AXIENET_HAS_MCDMA
2697 axienet_get_stats(ndev, stats, data);
2698 #endif
2699 }
2700
2701 /**
2702 * axienet_ethtools_strings - Set of strings that describe
2703 * the requested objects.
2704 * @ndev: Pointer to net_device structure
2705 * @sset: Get the set strings
2706 * @data: Data of Transmit and Receive statistics
2707 *
2708 * Return: None.
2709 */
> 2710 void axienet_ethtools_strings(struct net_device *ndev, u32 sset, u8 *data)
2711 {
2712 int i;
2713
2714 for (i = 0; i < AXIENET_ETHTOOLS_SSTATS_LEN; i++) {
2715 if (sset == ETH_SS_STATS)
2716 memcpy(data + i * ETH_GSTRING_LEN,
2717 axienet_get_ethtools_strings_stats[i].name,
2718 ETH_GSTRING_LEN);
2719 }
2720 #ifdef CONFIG_AXIENET_HAS_MCDMA
2721 axienet_strings(ndev, sset, data);
2722 #endif
2723 }
2724
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
More information about the linux-arm-kernel
mailing list