All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC net-next 2/2] net: dsa: add Realtek RTL8366S switch driver
Date: Wed, 17 Feb 2021 17:57:46 +0800	[thread overview]
Message-ID: <202102171707.56Ey6miW-lkp@intel.com> (raw)
In-Reply-To: <20210217062139.7893-3-dqfext@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 13448 bytes --]

Hi DENG,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/DENG-Qingfang/DSA-driver-for-Realtek-RTL8366S-SR/20210217-143046
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 06b334f08b4f0e53be64160392be4c37db28a413
config: riscv-randconfig-r014-20210216 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/3cd6e7f27c49d9e06810a3ee0b03fbb6f20a40b9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review DENG-Qingfang/DSA-driver-for-Realtek-RTL8366S-SR/20210217-143046
        git checkout 3cd6e7f27c49d9e06810a3ee0b03fbb6f20a40b9
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/net/dsa/rtl8366s.c:928:56: error: too few arguments to function call, expected 4, have 3
           return rtl8366_vlan_filtering(ds, port, vlan_filtering);
                  ~~~~~~~~~~~~~~~~~~~~~~                         ^
   drivers/net/dsa/realtek-smi-core.h:133:5: note: 'rtl8366_vlan_filtering' declared here
   int rtl8366_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
       ^
>> drivers/net/dsa/rtl8366s.c:1049:2: error: member reference type 'struct list_head' is not a pointer; did you mean to use '.'?
           list_for_each_entry(dp, dp->dst->ports, list) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:522:18: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:511:15: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:693:26: note: expanded from macro 'container_of'
           void *__mptr = (void *)(ptr);                                   \
                                   ^~~
