Re: [PATCH v5] net: sched: convert qdisc linked list to hashtable

From: kbuild test robot
Date: Sat Jul 30 2016 - 20:12:01 EST


Hi,

[auto build test ERROR on v4.7-rc7]
[also build test ERROR on next-20160729]
[cannot apply to net/master net-next/master ipsec-next/master]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Jiri-Kosina/net-sched-convert-qdisc-linked-list-to-hashtable/20160729-155412
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

>> drivers/net/ethernet/ti/davinci_emac.c:736:57: error: macro "hash_add" requires 3 arguments, but only 2 given
static int hash_add(struct emac_priv *priv, u8 *mac_addr)
^
>> drivers/net/ethernet/ti/davinci_emac.c:737:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
>> drivers/net/ethernet/ti/davinci_emac.c:778:12: error: conflicting types for 'hash_del'
static int hash_del(struct emac_priv *priv, u8 *mac_addr)
^
In file included from include/linux/netdevice.h:55:0,
from drivers/net/ethernet/ti/davinci_emac.c:44:
include/linux/hashtable.h:104:20: note: previous definition of 'hash_del' was here
static inline void hash_del(struct hlist_node *node)
^
drivers/net/ethernet/ti/davinci_emac.c: In function 'emac_add_mcast':
drivers/net/ethernet/ti/davinci_emac.c:828:35: error: macro "hash_add" requires 3 arguments, but only 2 given
update = hash_add(priv, mac_addr);
^
>> drivers/net/ethernet/ti/davinci_emac.c:828:12: error: 'hash_add' undeclared (first use in this function)
update = hash_add(priv, mac_addr);
^
drivers/net/ethernet/ti/davinci_emac.c:828:12: note: each undeclared identifier is reported only once for each function it appears in

vim +/hash_add +736 drivers/net/ethernet/ti/davinci_emac.c

a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 730 * @priv: The DaVinci EMAC private adapter structure
49ce9c2c drivers/net/ethernet/ti/davinci_emac.c Ben Hutchings 2012-07-10 731 * @mac_addr: mac address to delete from hash table
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 732 *
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 733 * Adds mac address to the internal hash table
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 734 *
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 735 */
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 @736 static int hash_add(struct emac_priv *priv, u8 *mac_addr)
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 @737 {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 738 struct device *emac_dev = &priv->ndev->dev;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 739 u32 rc = 0;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 740 u32 hash_bit;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 741 u32 hash_value = hash_get(mac_addr);
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 742
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 743 if (hash_value >= EMAC_NUM_MULTICAST_BITS) {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 744 if (netif_msg_drv(priv)) {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 745 dev_err(emac_dev, "DaVinci EMAC: hash_add(): Invalid "\
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 746 "Hash %08x, should not be greater than %08x",
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 747 hash_value, (EMAC_NUM_MULTICAST_BITS - 1));
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 748 }
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 749 return -1;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 750 }
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 751
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 752 /* set the hash bit only if not previously set */
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 753 if (priv->multicast_hash_cnt[hash_value] == 0) {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 754 rc = 1; /* hash value changed */
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 755 if (hash_value < 32) {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 756 hash_bit = BIT(hash_value);
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 757 priv->mac_hash1 |= hash_bit;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 758 } else {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 759 hash_bit = BIT((hash_value - 32));
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 760 priv->mac_hash2 |= hash_bit;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 761 }
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 762 }
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 763
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 764 /* incr counter for num of mcast addr's mapped to "this" hash bit */
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 765 ++priv->multicast_hash_cnt[hash_value];
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 766
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 767 return rc;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 768 }
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 769
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 770 /**
49ce9c2c drivers/net/ethernet/ti/davinci_emac.c Ben Hutchings 2012-07-10 771 * hash_del - Hash function to delete mac addr from hash table
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 772 * @priv: The DaVinci EMAC private adapter structure
49ce9c2c drivers/net/ethernet/ti/davinci_emac.c Ben Hutchings 2012-07-10 773 * @mac_addr: mac address to delete from hash table
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 774 *
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 775 * Removes mac address from the internal hash table
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 776 *
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 777 */
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 @778 static int hash_del(struct emac_priv *priv, u8 *mac_addr)
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 779 {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 780 u32 hash_value;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 781 u32 hash_bit;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 782
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 783 hash_value = hash_get(mac_addr);
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 784 if (priv->multicast_hash_cnt[hash_value] > 0) {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 785 /* dec cntr for num of mcast addr's mapped to this hash bit */
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 786 --priv->multicast_hash_cnt[hash_value];
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 787 }
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 788
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 789 /* if counter still > 0, at least one multicast address refers
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 790 * to this hash bit. so return 0 */
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 791 if (priv->multicast_hash_cnt[hash_value] > 0)
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 792 return 0;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 793
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 794 if (hash_value < 32) {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 795 hash_bit = BIT(hash_value);
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 796 priv->mac_hash1 &= ~hash_bit;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 797 } else {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 798 hash_bit = BIT((hash_value - 32));
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 799 priv->mac_hash2 &= ~hash_bit;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 800 }
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 801
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 802 /* return 1 to indicate change in mac_hash registers reqd */
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 803 return 1;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 804 }
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 805
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 806 /* EMAC multicast operation */
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 807 #define EMAC_MULTICAST_ADD 0
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 808 #define EMAC_MULTICAST_DEL 1
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 809 #define EMAC_ALL_MULTI_SET 2
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 810 #define EMAC_ALL_MULTI_CLR 3
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 811
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 812 /**
49ce9c2c drivers/net/ethernet/ti/davinci_emac.c Ben Hutchings 2012-07-10 813 * emac_add_mcast - Set multicast address in the EMAC adapter (Internal)
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 814 * @priv: The DaVinci EMAC private adapter structure
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 815 * @action: multicast operation to perform
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 816 * mac_addr: mac address to set
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 817 *
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 818 * Set multicast addresses in EMAC adapter - internal function
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 819 *
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 820 */
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 821 static void emac_add_mcast(struct emac_priv *priv, u32 action, u8 *mac_addr)
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 822 {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 823 struct device *emac_dev = &priv->ndev->dev;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 824 int update = -1;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 825
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 826 switch (action) {
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 827 case EMAC_MULTICAST_ADD:
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 @828 update = hash_add(priv, mac_addr);
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 829 break;
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 830 case EMAC_MULTICAST_DEL:
a6286ee6 drivers/net/davinci_emac.c Anant Gole 2009-05-18 831 update = hash_del(priv, mac_addr);

:::::: The code at line 736 was first introduced by commit
:::::: a6286ee630f6d95f8466e19d7f1ae38d677028ae net: Add TI DaVinci EMAC driver

:::::: TO: Anant Gole <anantgole@xxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data