Re: [PATCH v2] net: stmmac: Fix signedness bug in stmmac_probe_config_dt()

Andrew Lunn
2020-08-18T17:05:53Z

On Tue, Aug 18, 2020 at 11:15:00PM +0800, YueHaibing wrote:
> The "plat->phy_interface" variable is an enum and in this context GCC
> will treat it as an unsigned int so the error handling is never
> triggered.
>
> Fixes: b9f0b2f634c0 ("net: stmmac: platform: fix probe for ACPI devices")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Hi YueHaibing

Please take a look at:

commit 0c65b2b90d13c1deaee6449304dd367c5d4eb8ae
Author: Andrew Lunn <andrew@lunn.ch>
Date: Mon Nov 4 02:40:33 2019 +0100

net: of_get_phy_mode: Change API to solve int/unit warnings

You probably want to follow this basic idea.

Andrew