>> drivers/net/dsa/rtl8366s.c:1049:2: error: member reference type 'struct list_head' is not a pointer; did you mean to use '.'?
           list_for_each_entry(dp, dp->dst->ports, list) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:522:18: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:511:15: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> drivers/net/dsa/rtl8366s.c:1049:2: error: member reference type 'struct list_head' is not a pointer; did you mean to use '.'?
           list_for_each_entry(dp, dp->dst->ports, list) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry'
           for (pos = list_first_entry(head, typeof(*pos), member);        \
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:522:18: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
           ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:511:15: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> drivers/net/dsa/rtl8366s.c:1049:2: error: invalid operands to binary expression ('const struct list_head *' and 'struct list_head')
           list_for_each_entry(dp, dp->dst->ports, list) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:629:8: note: expanded from macro 'list_for_each_entry'
                !list_entry_is_head(pos, head, member);                    \
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:619:16: note: expanded from macro 'list_entry_is_head'
           (&pos->member == (head))
            ~~~~~~~~~~~~ ^  ~~~~~~
>> drivers/net/dsa/rtl8366s.c:1130:25: error: incompatible function pointer types initializing 'int (*)(struct dsa_switch *, int, bool, struct netlink_ext_ack *)' (aka 'int (*)(struct dsa_switch *, int, _Bool, struct netlink_ext_ack *)') with an expression of type 'int (struct dsa_switch *, int, bool)' (aka 'int (struct dsa_switch *, int, _Bool)') [-Werror,-Wincompatible-function-pointer-types]
           .port_vlan_filtering = rtl8366s_port_vlan_filtering,
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/dsa/rtl8366s.c:1158:41: error: static declaration of 'rtl8366s_variant' follows non-static declaration
   static const struct realtek_smi_variant rtl8366s_variant = {
                                           ^
   drivers/net/dsa/realtek-smi-core.h:146:41: note: previous declaration is here
   extern const struct realtek_smi_variant rtl8366s_variant;
                                           ^
   7 errors generated.


vim +928 drivers/net/dsa/rtl8366s.c

   906	
   907	static int rtl8366s_port_vlan_filtering(struct dsa_switch *ds, int port,
   908						bool vlan_filtering)
   909	{
   910		struct realtek_smi *smi = ds->priv;
   911		unsigned int val;
   912		int ret;
   913	
   914		/* Enable/Disable VLAN ingress filtering */
   915		val = BIT(port);
   916		ret = regmap_update_bits(smi->map, RTL8366S_VLAN_MEMBERINGRESS_REG,
   917					 val, vlan_filtering ? val : 0);
   918		if (ret)
   919			return ret;
   920	
   921		/* Disable/Enable keep original tagged/untagged */
   922		val = FIELD_PREP(RTL8366S_EGRESS_KEEP_FORMAT_MASK, val);
   923		ret = regmap_update_bits(smi->map, RTL8366S_EGRESS_KEEP_FORMAT_REG,
   924					 val, vlan_filtering ? 0 : val);
   925		if (ret)
   926			return ret;
   927	
 > 928		return rtl8366_vlan_filtering(ds, port, vlan_filtering);
   929	}
   930	
   931	static int rtl8366s_port_mirror_add(struct dsa_switch *ds, int port,
   932					    struct dsa_mall_mirror_tc_entry *mirror,
   933					    bool ingress)
   934	{
   935		struct realtek_smi *smi = ds->priv;
   936		unsigned int val, dir;
   937		int ret;
   938	
   939		/* The source and the monitor port cannot be the same */
   940		if (port == mirror->to_local_port)
   941			return -EOPNOTSUPP;
   942	
   943		ret = regmap_read(smi->map, RTL8366S_PMCR, &val);
   944		if (ret)
   945			return ret;
   946	
   947		dir = ingress ? RTL8366S_PMCR_MIRROR_RX : RTL8366S_PMCR_MIRROR_TX;
   948		/* RTL8366S only supports one port mirror set */
   949		if (val & dir)
   950		    return -EEXIST;
   951	
   952		/* If the other direction is active, allow setting up both
   953		 * directions for the same source and monitor ports
   954		 */
   955		if (val & (RTL8366S_PMCR_MIRROR_RX | RTL8366S_PMCR_MIRROR_TX)) {
   956			int source, monitor;
   957	
   958			source = FIELD_GET(RTL8366S_PMCR_SOURCE_MASK, val);
   959			monitor = FIELD_GET(RTL8366S_PMCR_MINITOR_MASK, val);
   960	
   961			if (source != port || monitor != mirror->to_local_port)
   962				return -EEXIST;
   963		} else {
   964			val &= ~RTL8366S_PMCR_SOURCE_MASK;
   965			val |= FIELD_PREP(RTL8366S_PMCR_SOURCE_MASK, port);
   966			val &= ~RTL8366S_PMCR_MINITOR_MASK;
   967			val |= FIELD_PREP(RTL8366S_PMCR_MINITOR_MASK,
   968			       mirror->to_local_port);
   969		}
   970	
   971		val |= dir;
   972	
   973		return regmap_write(smi->map, RTL8366S_PMCR, val);
   974	}
   975	
   976	static void rtl8366s_port_mirror_del(struct dsa_switch *ds, int port,
   977					     struct dsa_mall_mirror_tc_entry *mirror)
   978	{
   979		struct realtek_smi *smi = ds->priv;
   980		unsigned int dir;
   981	
   982		dir = mirror->ingress ? RTL8366S_PMCR_MIRROR_RX : RTL8366S_PMCR_MIRROR_TX;
   983		regmap_update_bits(smi->map, RTL8366S_PMCR, dir, 0);
   984	}
   985	
   986	static int rtl8366s_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
   987	{
   988		struct realtek_smi *smi = ds->priv;
   989		u32 len;
   990	
   991		/* When a new MTU is set, DSA always set the CPU port's MTU to the
   992		 * largest MTU of the slave ports. Because the switch only has a global
   993		 * max length register, only allowing CPU port here is enough.
   994		 */
   995		if (port != RTL8366S_PORT_NUM_CPU)
   996			return 0;
   997	
   998		/* Includes Ethernet header and FCS length.
   999		 *
  1000		 * Note that the CPU tag does not count towards its length, the
  1001		 * same reason why the frame must be padded _before_ inserting
  1002		 * the CPU tag on xmit.
  1003		 */
  1004		new_mtu += ETH_HLEN + ETH_FCS_LEN;
  1005		if (new_mtu <= 1522)
  1006			len = RTL8366S_SGCR_MAX_LENGTH_1522;
  1007		else if (new_mtu <= 1536)
  1008			len = RTL8366S_SGCR_MAX_LENGTH_1536;
  1009		else if (new_mtu <= 1552)
  1010			len = RTL8366S_SGCR_MAX_LENGTH_1552;
  1011		else
  1012			len = RTL8366S_SGCR_MAX_LENGTH_16000;
  1013	
  1014		return regmap_update_bits(smi->map, RTL8366S_SGCR,
  1015					  RTL8366S_SGCR_MAX_LENGTH_MASK,
  1016					  len);
  1017	}
  1018	
  1019	static int rtl8366s_port_max_mtu(struct dsa_switch *ds, int port)
  1020	{
  1021		return 16000 - ETH_HLEN - ETH_FCS_LEN;
  1022	}
  1023	
  1024	static int rtl8366s_port_lag_change(struct dsa_switch *ds, int port)
  1025	{
  1026		const struct dsa_port *dp = dsa_to_port(ds, port);
  1027		struct realtek_smi *smi = ds->priv;
  1028		unsigned int val;
  1029	
  1030		val = FIELD_PREP(RTL8366S_LAGCR_PORTMAP_MASK, BIT(port));
  1031	
  1032		return regmap_update_bits(smi->map, RTL8366S_LAGCR, val,
  1033					  dp->lag_tx_enabled ? val : 0);
  1034	}
  1035	
  1036	static int rtl8366s_port_lag_join(struct dsa_switch *ds, int port,
  1037					  struct net_device *lag,
  1038					  struct netdev_lag_upper_info *info)
  1039	{
  1040		struct realtek_smi *smi = ds->priv;
  1041		const struct dsa_port *dp;
  1042		unsigned int val;
  1043		int count = 0;
  1044	
  1045		/* Only supports hash type */
  1046		if (info->tx_type != NETDEV_LAG_TX_TYPE_HASH)
  1047			return -EOPNOTSUPP;
  1048	
> 1049		list_for_each_entry(dp, dp->dst->ports, list) {
  1050			if (dp->lag_dev == lag)
  1051				count++;
  1052			/* Only supports 1 LAG set */
  1053			else if (dp->lag_dev)
  1054				return -EBUSY;
  1055		}
  1056	
  1057		/* Only supports maximum LAG member of 4 */
  1058		if (count >= 4)
  1059			return -ENOSPC;
  1060	
  1061		val = FIELD_PREP(RTL8366S_LAGCR_PORTMAP_MASK, BIT(port));
  1062	
  1063		return regmap_update_bits(smi->map, RTL8366S_LAGCR, val, val);
  1064	}
  1065	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 44328 bytes --]

  parent reply	other threads:[~2021-02-17  9:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17  6:21 [RFC net-next 0/2] DSA driver for Realtek RTL8366S/SR DENG Qingfang
2021-02-17  6:21 ` [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag DENG Qingfang
2021-02-17  7:07   ` Heiner Kallweit
2021-02-17 11:01     ` Linus Walleij
2021-02-17 11:28       ` Heiner Kallweit
2021-02-17 10:55   ` Linus Walleij
2021-02-17 12:28     ` DENG Qingfang
2021-02-27 23:47   ` Linus Walleij
2021-02-28 11:32     ` DENG Qingfang
2021-03-01 13:06       ` Linus Walleij
2021-02-17  6:21 ` [RFC net-next 2/2] net: dsa: add Realtek RTL8366S switch driver DENG Qingfang
2021-02-17  7:37   ` kernel test robot
2021-02-17  9:57   ` kernel test robot [this message]
2021-02-17 11:12   ` Linus Walleij
2021-02-17 12:45     ` DENG Qingfang
2021-02-17 12:25   ` Vladimir Oltean
2021-02-17 15:44     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202102171707.56Ey6miW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.