From: Andrew Lunn <andrew@lunn.ch>
To: Jonathan Lemon <jonathan.lemon@gmail.com>
Cc: f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com,
hkallweit1@gmail.com, richardcochran@gmail.com,
lasse@timebeat.app, netdev@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH net-next v2 1/3] net: phy: broadcom: Add PTP support for some Broadcom PHYs.
Date: Sat, 30 Apr 2022 16:55:22 +0200 [thread overview]
Message-ID: <Ym1N2sINE0A6WchK@lunn.ch> (raw)
In-Reply-To: <20220430025723.1037573-2-jonathan.lemon@gmail.com>
> +struct bcm_ptp_private *bcm_ptp_probe(struct phy_device *phydev)
> +{
> + struct bcm_ptp_private *priv;
> + struct ptp_clock *clock;
> +
> + switch (BRCM_PHY_MODEL(phydev)) {
> + case PHY_ID_BCM54210E:
> + break;
> + default:
> + return NULL;
> + }
> +
> + priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL);
> + if (!priv)
> + return ERR_PTR(-ENOMEM);
> +
> + priv->ptp_info = bcm_ptp_clock_info;
> +
> + clock = ptp_clock_register(&priv->ptp_info, &phydev->mdio.dev);
> + if (IS_ERR(clock))
> + return (void *)clock;
nit-pick:
You could use ERR_CAST() here.
Andrew
next prev parent reply other threads:[~2022-04-30 14:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-30 2:57 [PATCH net-next v2 0/3] Broadcom PTP PHY support Jonathan Lemon
2022-04-30 2:57 ` [PATCH net-next v2 1/3] net: phy: broadcom: Add PTP support for some Broadcom PHYs Jonathan Lemon
2022-04-30 14:55 ` Andrew Lunn [this message]
2022-05-02 9:55 ` Paolo Abeni
2022-04-30 2:57 ` [PATCH net-next v2 2/3] net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib Jonathan Lemon
2022-04-30 2:57 ` [PATCH net-next v2 3/3] net: phy: broadcom: Hook up the PTP PHY functions Jonathan Lemon
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=Ym1N2sINE0A6WchK@lunn.ch \
--to=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=jonathan.lemon@gmail.com \
--cc=kernel-team@fb.com \
--cc=lasse@timebeat.app \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.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).