linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [arm:cex7 77/92] drivers/net/ethernet/mscc/ocelot_board.c:301:4: error: label 'out_put_ports' used but not defined
@ 2019-11-23  0:21 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-11-23  0:21 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Russell King, kbuild-all, linux-arm-kernel

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

tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git cex7
head:   94acdd2f6c845310f7fa6483df7d958ad9a32ed2
commit: 9227d25284083a0ca12ec9b44ddcc9049ace6d81 [77/92] net: of_get_phy_mode: Change API to solve int/unit warnings
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 9227d25284083a0ca12ec9b44ddcc9049ace6d81
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sh 

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

All errors (new ones prefixed by >>):

   drivers/net/ethernet/mscc/ocelot_board.c: In function 'mscc_ocelot_probe':
>> drivers/net/ethernet/mscc/ocelot_board.c:301:4: error: label 'out_put_ports' used but not defined
       goto out_put_ports;
       ^~~~

vim +/out_put_ports +301 drivers/net/ethernet/mscc/ocelot_board.c

   171	
   172	static int mscc_ocelot_probe(struct platform_device *pdev)
   173	{
   174		int err, irq;
   175		unsigned int i;
   176		struct device_node *np = pdev->dev.of_node;
   177		struct device_node *ports, *portnp;
   178		struct ocelot *ocelot;
   179		struct regmap *hsio;
   180		u32 val;
   181	
   182		struct {
   183			enum ocelot_target id;
   184			char *name;
   185		} res[] = {
   186			{ SYS, "sys" },
   187			{ REW, "rew" },
   188			{ QSYS, "qsys" },
   189			{ ANA, "ana" },
   190			{ QS, "qs" },
   191			{ S2, "s2" },
   192		};
   193	
   194		if (!np && !pdev->dev.platform_data)
   195			return -ENODEV;
   196	
   197		ocelot = devm_kzalloc(&pdev->dev, sizeof(*ocelot), GFP_KERNEL);
   198		if (!ocelot)
   199			return -ENOMEM;
   200	
   201		platform_set_drvdata(pdev, ocelot);
   202		ocelot->dev = &pdev->dev;
   203	
   204		for (i = 0; i < ARRAY_SIZE(res); i++) {
   205			struct regmap *target;
   206	
   207			target = ocelot_io_platform_init(ocelot, pdev, res[i].name);
   208			if (IS_ERR(target))
   209				return PTR_ERR(target);
   210	
   211			ocelot->targets[res[i].id] = target;
   212		}
   213	
   214		hsio = syscon_regmap_lookup_by_compatible("mscc,ocelot-hsio");
   215		if (IS_ERR(hsio)) {
   216			dev_err(&pdev->dev, "missing hsio syscon\n");
   217			return PTR_ERR(hsio);
   218		}
   219	
   220		ocelot->targets[HSIO] = hsio;
   221	
   222		err = ocelot_chip_init(ocelot);
   223		if (err)
   224			return err;
   225	
   226		irq = platform_get_irq_byname(pdev, "xtr");
   227		if (irq < 0)
   228			return -ENODEV;
   229	
   230		err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
   231						ocelot_xtr_irq_handler, IRQF_ONESHOT,
   232						"frame extraction", ocelot);
   233		if (err)
   234			return err;
   235	
   236		regmap_field_write(ocelot->regfields[SYS_RESET_CFG_MEM_INIT], 1);
   237		regmap_field_write(ocelot->regfields[SYS_RESET_CFG_MEM_ENA], 1);
   238	
   239		do {
   240			msleep(1);
   241			regmap_field_read(ocelot->regfields[SYS_RESET_CFG_MEM_INIT],
   242					  &val);
   243		} while (val);
   244	
   245		regmap_field_write(ocelot->regfields[SYS_RESET_CFG_MEM_ENA], 1);
   246		regmap_field_write(ocelot->regfields[SYS_RESET_CFG_CORE_ENA], 1);
   247	
   248		ocelot->num_cpu_ports = 1; /* 1 port on the switch, two groups */
   249	
   250		ports = of_get_child_by_name(np, "ethernet-ports");
   251		if (!ports) {
   252			dev_err(&pdev->dev, "no ethernet-ports child node found\n");
   253			return -ENODEV;
   254		}
   255	
   256		ocelot->num_phys_ports = of_get_child_count(ports);
   257	
   258		ocelot->ports = devm_kcalloc(&pdev->dev, ocelot->num_phys_ports,
   259					     sizeof(struct ocelot_port *), GFP_KERNEL);
   260	
   261		INIT_LIST_HEAD(&ocelot->multicast);
   262		ocelot_init(ocelot);
   263	
   264		for_each_available_child_of_node(ports, portnp) {
   265			struct device_node *phy_node;
   266			phy_interface_t phy_mode;
   267			struct phy_device *phy;
   268			struct resource *res;
   269			struct phy *serdes;
   270			void __iomem *regs;
   271			char res_name[8];
   272			u32 port;
   273	
   274			if (of_property_read_u32(portnp, "reg", &port))
   275				continue;
   276	
   277			snprintf(res_name, sizeof(res_name), "port%d", port);
   278	
   279			res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
   280							   res_name);
   281			regs = devm_ioremap_resource(&pdev->dev, res);
   282			if (IS_ERR(regs))
   283				continue;
   284	
   285			phy_node = of_parse_phandle(portnp, "phy-handle", 0);
   286			if (!phy_node)
   287				continue;
   288	
   289			phy = of_phy_find_device(phy_node);
   290			if (!phy)
   291				continue;
   292	
   293			err = ocelot_probe_port(ocelot, port, regs, phy);
   294			if (err) {
   295				of_node_put(portnp);
   296				return err;
   297			}
   298	
   299			err = of_get_phy_mode(portnp, &phy_mode);
   300			if (err && err != -ENODEV)
 > 301				goto out_put_ports;
   302	
   303			ocelot->ports[port]->phy_mode = phy_mode;
   304	
   305			switch (ocelot->ports[port]->phy_mode) {
   306			case PHY_INTERFACE_MODE_NA:
   307				continue;
   308			case PHY_INTERFACE_MODE_SGMII:
   309				break;
   310			case PHY_INTERFACE_MODE_QSGMII:
   311				/* Ensure clock signals and speed is set on all
   312				 * QSGMII links
   313				 */
   314				ocelot_port_writel(ocelot->ports[port],
   315						   DEV_CLOCK_CFG_LINK_SPEED
   316						   (OCELOT_SPEED_1000),
   317						   DEV_CLOCK_CFG);
   318				break;
   319			default:
   320				dev_err(ocelot->dev,
   321					"invalid phy mode for port%d, (Q)SGMII only\n",
   322					port);
   323				of_node_put(portnp);
   324				return -EINVAL;
   325			}
   326	
   327			serdes = devm_of_phy_get(ocelot->dev, portnp, NULL);
   328			if (IS_ERR(serdes)) {
   329				err = PTR_ERR(serdes);
   330				if (err == -EPROBE_DEFER)
   331					dev_dbg(ocelot->dev, "deferring probe\n");
   332				else
   333					dev_err(ocelot->dev,
   334						"missing SerDes phys for port%d\n",
   335						port);
   336	
   337				goto err_probe_ports;
   338			}
   339	
   340			ocelot->ports[port]->serdes = serdes;
   341		}
   342	
   343		register_netdevice_notifier(&ocelot_netdevice_nb);
   344		register_switchdev_notifier(&ocelot_switchdev_nb);
   345		register_switchdev_blocking_notifier(&ocelot_switchdev_blocking_nb);
   346	
   347		dev_info(&pdev->dev, "Ocelot switch probed\n");
   348	
   349		return 0;
   350	
   351	err_probe_ports:
   352		return err;
   353	}
   354	

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

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

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-23  0:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-23  0:21 [arm:cex7 77/92] drivers/net/ethernet/mscc/ocelot_board.c:301:4: error: label 'out_put_ports' used but not defined kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).