[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7eb569f8-ad27-3a28-17e9-461bf9acd1af@gmail.com>
Date: Wed, 10 Jan 2018 09:49:03 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: phy: marvell: mv88e6390 temperature sensor
reading
On 01/10/2018 06:05 AM, Andrew Lunn wrote:
>>>> +static int m88e6390_hwmon_probe(struct phy_device *phydev)
>>>> +{
>>>> + return marvell_hwmon_probe(phydev, &m88e6390_hwmon_chip_info);
>>>> +}
>>>> #else
>>>> static int m88e1121_hwmon_probe(struct phy_device *phydev)
>>>> {
>>>> @@ -1794,6 +1927,11 @@ static int m88e1510_hwmon_probe(struct phy_device *phydev)
>>>> {
>>>> return 0;
>>>> }
>>>> +
>>>> +static int m88e6390_hwmon_probe(struct phy_device *phydev)
>>>> +{
>>>> + return 0;
>>>> +}
>>>
>>> Instead of having to define m88e6390_hwmon_probe() twice, I would just
>>> make marvell_hwmon_probe() a stub when CONFIG_HWMON=n?
>>
>> Yes, i could do that. But again, i'm just following the pattern from
>> the other two sensors.
>
> Humm, actually, no. It makes it more complex. If marvell_hwmon_probe()
> is a stub, and we keep m88e6390_hwmon_probe() as the real
> implementation, it means we need m88e6390_hwmon_chip_info, so we can
> pass it. Either i need a stub version of m88e6390_hwmon_chip_info, or
> i just build all the hwmon code even when CONFIG_HWMON is
> disabled. The compiler might be able to figure out it is all unused
> and throw it away, but i doubt it.
>
> Having m88e6390_hwmon_probe() a stub is much simpler.
Fair enough:
Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
--
Florian
Powered by blists - more mailing lists