tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: dfd71d381f7e1aa118e0368774aa05f5c4a48870
commit: 14da1510fedc2d72ca81344a0f62939e0a1bc648 [5057/6402] Revert "net: bcmgenet:
remove unused function in bcmgenet.c"
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
135b877874fae96b4372c8a3fbfaa8ff44ff86e3)
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 14da1510fedc2d72ca81344a0f62939e0a1bc648
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
> drivers/net/ethernet/broadcom/genet/bcmgenet.c:2858:5: warning:
no previous prototype for function 'bcmgenet_hfb_add_filter'
[-Wmissing-prototypes]
int bcmgenet_hfb_add_filter(struct bcmgenet_priv *priv, u32
*f_data,
^
drivers/net/ethernet/broadcom/genet/bcmgenet.c:2858:1: note: declare 'static' if
the function is not intended to be used outside of this translation unit
int bcmgenet_hfb_add_filter(struct bcmgenet_priv *priv, u32 *f_data,
^
static
drivers/net/ethernet/broadcom/genet/bcmgenet.c:120:26: warning: unused function
'dmadesc_get_addr' [-Wunused-function]
static inline dma_addr_t dmadesc_get_addr(struct bcmgenet_priv *priv,
^
2 warnings generated.
vim +/bcmgenet_hfb_add_filter +2858 drivers/net/ethernet/broadcom/genet/bcmgenet.c
2822
2823 /* bcmgenet_hfb_add_filter
2824 *
2825 * Add new filter to Hardware Filter Block to match and direct Rx traffic to
2826 * desired Rx queue.
2827 *
2828 * f_data is an array of unsigned 32-bit integers where each 32-bit integer
2829 * provides filter data for 2 bytes (4 nibbles) of Rx frame:
2830 *
2831 * bits 31:20 - unused
2832 * bit 19 - nibble 0 match enable
2833 * bit 18 - nibble 1 match enable
2834 * bit 17 - nibble 2 match enable
2835 * bit 16 - nibble 3 match enable
2836 * bits 15:12 - nibble 0 data
2837 * bits 11:8 - nibble 1 data
2838 * bits 7:4 - nibble 2 data
2839 * bits 3:0 - nibble 3 data
2840 *
2841 * Example:
2842 * In order to match:
2843 * - Ethernet frame type = 0x0800 (IP)
2844 * - IP version field = 4
2845 * - IP protocol field = 0x11 (UDP)
2846 *
2847 * The following filter is needed:
2848 * u32 hfb_filter_ipv4_udp[] = {
2849 * Rx frame offset 0x00: 0x00000000, 0x00000000, 0x00000000, 0x00000000,
2850 * Rx frame offset 0x08: 0x00000000, 0x00000000, 0x000F0800, 0x00084000,
2851 * Rx frame offset 0x10: 0x00000000, 0x00000000, 0x00000000, 0x00030011,
2852 * };
2853 *
2854 * To add the filter to HFB and direct the traffic to Rx queue 0, call:
2855 * bcmgenet_hfb_add_filter(priv, hfb_filter_ipv4_udp,
2856 * ARRAY_SIZE(hfb_filter_ipv4_udp), 0);
2857 */
2858 int bcmgenet_hfb_add_filter(struct bcmgenet_priv *priv, u32
*f_data,
2859 u32 f_length, u32 rx_queue)
2860 {
2861 int f_index;
2862 u32 i;
2863
2864 f_index = bcmgenet_hfb_find_unused_filter(priv);
2865 if (f_index < 0)
2866 return -ENOMEM;
2867
2868 if (f_length > priv->hw_params->hfb_filter_size)
2869 return -EINVAL;
2870
2871 for (i = 0; i < f_length; i++)
2872 bcmgenet_hfb_writel(priv, f_data[i],
2873 (f_index * priv->hw_params->hfb_filter_size + i) *
2874 sizeof(u32));
2875
2876 bcmgenet_hfb_set_filter_length(priv, f_index, 2 * f_length);
2877 bcmgenet_hfb_set_filter_rx_queue_mapping(priv, f_index, rx_queue);
2878 bcmgenet_hfb_enable_filter(priv, f_index);
2879 bcmgenet_hfb_reg_writel(priv, 0x1, HFB_CTRL);
2880
2881 return 0;
2882 }
2883
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org