All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: sean.wang@mediatek.com
Cc: kbuild-all@01.org, andrew@lunn.ch, f.fainelli@gmail.com,
	vivien.didelot@savoirfairelinux.com, matthias.bgg@gmail.com,
	robh+dt@kernel.org, mark.rutland@arm.com,
	devicetree@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	davem@davemloft.net, sean.wang@mediatek.com,
	Landen.Chao@mediatek.com, keyhaede@gmail.com, objelf@gmail.com
Subject: Re: [PATCH net-next 4/4] net-next: dsa: add dsa support for Mediatek MT7530 switch
Date: Wed, 15 Mar 2017 10:30:21 +0800	[thread overview]
Message-ID: <201703151026.Qi6VgBbA%fengguang.wu@intel.com> (raw)
In-Reply-To: <1489421488-300-5-git-send-email-sean.wang@mediatek.com>

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

Hi Sean,

[auto build test WARNING on robh/for-next]
[also build test WARNING on v4.11-rc2 next-20170310]
[cannot apply to net-next/master net/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/sean-wang-mediatek-com/dt-bindings-net-dsa-add-Mediatek-MT7530-binding/20170315-083834
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/net/dsa/mt7530.c: In function 'mt7530_probe':
   drivers/net/dsa/mt7530.c:1076:27: warning: unused variable 'mdio' [-Wunused-variable]
     struct device_node *dn, *mdio;
                              ^~~~
   drivers/net/dsa/mt7530.c: In function 'mt7530_remove':
>> drivers/net/dsa/mt7530.c:1173:9: warning: 'return' with a value, in function returning void
     return ret;
            ^~~
   drivers/net/dsa/mt7530.c:1153:1: note: declared here
    mt7530_remove(struct mdio_device *mdiodev)
    ^~~~~~~~~~~~~

vim +/return +1173 drivers/net/dsa/mt7530.c

  1070	};
  1071	
  1072	static int
  1073	mt7530_probe(struct mdio_device *mdiodev)
  1074	{
  1075		struct mt7530_priv *priv;
> 1076		struct device_node *dn, *mdio;
  1077		int ret;
  1078		const char *pm;
  1079	
  1080		dn = mdiodev->dev.of_node;
  1081	
  1082		priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL);
  1083		if (!priv)
  1084			return -ENOMEM;
  1085	
  1086		priv->ds = devm_kzalloc(&mdiodev->dev, sizeof(*priv->ds), GFP_KERNEL);
  1087		if (!priv->ds)
  1088			return -ENOMEM;
  1089	
  1090		/* Use medatek,mcm property to distinguish hardware type that would
  1091		 * casues a little bit differences on power-on sequence.
  1092		 */
  1093		ret = of_property_read_string(dn, "mediatek,mcm", &pm);
  1094		if (!ret && !strcasecmp(pm, "enabled")) {
  1095			priv->mcm = true;
  1096			dev_info(&mdiodev->dev, "MT7530 adapts as multi-chip module\n");
  1097		}
  1098	
  1099		priv->core_pwr = devm_regulator_get(&mdiodev->dev, "core");
  1100		if (IS_ERR(priv->core_pwr))
  1101			return PTR_ERR(priv->core_pwr);
  1102	
  1103		priv->io_pwr = devm_regulator_get(&mdiodev->dev, "io");
  1104		if (IS_ERR(priv->io_pwr))
  1105			return PTR_ERR(priv->io_pwr);
  1106	
  1107		/* MT7530 shares the certain address space with Mediatek Ethernet
  1108		 * driver for controling TRGMII. Here we create syscon regmap for
  1109		 * access and control these parameters up on TRGMII.
  1110		 */
  1111		priv->ethsys = syscon_regmap_lookup_by_phandle(dn,
  1112							       "mediatek,ethsys");
  1113		if (IS_ERR(priv->ethsys))
  1114			return PTR_ERR(priv->ethsys);
  1115	
  1116		priv->ethernet = syscon_regmap_lookup_by_phandle(dn,
  1117							       "mediatek,ethernet");
  1118		if (IS_ERR(priv->ethernet))
  1119			return PTR_ERR(priv->ethernet);
  1120	
  1121		/* Not MCM that indicates switch works as the remote standalone
  1122		 * integrated circuit so the GPIO pin would be used to complete
  1123		 * the reset, otherwise memory-mapped register accessing used
  1124		 * through syscon provides in the case of MCM.
  1125		 */
  1126		if (!priv->mcm) {
  1127			priv->reset = of_get_named_gpio(dn, "mediatek,reset-pin", 0);
  1128			if (!gpio_is_valid(priv->reset))
  1129				return priv->reset;
  1130	
  1131			ret = devm_gpio_request_one(&mdiodev->dev,
  1132						    priv->reset, GPIOF_OUT_INIT_LOW,
  1133						    "mediatek,reset-pin");
  1134			if (ret < 0) {
  1135				dev_err(&mdiodev->dev,
  1136					"fail to devm_gpio_request reset\n");
  1137				return ret;
  1138			}
  1139		}
  1140	
  1141		priv->bus = mdiodev->bus;
  1142		priv->dev = &mdiodev->dev;
  1143		priv->ds->priv = priv;
  1144		priv->ds->dev = &mdiodev->dev;
  1145		priv->ds->ops = &mt7530_switch_ops;
  1146		mutex_init(&priv->reg_mutex);
  1147		dev_set_drvdata(&mdiodev->dev, priv);
  1148	
  1149		return dsa_register_switch(priv->ds, priv->ds->dev->of_node);
  1150	}
  1151	
  1152	static void
  1153	mt7530_remove(struct mdio_device *mdiodev)
  1154	{
  1155		struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
  1156		int ret = 0;
  1157	
  1158		ret = regulator_disable(priv->core_pwr);
  1159		if (ret < 0) {
  1160			dev_err(priv->dev,
  1161				"Failed to disable core power: %d\n", ret);
  1162			goto err;
  1163		}
  1164	
  1165		ret = regulator_disable(priv->io_pwr);
  1166		if (ret < 0)
  1167			dev_err(&mdiodev->dev, "Failed to disable io pwr: %d\n",
  1168				ret);
  1169	
  1170		dsa_unregister_switch(priv->ds);
  1171		mutex_destroy(&priv->reg_mutex);
  1172	err:
> 1173		return ret;
  1174	}
  1175	
  1176	static const struct of_device_id mt7530_of_match[] = {

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

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

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, andrew@lunn.ch, f.fainelli@gmail.com,
	vivien.didelot@savoirfairelinux.com, matthias.bgg@gmail.com,
	robh+dt@kernel.org, mark.rutland@arm.com,
	devicetree@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	davem@davemloft.net, sean.wang@mediatek.com,
	Landen.Chao@mediatek.com, keyhaede@gmail.com, objelf@gmail.com
Subject: Re: [PATCH net-next 4/4] net-next: dsa: add dsa support for Mediatek MT7530 switch
Date: Wed, 15 Mar 2017 10:30:21 +0800	[thread overview]
Message-ID: <201703151026.Qi6VgBbA%fengguang.wu@intel.com> (raw)
In-Reply-To: <1489421488-300-5-git-send-email-sean.wang@mediatek.com>

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

Hi Sean,

[auto build test WARNING on robh/for-next]
[also build test WARNING on v4.11-rc2 next-20170310]
[cannot apply to net-next/master net/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/sean-wang-mediatek-com/dt-bindings-net-dsa-add-Mediatek-MT7530-binding/20170315-083834
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/net/dsa/mt7530.c: In function 'mt7530_probe':
   drivers/net/dsa/mt7530.c:1076:27: warning: unused variable 'mdio' [-Wunused-variable]
     struct device_node *dn, *mdio;
                              ^~~~
   drivers/net/dsa/mt7530.c: In function 'mt7530_remove':
>> drivers/net/dsa/mt7530.c:1173:9: warning: 'return' with a value, in function returning void
     return ret;
            ^~~
   drivers/net/dsa/mt7530.c:1153:1: note: declared here
    mt7530_remove(struct mdio_device *mdiodev)
    ^~~~~~~~~~~~~

vim +/return +1173 drivers/net/dsa/mt7530.c

  1070	};
  1071	
  1072	static int
  1073	mt7530_probe(struct mdio_device *mdiodev)
  1074	{
  1075		struct mt7530_priv *priv;
> 1076		struct device_node *dn, *mdio;
  1077		int ret;
  1078		const char *pm;
  1079	
  1080		dn = mdiodev->dev.of_node;
  1081	
  1082		priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL);
  1083		if (!priv)
  1084			return -ENOMEM;
  1085	
  1086		priv->ds = devm_kzalloc(&mdiodev->dev, sizeof(*priv->ds), GFP_KERNEL);
  1087		if (!priv->ds)
  1088			return -ENOMEM;
  1089	
  1090		/* Use medatek,mcm property to distinguish hardware type that would
  1091		 * casues a little bit differences on power-on sequence.
  1092		 */
  1093		ret = of_property_read_string(dn, "mediatek,mcm", &pm);
  1094		if (!ret && !strcasecmp(pm, "enabled")) {
  1095			priv->mcm = true;
  1096			dev_info(&mdiodev->dev, "MT7530 adapts as multi-chip module\n");
  1097		}
  1098	
  1099		priv->core_pwr = devm_regulator_get(&mdiodev->dev, "core");
  1100		if (IS_ERR(priv->core_pwr))
  1101			return PTR_ERR(priv->core_pwr);
  1102	
  1103		priv->io_pwr = devm_regulator_get(&mdiodev->dev, "io");
  1104		if (IS_ERR(priv->io_pwr))
  1105			return PTR_ERR(priv->io_pwr);
  1106	
  1107		/* MT7530 shares the certain address space with Mediatek Ethernet
  1108		 * driver for controling TRGMII. Here we create syscon regmap for
  1109		 * access and control these parameters up on TRGMII.
  1110		 */
  1111		priv->ethsys = syscon_regmap_lookup_by_phandle(dn,
  1112							       "mediatek,ethsys");
  1113		if (IS_ERR(priv->ethsys))
  1114			return PTR_ERR(priv->ethsys);
  1115	
  1116		priv->ethernet = syscon_regmap_lookup_by_phandle(dn,
  1117							       "mediatek,ethernet");
  1118		if (IS_ERR(priv->ethernet))
  1119			return PTR_ERR(priv->ethernet);
  1120	
  1121		/* Not MCM that indicates switch works as the remote standalone
  1122		 * integrated circuit so the GPIO pin would be used to complete
  1123		 * the reset, otherwise memory-mapped register accessing used
  1124		 * through syscon provides in the case of MCM.
  1125		 */
  1126		if (!priv->mcm) {
  1127			priv->reset = of_get_named_gpio(dn, "mediatek,reset-pin", 0);
  1128			if (!gpio_is_valid(priv->reset))
  1129				return priv->reset;
  1130	
  1131			ret = devm_gpio_request_one(&mdiodev->dev,
  1132						    priv->reset, GPIOF_OUT_INIT_LOW,
  1133						    "mediatek,reset-pin");
  1134			if (ret < 0) {
  1135				dev_err(&mdiodev->dev,
  1136					"fail to devm_gpio_request reset\n");
  1137				return ret;
  1138			}
  1139		}
  1140	
  1141		priv->bus = mdiodev->bus;
  1142		priv->dev = &mdiodev->dev;
  1143		priv->ds->priv = priv;
  1144		priv->ds->dev = &mdiodev->dev;
  1145		priv->ds->ops = &mt7530_switch_ops;
  1146		mutex_init(&priv->reg_mutex);
  1147		dev_set_drvdata(&mdiodev->dev, priv);
  1148	
  1149		return dsa_register_switch(priv->ds, priv->ds->dev->of_node);
  1150	}
  1151	
  1152	static void
  1153	mt7530_remove(struct mdio_device *mdiodev)
  1154	{
  1155		struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
  1156		int ret = 0;
  1157	
  1158		ret = regulator_disable(priv->core_pwr);
  1159		if (ret < 0) {
  1160			dev_err(priv->dev,
  1161				"Failed to disable core power: %d\n", ret);
  1162			goto err;
  1163		}
  1164	
  1165		ret = regulator_disable(priv->io_pwr);
  1166		if (ret < 0)
  1167			dev_err(&mdiodev->dev, "Failed to disable io pwr: %d\n",
  1168				ret);
  1169	
  1170		dsa_unregister_switch(priv->ds);
  1171		mutex_destroy(&priv->reg_mutex);
  1172	err:
> 1173		return ret;
  1174	}
  1175	
  1176	static const struct of_device_id mt7530_of_match[] = {

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

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

  parent reply	other threads:[~2017-03-15  2:30 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13 16:11 [PATCH net-next 0/4] net-next: dsa: add Mediatek MT7530 support sean.wang
2017-03-13 16:11 ` sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-03-13 16:11 ` sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-03-13 16:11 ` [PATCH net-next 1/4] dt-bindings: net: dsa: add Mediatek MT7530 binding sean.wang
2017-03-13 16:11   ` sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-03-13 16:11   ` sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-03-13 16:36   ` Andrew Lunn
2017-03-13 16:36     ` Andrew Lunn
2017-03-14  6:06     ` Sean Wang
2017-03-14  6:06       ` Sean Wang
2017-03-14  6:06       ` Sean Wang
2017-03-13 16:47   ` Florian Fainelli
2017-03-13 16:47     ` Florian Fainelli
2017-03-14  6:52     ` Sean Wang
2017-03-14  6:52       ` Sean Wang
2017-03-14 11:58       ` Andrew Lunn
2017-03-14 11:58         ` Andrew Lunn
2017-03-13 16:11 ` [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler sean.wang
2017-03-13 16:11   ` sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-03-13 16:11   ` sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-03-13 16:27   ` Andrew Lunn
2017-03-13 16:27     ` Andrew Lunn
2017-03-13 16:35   ` Florian Fainelli
2017-03-13 16:35     ` Florian Fainelli
2017-03-14  6:16     ` Sean Wang
2017-03-14  6:16       ` Sean Wang
2017-03-13 16:59   ` Vivien Didelot
2017-03-13 16:59     ` Vivien Didelot
2017-03-14  6:22     ` Sean Wang
2017-03-14  6:22       ` Sean Wang
2017-03-14 13:38       ` Vivien Didelot
2017-03-14 13:38         ` Vivien Didelot
2017-03-13 16:11 ` [PATCH net-next 3/4] net-next: ethernet: mediatek: add CDM able to recognize the tag for DSA sean.wang
2017-03-13 16:11   ` sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-03-13 16:11   ` sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-03-13 16:30   ` Andrew Lunn
2017-03-13 16:39   ` Florian Fainelli
2017-03-13 16:11 ` [PATCH net-next 4/4] net-next: dsa: add dsa support for Mediatek MT7530 switch sean.wang
2017-03-13 16:11   ` sean.wang
2017-03-13 16:41   ` Andrew Lunn
2017-03-13 16:41     ` Andrew Lunn
2017-03-13 23:11   ` Andrew Lunn
2017-03-13 23:11     ` Andrew Lunn
2017-03-14  7:03     ` Sean Wang
2017-03-14  7:03       ` Sean Wang
2017-03-14  7:03       ` Sean Wang
2017-03-15  2:20   ` kbuild test robot
2017-03-15  2:20     ` kbuild test robot
2017-03-15  2:20     ` kbuild test robot
2017-03-15  2:30   ` kbuild test robot [this message]
2017-03-15  2:30     ` kbuild test robot
2017-03-13 16:25 ` [PATCH net-next 0/4] net-next: dsa: add Mediatek MT7530 support John Crispin
2017-03-13 16:25   ` John Crispin

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=201703151026.Qi6VgBbA%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=Landen.Chao@mediatek.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=keyhaede@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=objelf@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=vivien.didelot@savoirfairelinux.com \
    /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.