From: Andrew Lunn <andrew@lunn.ch>
To: Ioana Ciornei <ioana.ciornei@nxp.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
laurentiu.tudor@nxp.com, f.fainelli@gmail.com,
linux@armlinux.org.uk
Subject: Re: [PATCH net-next v3 2/5] bus: fsl-mc: add the fsl_mc_get_endpoint function
Date: Tue, 29 Oct 2019 02:45:23 +0100 [thread overview]
Message-ID: <20191029014523.GH15259@lunn.ch> (raw)
In-Reply-To: <1571998630-17108-3-git-send-email-ioana.ciornei@nxp.com>
> +struct fsl_mc_device *fsl_mc_get_endpoint(struct fsl_mc_device *mc_dev)
> +{
> + struct fsl_mc_device *mc_bus_dev, *endpoint;
> + struct fsl_mc_obj_desc endpoint_desc = { 0 };
> + struct dprc_endpoint endpoint1 = { 0 };
> + struct dprc_endpoint endpoint2 = { 0 };
> + int state, err;
> +
> + mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent);
> + strcpy(endpoint1.type, mc_dev->obj_desc.type);
> + endpoint1.id = mc_dev->obj_desc.id;
> +
> + err = dprc_get_connection(mc_bus_dev->mc_io, 0,
> + mc_bus_dev->mc_handle,
> + &endpoint1, &endpoint2,
> + &state);
> +
> + if (err == -ENOTCONN || state == -1)
> + return NULL;
> +
> + if (err < 0) {
> + dev_err(&mc_bus_dev->dev, "dprc_get_connection() = %d\n", err);
> + return NULL;
> + }
You could return these errors with ERR_PRT(err)
Andrew
next prev parent reply other threads:[~2019-10-29 1:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-25 10:17 [PATCH net-next v3 0/5] dpaa2-eth: add MAC/PHY support through phylink Ioana Ciornei
2019-10-25 10:17 ` [PATCH net-next v3 1/5] bus: fsl-mc: export device types present on the bus Ioana Ciornei
2019-10-25 10:17 ` [PATCH net-next v3 2/5] bus: fsl-mc: add the fsl_mc_get_endpoint function Ioana Ciornei
2019-10-29 1:45 ` Andrew Lunn [this message]
2019-10-29 9:26 ` Ioana Ciornei
2019-10-30 21:59 ` David Miller
2019-10-30 22:26 ` Ioana Ciornei
2019-10-25 10:17 ` [PATCH net-next v3 3/5] dpaa2-eth: update the TX frame queues on DPNI_IRQ_EVENT_ENDPOINT_CHANGED Ioana Ciornei
2019-10-25 10:17 ` [PATCH net-next v3 4/5] dpaa2-eth: add MAC/PHY support through phylink Ioana Ciornei
2019-10-29 1:55 ` Andrew Lunn
2019-10-25 10:17 ` [PATCH net-next v3 5/5] net: documentation: add docs for MAC/PHY support in DPAA2 Ioana Ciornei
2019-10-29 2:08 ` Andrew Lunn
2019-10-29 9:33 ` Ioana Ciornei
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=20191029014523.GH15259@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=ioana.ciornei@nxp.com \
--cc=laurentiu.tudor@nxp.com \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/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.