[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cd074f0-3a58-d1bf-2a72-4fadd0d3b796@gmail.com>
Date: Wed, 17 Mar 2021 22:37:45 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
Sergei Shtylyov <sergei.shtylyov@...il.com>,
John Crispin <john@...ozen.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: thierry.reding@...il.com, linux-tegra@...r.kernel.org,
balbi@...nel.org, linux-usb@...r.kernel.org,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] MIPS: ralink: define stubs for clk_set_parent to fix
compile testing
17.03.2021 12:56, Krzysztof Kozlowski пишет:
> On 17/03/2021 10:52, Sergei Shtylyov wrote:
>> Hello!
>>
>> On 16.03.2021 20:57, Krzysztof Kozlowski wrote:
>>
>>> The Ralink MIPS platform does not use Common Clock Framework and does
>>> not define certain clock operations leading to compile test failures:
>>>
>>> /usr/bin/mips-linux-gnu-ld: drivers/usb/phy/phy-tegra-usb.o: in function `tegra_usb_phy_init':
>>> phy-tegra-usb.c:(.text+0x1dd4): undefined reference to `clk_get_parent'
>>>
>>> Reported-by: kernel test robot <lkp@...el.com>
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
>>> ---
>>> arch/mips/ralink/clk.c | 14 ++++++++++++++
>>> 1 file changed, 14 insertions(+)
>>>
>>> diff --git a/arch/mips/ralink/clk.c b/arch/mips/ralink/clk.c
>>> index 2f9d5acb38ea..8387177a47ef 100644
>>> --- a/arch/mips/ralink/clk.c
>>> +++ b/arch/mips/ralink/clk.c
>>> @@ -70,6 +70,20 @@ long clk_round_rate(struct clk *clk, unsigned long rate)
>>> }
>>> EXPORT_SYMBOL_GPL(clk_round_rate);
>>>
>>> +int clk_set_parent(struct clk *clk, struct clk *parent)
>>> +{
>>> + WARN_ON(clk);
>>> + return -1;
>>
>> Shouldn't this be a proepr error code (-1 corresponds to -EPRERM)?
>
> Could be ENODEV or EINVAL but all other stubs here and in ar7/clock.c
> use -1. Do you prefer it then to have it inconsistent with others?
I don't see where -1 is used, ar7/clock.c returns 0. Other drivers
either return 0 or EINVAL.
Since linux/clk.h returns 0 in the stub, I think 0 is the correct variant.
Powered by blists - more mailing lists