Thread (6 messages) flat view 6 messages, 4 authors, 2021-10-02

Re: [PATCH net-next] net: dsa: sja1105: stop using priv->vlan_aware

From: kernel test robot <hidden>
Date: 2021-10-02 04:29:13
Also in: oe-kbuild-all

Hi Vladimir,

I love your patch! Yet something to improve:

[auto build test ERROR on net/master]
[also build test ERROR on horms-ipvs/master linus/master v5.15-rc3 next-20210922]
[cannot apply to net-next/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Vladimir-Oltean/net-dsa-sja1105-stop-using-priv-vlan_aware/20210929-173132
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git f936bb42aeb94a069bec7c9e04100d199c372956
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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/0day-ci/linux/commit/a2bec1580b66ebe935cb356f0eb9ceda834a14ab
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vladimir-Oltean/net-dsa-sja1105-stop-using-priv-vlan_aware/20210929-173132
        git checkout a2bec1580b66ebe935cb356f0eb9ceda834a14ab
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>

All errors (new ones prefixed by >>):

   drivers/net/dsa/sja1105/sja1105_main.c: In function 'sja1105_fdb_dump':
quoted
drivers/net/dsa/sja1105/sja1105_main.c:1805:49: error: passing argument 1 of 'dsa_port_is_vlan_filtering' from incompatible pointer type [-Werror=incompatible-pointer-types]
    1805 |                 if (!dsa_port_is_vlan_filtering(ds, port))
         |                                                 ^~
         |                                                 |
         |                                                 struct dsa_switch *
   In file included from include/linux/dsa/sja1105.h:13,
                    from drivers/net/dsa/sja1105/sja1105.h:10,
                    from drivers/net/dsa/sja1105/sja1105_main.c:25:
   include/net/dsa.h:548:70: note: expected 'const struct dsa_port *' but argument is of type 'struct dsa_switch *'
     548 | static inline bool dsa_port_is_vlan_filtering(const struct dsa_port *dp)
         |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~
quoted
drivers/net/dsa/sja1105/sja1105_main.c:1805:22: error: too many arguments to function 'dsa_port_is_vlan_filtering'
    1805 |                 if (!dsa_port_is_vlan_filtering(ds, port))
         |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/dsa/sja1105.h:13,
                    from drivers/net/dsa/sja1105/sja1105.h:10,
                    from drivers/net/dsa/sja1105/sja1105_main.c:25:
   include/net/dsa.h:548:20: note: declared here
     548 | static inline bool dsa_port_is_vlan_filtering(const struct dsa_port *dp)
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
--
   drivers/net/dsa/sja1105/sja1105_vl.c: In function 'sja1105_vl_redirect':
quoted
drivers/net/dsa/sja1105/sja1105_vl.c:500:41: error: passing argument 1 of 'dsa_port_is_vlan_filtering' from incompatible pointer type [-Werror=incompatible-pointer-types]
     500 |         if (!dsa_port_is_vlan_filtering(ds, port) &&
         |                                         ^~
         |                                         |
         |                                         struct dsa_switch *
   In file included from include/linux/dsa/sja1105.h:13,
                    from drivers/net/dsa/sja1105/sja1105.h:10,
                    from drivers/net/dsa/sja1105/sja1105_vl.h:7,
                    from drivers/net/dsa/sja1105/sja1105_vl.c:6:
   include/net/dsa.h:548:70: note: expected 'const struct dsa_port *' but argument is of type 'struct dsa_switch *'
     548 | static inline bool dsa_port_is_vlan_filtering(const struct dsa_port *dp)
         |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~
quoted
drivers/net/dsa/sja1105/sja1105_vl.c:500:14: error: too many arguments to function 'dsa_port_is_vlan_filtering'
     500 |         if (!dsa_port_is_vlan_filtering(ds, port) &&
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/dsa/sja1105.h:13,
                    from drivers/net/dsa/sja1105/sja1105.h:10,
                    from drivers/net/dsa/sja1105/sja1105_vl.h:7,
                    from drivers/net/dsa/sja1105/sja1105_vl.c:6:
   include/net/dsa.h:548:20: note: declared here
     548 | static inline bool dsa_port_is_vlan_filtering(const struct dsa_port *dp)
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/dsa/sja1105/sja1105_vl.c:505:47: error: passing argument 1 of 'dsa_port_is_vlan_filtering' from incompatible pointer type [-Werror=incompatible-pointer-types]
     505 |         } else if (dsa_port_is_vlan_filtering(ds, port) &&
         |                                               ^~
         |                                               |
         |                                               struct dsa_switch *
   In file included from include/linux/dsa/sja1105.h:13,
                    from drivers/net/dsa/sja1105/sja1105.h:10,
                    from drivers/net/dsa/sja1105/sja1105_vl.h:7,
                    from drivers/net/dsa/sja1105/sja1105_vl.c:6:
   include/net/dsa.h:548:70: note: expected 'const struct dsa_port *' but argument is of type 'struct dsa_switch *'
     548 | static inline bool dsa_port_is_vlan_filtering(const struct dsa_port *dp)
         |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~
   drivers/net/dsa/sja1105/sja1105_vl.c:505:20: error: too many arguments to function 'dsa_port_is_vlan_filtering'
     505 |         } else if (dsa_port_is_vlan_filtering(ds, port) &&
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/dsa/sja1105.h:13,
                    from drivers/net/dsa/sja1105/sja1105.h:10,
                    from drivers/net/dsa/sja1105/sja1105_vl.h:7,
                    from drivers/net/dsa/sja1105/sja1105_vl.c:6:
   include/net/dsa.h:548:20: note: declared here
     548 | static inline bool dsa_port_is_vlan_filtering(const struct dsa_port *dp)
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/dsa/sja1105/sja1105_vl.c: In function 'sja1105_vl_gate':
quoted
drivers/net/dsa/sja1105/sja1105_vl.c:598:41: error: 'ds' undeclared (first use in this function)
     598 |         if (!dsa_port_is_vlan_filtering(ds, port) &&
         |                                         ^~
   drivers/net/dsa/sja1105/sja1105_vl.c:598:41: note: each undeclared identifier is reported only once for each function it appears in
   drivers/net/dsa/sja1105/sja1105_vl.c:598:14: error: too many arguments to function 'dsa_port_is_vlan_filtering'
     598 |         if (!dsa_port_is_vlan_filtering(ds, port) &&
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/dsa/sja1105.h:13,
                    from drivers/net/dsa/sja1105/sja1105.h:10,
                    from drivers/net/dsa/sja1105/sja1105_vl.h:7,
                    from drivers/net/dsa/sja1105/sja1105_vl.c:6:
   include/net/dsa.h:548:20: note: declared here
     548 | static inline bool dsa_port_is_vlan_filtering(const struct dsa_port *dp)
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/dsa/sja1105/sja1105_vl.c:603:20: error: too many arguments to function 'dsa_port_is_vlan_filtering'
     603 |         } else if (dsa_port_is_vlan_filtering(ds, port) &&
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/dsa/sja1105.h:13,
                    from drivers/net/dsa/sja1105/sja1105.h:10,
                    from drivers/net/dsa/sja1105/sja1105_vl.h:7,
                    from drivers/net/dsa/sja1105/sja1105_vl.c:6:
   include/net/dsa.h:548:20: note: declared here
     548 | static inline bool dsa_port_is_vlan_filtering(const struct dsa_port *dp)
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors


vim +/dsa_port_is_vlan_filtering +1805 drivers/net/dsa/sja1105/sja1105_main.c

  1765	
  1766	static int sja1105_fdb_dump(struct dsa_switch *ds, int port,
  1767				    dsa_fdb_dump_cb_t *cb, void *data)
  1768	{
  1769		struct sja1105_private *priv = ds->priv;
  1770		struct device *dev = ds->dev;
  1771		int i;
  1772	
  1773		for (i = 0; i < SJA1105_MAX_L2_LOOKUP_COUNT; i++) {
  1774			struct sja1105_l2_lookup_entry l2_lookup = {0};
  1775			u8 macaddr[ETH_ALEN];
  1776			int rc;
  1777	
  1778			rc = sja1105_dynamic_config_read(priv, BLK_IDX_L2_LOOKUP,
  1779							 i, &l2_lookup);
  1780			/* No fdb entry at i, not an issue */
  1781			if (rc == -ENOENT)
  1782				continue;
  1783			if (rc) {
  1784				dev_err(dev, "Failed to dump FDB: %d\n", rc);
  1785				return rc;
  1786			}
  1787	
  1788			/* FDB dump callback is per port. This means we have to
  1789			 * disregard a valid entry if it's not for this port, even if
  1790			 * only to revisit it later. This is inefficient because the
  1791			 * 1024-sized FDB table needs to be traversed 4 times through
  1792			 * SPI during a 'bridge fdb show' command.
  1793			 */
  1794			if (!(l2_lookup.destports & BIT(port)))
  1795				continue;
  1796	
  1797			/* We need to hide the FDB entry for unknown multicast */
  1798			if (l2_lookup.macaddr == SJA1105_UNKNOWN_MULTICAST &&
  1799			    l2_lookup.mask_macaddr == SJA1105_UNKNOWN_MULTICAST)
  1800				continue;
  1801	
  1802			u64_to_ether_addr(l2_lookup.macaddr, macaddr);
  1803	
  1804			/* We need to hide the dsa_8021q VLANs from the user. */
1805			if (!dsa_port_is_vlan_filtering(ds, port))
  1806				l2_lookup.vlanid = 0;
  1807			rc = cb(macaddr, l2_lookup.vlanid, l2_lookup.lockeds, data);
  1808			if (rc)
  1809				return rc;
  1810		}
  1811		return 0;
  1812	}
  1813	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help