[net-next PATCH v6 15/15] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver
Andy Shevchenko
andy.shevchenko at gmail.com
Thu Feb 18 10:04:02 EST 2021
On Thu, Feb 18, 2021 at 7:29 AM Calvin Johnson
<calvin.johnson at oss.nxp.com> wrote:
>
> Modify dpaa2_mac_get_node() to get the dpmac fwnode from either
> DT or ACPI.
>
> Modify dpaa2_mac_get_if_mode() to get interface mode from dpmac_node
> which is a fwnode.
>
> Modify dpaa2_pcs_create() to create pcs from dpmac_node fwnode.
>
> Modify dpaa2_mac_connect() to support ACPI along with DT.
...
> + if (is_of_node(fwnode))
Redundant check I think. If it's not an fwnode, the dpmacs is NULL and
of_node_put() is NULL-aware.
> + of_node_put(dpmacs);
...
> + if (is_of_node(fwnode))
> + of_node_put(dpmacs);
Ditto.
...
> mac->if_link_type = mac->attr.link_type;
> -
Do we need to remove this blank line?
...
> + if (is_of_node(dpmac_node))
> + fwnode_handle_put(dpmac_node);
> + if (is_of_node(dpmac_node))
> + fwnode_handle_put(dpmac_node);
Also not sure that you need a check in the above code excerpts.
--
With Best Regards,
Andy Shevchenko
More information about the linux-arm-kernel
mailing list