From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] net: fec_mxc: simplify fec_get_miibus
Date: Tue, 20 Mar 2018 09:49:32 +0100 [thread overview]
Message-ID: <20180320094932.45c38802@karo-electronics.de> (raw)
In-Reply-To: <20180310011957.21801-2-peng.fan@nxp.com>
Hi,
On Sat, 10 Mar 2018 09:19:54 +0800 Peng Fan wrote:
> No need to provide two prototype for this function.
> Use ulong for the first parameter, then this function
> could be shared for DM/non DM case.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/net/fec_mxc.c | 13 ++-----------
> include/netdev.h | 6 +-----
> 2 files changed, 3 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> index 7c396d8d95..2bd4ba4ef1 100644
> --- a/drivers/net/fec_mxc.c
> +++ b/drivers/net/fec_mxc.c
> @@ -1021,18 +1021,9 @@ static void fec_free_descs(struct fec_priv *fec)
> free(fec->tbd_base);
> }
>
> -#ifdef CONFIG_DM_ETH
> -struct mii_dev *fec_get_miibus(struct udevice *dev, int dev_id)
> -#else
> -struct mii_dev *fec_get_miibus(uint32_t base_addr, int dev_id)
> -#endif
> +struct mii_dev *fec_get_miibus(ulong base_addr, int dev_id)
> {
> -#ifdef CONFIG_DM_ETH
> - struct fec_priv *priv = dev_get_priv(dev);
> - struct ethernet_regs *eth = priv->eth;
> -#else
> struct ethernet_regs *eth = (struct ethernet_regs *)(ulong)base_addr;
>
The (ulong) is redundant here.
Lothar Waßmann
next prev parent reply other threads:[~2018-03-20 8:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-10 1:19 [U-Boot] [PATCH 1/5] net: fec_mxc: Fix DM driver issue in recv Peng Fan
2018-03-10 1:19 ` [U-Boot] [PATCH 2/5] net: fec_mxc: simplify fec_get_miibus Peng Fan
2018-03-19 21:18 ` Joe Hershberger
2018-03-20 8:49 ` Lothar Waßmann [this message]
2018-03-20 9:29 ` Peng Fan
2018-03-21 19:13 ` Joe Hershberger
2018-03-21 19:20 ` Joe Hershberger
2018-03-10 1:19 ` [U-Boot] [PATCH 3/5] net: fec: set dev->seq to priv->dev_id Peng Fan
2018-03-19 21:19 ` Joe Hershberger
2018-03-10 1:19 ` [U-Boot] [PATCH 4/5] net: fec: sharing MDIO for two enet controllers Peng Fan
2018-03-19 21:21 ` Joe Hershberger
2018-03-20 8:51 ` Lothar Waßmann
2018-03-21 1:59 ` Peng Fan
2018-03-10 1:19 ` [U-Boot] [PATCH 5/5] net: fex_mxc: add i.MX6UL/SX/SL compatible Peng Fan
2018-03-19 21:21 ` Joe Hershberger
2018-03-19 21:17 ` [U-Boot] [PATCH 1/5] net: fec_mxc: Fix DM driver issue in recv Joe Hershberger
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=20180320094932.45c38802@karo-electronics.de \
--to=lw@karo-electronics.de \
--cc=u-boot@lists.denx.de \
/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