2023-11-15 13:45:04

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 1/9] net: mdio: ipq4019: increase eth_ldo_rdy for ipq5332 platform

> + for (ret = 0; ret < ETH_LDO_RDY_CNT; ret++) {
> + if (priv->eth_ldo_rdy[ret]) {
> + val = readl(priv->eth_ldo_rdy[ret]);
> + val |= BIT(0);
> + writel(val, priv->eth_ldo_rdy[ret]);
> + fsleep(IPQ_PHY_SET_DELAY_US);
> + }

Please add a new variable, rather than use ret this way.

> + for (ret = 0; ret < ETH_LDO_RDY_CNT; ret++) {
> + res = platform_get_resource(pdev, IORESOURCE_MEM, ret + 1);
> + if (res)
> + priv->eth_ldo_rdy[ret] = devm_ioremap(&pdev->dev,

same here.

Andrew

---
pw-bot: cr


2023-11-16 09:36:45

by Luo Jie

[permalink] [raw]
Subject: Re: [PATCH 1/9] net: mdio: ipq4019: increase eth_ldo_rdy for ipq5332 platform



On 11/15/2023 9:44 PM, Andrew Lunn wrote:
>> + for (ret = 0; ret < ETH_LDO_RDY_CNT; ret++) {
>> + if (priv->eth_ldo_rdy[ret]) {
>> + val = readl(priv->eth_ldo_rdy[ret]);
>> + val |= BIT(0);
>> + writel(val, priv->eth_ldo_rdy[ret]);
>> + fsleep(IPQ_PHY_SET_DELAY_US);
>> + }
>
> Please add a new variable, rather than use ret this way.

OK, will add it in the next patch set.

>
>> + for (ret = 0; ret < ETH_LDO_RDY_CNT; ret++) {
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, ret + 1);
>> + if (res)
>> + priv->eth_ldo_rdy[ret] = devm_ioremap(&pdev->dev,
>
> same here.

Ok.

>
> Andrew
>
> ---
> pw-bot: cr