From: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Lei Wei <quic_leiwei@quicinc.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"Rob Herring" <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>, <netdev@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-msm@vger.kernel.org>, <quic_kkumarcs@quicinc.com>,
<quic_suruchia@quicinc.com>, <quic_pavir@quicinc.com>,
<quic_linchen@quicinc.com>, <quic_luoj@quicinc.com>,
<srinivas.kandagatla@linaro.org>,
<bartosz.golaszewski@linaro.org>, <vsmuthu@qti.qualcomm.com>,
<john@phrozen.org>
Subject: Re: [PATCH net-next v3 3/5] net: pcs: qcom-ipq9574: Add PCS instantiation and phylink operations
Date: Tue, 24 Dec 2024 14:46:52 +0530 [thread overview]
Message-ID: <db61cf6e-24a9-4b99-b4f0-4871f7fefae8@quicinc.com> (raw)
In-Reply-To: <yfh7kghxy5hjblnzlapcpzj54chep45pjkgpvelzbp4ijuq7ci@e6te6c36mkxc>
On 12/24/2024 12:45 PM, Dmitry Baryshkov wrote:
> On Tue, Dec 24, 2024 at 12:29:56PM +0530, Manikanta Mylavarapu wrote:
>>
>>
>> On 12/16/2024 7:10 PM, Lei Wei wrote:
>>> This patch adds the following PCS functionality for the PCS driver
>>> for IPQ9574 SoC:
>>>
>>> a.) Parses PCS MII DT nodes and instantiate each MII PCS instance.
>>> b.) Exports PCS instance get and put APIs. The network driver calls
>>> the PCS get API to get and associate the PCS instance with the port
>>> MAC.
>>> c.) PCS phylink operations for SGMII/QSGMII interface modes.
>>>
>>> Signed-off-by: Lei Wei <quic_leiwei@quicinc.com>
>>> ---
>>> drivers/net/pcs/pcs-qcom-ipq9574.c | 463 +++++++++++++++++++++++++++++++++++
>>> include/linux/pcs/pcs-qcom-ipq9574.h | 16 ++
>>> 2 files changed, 479 insertions(+)
>>>
>
>>> +
>>> +/* Parse the PCS MII DT nodes which are child nodes of the PCS node,
>>> + * and instantiate each MII PCS instance.
>>> + */
>>> +static int ipq_pcs_create_miis(struct ipq_pcs *qpcs)
>>> +{
>>> + struct device *dev = qpcs->dev;
>>> + struct ipq_pcs_mii *qpcs_mii;
>>> + struct device_node *mii_np;
>>> + u32 index;
>>> + int ret;
>>> +
>>> + for_each_available_child_of_node(dev->of_node, mii_np) {
>>> + ret = of_property_read_u32(mii_np, "reg", &index);
>>> + if (ret) {
>>> + dev_err(dev, "Failed to read MII index\n");
>>> + of_node_put(mii_np);
>>
>> Assume, the second child node failed here.
>> Returning without calling the first child node of_node_put().
>>
>> Please clear the previous child nodes resources before return.
>
> s/clear child nodes/put OF nodes/
>
> Note, for_each_available_child_of_node() handles refcounting for
> the nodes that we looped through. So, I don't think the comment is
> valid. If I missed something, please expand your comment.
>
Yes, you are correct. for_each_available_child_of_node() handles the
refcount. I am dropping my comment.
> P.S. Please also trim your messages. There is no need to resend the
> whole patch if you are commenting a single function.
>
Got it. Thank you for your input.
Thanks & Regards,
Manikanta.
next prev parent reply other threads:[~2024-12-24 9:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-16 13:40 [PATCH net-next v3 0/5] Add PCS support for Qualcomm IPQ9574 SoC Lei Wei
2024-12-16 13:40 ` [PATCH net-next v3 1/5] dt-bindings: net: pcs: Add Ethernet PCS " Lei Wei
2024-12-22 8:20 ` Krzysztof Kozlowski
2024-12-25 13:49 ` Lei Wei
2024-12-16 13:40 ` [PATCH net-next v3 2/5] net: pcs: Add PCS driver " Lei Wei
2024-12-23 23:22 ` kernel test robot
2024-12-16 13:40 ` [PATCH net-next v3 3/5] net: pcs: qcom-ipq9574: Add PCS instantiation and phylink operations Lei Wei
2024-12-24 6:59 ` Manikanta Mylavarapu
2024-12-24 7:15 ` Dmitry Baryshkov
2024-12-24 9:16 ` Manikanta Mylavarapu [this message]
2024-12-24 15:41 ` Andrew Lunn
2025-01-02 10:54 ` Russell King (Oracle)
2025-01-03 10:14 ` Lei Wei
2024-12-16 13:40 ` [PATCH net-next v3 4/5] net: pcs: qcom-ipq9574: Add USXGMII interface mode support Lei Wei
2024-12-20 21:49 ` Jakub Kicinski
2024-12-25 13:47 ` Lei Wei
2024-12-16 13:40 ` [PATCH net-next v3 5/5] MAINTAINERS: Add maintainer for Qualcomm IPQ9574 PCS driver Lei Wei
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=db61cf6e-24a9-4b99-b4f0-4871f7fefae8@quicinc.com \
--to=quic_mmanikan@quicinc.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=bartosz.golaszewski@linaro.org \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=john@phrozen.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_kkumarcs@quicinc.com \
--cc=quic_leiwei@quicinc.com \
--cc=quic_linchen@quicinc.com \
--cc=quic_luoj@quicinc.com \
--cc=quic_pavir@quicinc.com \
--cc=quic_suruchia@quicinc.com \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=vsmuthu@qti.qualcomm.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