[xilinx-xlnx:xlnx_rebase_v5.10 1606/1964] drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2650:5: warning: no previous prototype for function 'axienet_ethtools_sset_count'

kernel test robot lkp at intel.com
Thu Sep 30 12:13:42 PDT 2021


tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head:   0a6e9d56f285540e5ca6c69c7fad2c3520b79c50
commit: 73d33c8a38edcd932c877e571e0f0c0c6a1f6878 [1606/1964] net: xilinx: Ethtool statistics support
config: x86_64-randconfig-a015-20210930 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 28981015526f2192440c18f18e8a20cd11b0779c)
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/73d33c8a38edcd932c877e571e0f0c0c6a1f6878
        git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.10
        git checkout 73d33c8a38edcd932c877e571e0f0c0c6a1f6878
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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:2650:5: warning: no previous prototype for function 'axienet_ethtools_sset_count' [-Wmissing-prototypes]
   int axienet_ethtools_sset_count(struct net_device *ndev, int sset)
       ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2650:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int axienet_ethtools_sset_count(struct net_device *ndev, int sset)
   ^
   static 
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2673:6: warning: no previous prototype for function 'axienet_ethtools_get_stats' [-Wmissing-prototypes]
   void axienet_ethtools_get_stats(struct net_device *ndev,
        ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2673:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void axienet_ethtools_get_stats(struct net_device *ndev,
   ^
   static 
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2700:6: warning: no previous prototype for function 'axienet_ethtools_strings' [-Wmissing-prototypes]
   void axienet_ethtools_strings(struct net_device *ndev, u32 sset, u8 *data)
        ^
   drivers/net/ethernet/xilinx/xilinx_axienet_main.c:2700:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void axienet_ethtools_strings(struct net_device *ndev, u32 sset, u8 *data)
   ^
   static 
   3 warnings generated.


vim +/axienet_ethtools_sset_count +2650 drivers/net/ethernet/xilinx/xilinx_axienet_main.c

  2640	
  2641	/**
  2642	 * axienet_ethtools_sset_count - Get number of strings that
  2643	 *				 get_strings will write.
  2644	 * @ndev:	Pointer to net_device structure
  2645	 * @sset:	Get the set strings
  2646	 *
  2647	 * Return: number of strings, on success, Non-zero error value on
  2648	 *	   failure.
  2649	 */
> 2650	int axienet_ethtools_sset_count(struct net_device *ndev, int sset)
  2651	{
  2652		switch (sset) {
  2653		case ETH_SS_STATS:
  2654	#ifdef CONFIG_AXIENET_HAS_MCDMA
  2655			return axienet_sset_count(ndev, sset);
  2656	#else
  2657			return AXIENET_ETHTOOLS_SSTATS_LEN;
  2658	#endif
  2659		default:
  2660			return -EOPNOTSUPP;
  2661		}
  2662	}
  2663	
  2664	/**
  2665	 * axienet_ethtools_get_stats - Get the extended statistics
  2666	 *				about the device.
  2667	 * @ndev:	Pointer to net_device structure
  2668	 * @stats:	Pointer to ethtool_stats structure
  2669	 * @data:	To store the statistics values
  2670	 *
  2671	 * Return: None.
  2672	 */
> 2673	void axienet_ethtools_get_stats(struct net_device *ndev,
  2674					struct ethtool_stats *stats,
  2675					u64 *data)
  2676	{
  2677		unsigned int i = 0;
  2678	
  2679		data[i++] = ndev->stats.tx_packets;
  2680		data[i++] = ndev->stats.rx_packets;
  2681		data[i++] = ndev->stats.tx_bytes;
  2682		data[i++] = ndev->stats.rx_bytes;
  2683		data[i++] = ndev->stats.tx_errors;
  2684		data[i++] = ndev->stats.rx_missed_errors + ndev->stats.rx_frame_errors;
  2685	
  2686	#ifdef CONFIG_AXIENET_HAS_MCDMA
  2687		axienet_get_stats(ndev, stats, data);
  2688	#endif
  2689	}
  2690	
  2691	/**
  2692	 * axienet_ethtools_strings - Set of strings that describe
  2693	 *			 the requested objects.
  2694	 * @ndev:	Pointer to net_device structure
  2695	 * @sset:	Get the set strings
  2696	 * @data:	Data of Transmit and Receive statistics
  2697	 *
  2698	 * Return: None.
  2699	 */
> 2700	void axienet_ethtools_strings(struct net_device *ndev, u32 sset, u8 *data)
  2701	{
  2702		int i;
  2703	
  2704		for (i = 0; i < AXIENET_ETHTOOLS_SSTATS_LEN; i++) {
  2705			if (sset == ETH_SS_STATS)
  2706				memcpy(data + i * ETH_GSTRING_LEN,
  2707				       axienet_get_ethtools_strings_stats[i].name,
  2708				       ETH_GSTRING_LEN);
  2709		}
  2710	#ifdef CONFIG_AXIENET_HAS_MCDMA
  2711		axienet_strings(ndev, sset, data);
  2712	#endif
  2713	}
  2714	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 43254 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20211001/83f70739/attachment-0001.gz>


More information about the linux-arm-kernel mailing list