linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: alexandru.ardelean@analog.com
Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, peppe.cavallaro@st.com,
	alexandre.torgue@st.com, joabreu@synopsys.com,
	mcoquelin.stm32@gmail.com
Subject: Re: [PATCH] net: stmmac: socfpga: re-use the `interface` parameter from platform data
Date: Tue, 10 Sep 2019 17:46:53 +0200 (CEST)	[thread overview]
Message-ID: <20190910.174653.800353422834551780.davem@davemloft.net> (raw)
In-Reply-To: <20190910.174544.945128884852877943.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Tue, 10 Sep 2019 17:45:44 +0200 (CEST)

> From: Alexandru Ardelean <alexandru.ardelean@analog.com>
> Date: Fri, 6 Sep 2019 15:30:54 +0300
> 
>> The socfpga sub-driver defines an `interface` field in the `socfpga_dwmac`
>> struct and parses it on init.
>> 
>> The shared `stmmac_probe_config_dt()` function also parses this from the
>> device-tree and makes it available on the returned `plat_data` (which is
>> the same data available via `netdev_priv()`).
>> 
>> All that's needed now is to dig that information out, via some
>> `dev_get_drvdata()` && `netdev_priv()` calls and re-use it.
>> 
>> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> 
> This doesn't build even on net-next.

Specifically:

drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c: In function ‘socfpga_gen5_set_phy_mode’:
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:264:44: error: ‘phymode’ undeclared (first use in this function); did you mean ‘phy_modes’?
  264 |   dev_err(dwmac->dev, "bad phy mode %d\n", phymode);
      |                                            ^~~~~~~
./include/linux/device.h:1499:32: note: in definition of macro ‘dev_err’
 1499 |  _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:264:44: note: each undeclared identifier is reported only once for each function it appears in
  264 |   dev_err(dwmac->dev, "bad phy mode %d\n", phymode);
      |                                            ^~~~~~~
./include/linux/device.h:1499:32: note: in definition of macro ‘dev_err’
 1499 |  _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                ^~~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c: In function ‘socfpga_gen10_set_phy_mode’:
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:340:6: error: ‘phymode’ undeclared (first use in this function); did you mean ‘phy_modes’?
  340 |      phymode == PHY_INTERFACE_MODE_MII ||
      |      ^~~~~~~
      |      phy_modes

  reply	other threads:[~2019-09-10 15:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 12:30 [PATCH] net: stmmac: socfpga: re-use the `interface` parameter from platform data Alexandru Ardelean
2019-09-07 12:54 ` kbuild test robot
2019-09-09  8:53   ` Ardelean, Alexandru
2019-10-09  8:05     ` [kbuild-all] " Rong Chen
2019-09-10 15:45 ` David Miller
2019-09-10 15:46   ` David Miller [this message]
2019-09-11  5:03     ` Ardelean, Alexandru

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=20190910.174653.800353422834551780.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexandre.torgue@st.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=joabreu@synopsys.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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 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).