Re: [net-next PATCH v6 15/15] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 18, 2021 at 7:29 AM Calvin Johnson
<calvin.johnson@xxxxxxxxxxx> 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



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux