Re: [net-next PATCH v5 06/14] net: dsa: qca8k: rework rgmii delay logic and scan for cpu port 6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ansuel,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Ansuel-Smith/Multiple-improvement-for-qca8337-switch/20211011-093230
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 0182d0788cd66292cb1698b48dd21887d93c68ed
config: i386-randconfig-a001-20211010 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/480cd101b45a8cec7d336fafb1b6a11927094dff
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Ansuel-Smith/Multiple-improvement-for-qca8337-switch/20211011-093230
        git checkout 480cd101b45a8cec7d336fafb1b6a11927094dff
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/dsa/

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

All errors (new ones prefixed by >>):

   drivers/net/dsa/qca8k.c: In function 'qca8k_parse_port_config':
>> drivers/net/dsa/qca8k.c:1000:3: error: label at end of compound statement
    1000 |   default:
         |   ^~~~~~~


vim +1000 drivers/net/dsa/qca8k.c

   933	
   934	static int
   935	qca8k_parse_port_config(struct qca8k_priv *priv)
   936	{
   937		int port, cpu_port_index = 0;
   938		struct device_node *port_dn;
   939		phy_interface_t mode;
   940		struct dsa_port *dp;
   941		u32 delay;
   942	
   943		/* We have 2 CPU port. Check them */
   944		for (port = 0; port < QCA8K_NUM_PORTS; port++) {
   945			/* Skip every other port */
   946			if (port != 0 && port != 6)
   947				continue;
   948	
   949			dp = dsa_to_port(priv->ds, port);
   950			port_dn = dp->dn;
   951			cpu_port_index++;
   952	
   953			of_get_phy_mode(port_dn, &mode);
   954			switch (mode) {
   955			case PHY_INTERFACE_MODE_RGMII:
   956			case PHY_INTERFACE_MODE_RGMII_ID:
   957			case PHY_INTERFACE_MODE_RGMII_TXID:
   958			case PHY_INTERFACE_MODE_RGMII_RXID:
   959				delay = 0;
   960	
   961				if (!of_property_read_u32(port_dn, "tx-internal-delay-ps", &delay))
   962					/* Switch regs accept value in ns, convert ps to ns */
   963					delay = delay / 1000;
   964				else if (mode == PHY_INTERFACE_MODE_RGMII_ID ||
   965					 mode == PHY_INTERFACE_MODE_RGMII_TXID)
   966					delay = 1;
   967	
   968				if (delay > QCA8K_MAX_DELAY) {
   969					dev_err(priv->dev, "rgmii tx delay is limited to a max value of 3ns, setting to the max value");
   970					delay = 3;
   971				}
   972	
   973				priv->rgmii_tx_delay[cpu_port_index] = delay;
   974	
   975				delay = 0;
   976	
   977				if (!of_property_read_u32(port_dn, "rx-internal-delay-ps", &delay))
   978					/* Switch regs accept value in ns, convert ps to ns */
   979					delay = delay / 1000;
   980				else if (mode == PHY_INTERFACE_MODE_RGMII_ID ||
   981					 mode == PHY_INTERFACE_MODE_RGMII_RXID)
   982					delay = 2;
   983	
   984				if (delay > QCA8K_MAX_DELAY) {
   985					dev_err(priv->dev, "rgmii rx delay is limited to a max value of 3ns, setting to the max value");
   986					delay = 3;
   987				}
   988	
   989				priv->rgmii_rx_delay[cpu_port_index] = delay;
   990	
   991				break;
   992			case PHY_INTERFACE_MODE_SGMII:
   993				if (of_property_read_bool(port_dn, "qca,sgmii-txclk-falling-edge"))
   994					priv->sgmii_tx_clk_falling_edge = true;
   995	
   996				if (of_property_read_bool(port_dn, "qca,sgmii-rxclk-falling-edge"))
   997					priv->sgmii_rx_clk_falling_edge = true;
   998	
   999				break;
> 1000			default:
  1001			}
  1002		}
  1003	
  1004		return 0;
  1005	}
  1006	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux