[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ecbcbeae-1eb8-d20e-04b6-2c65f136799f@canonical.com>
Date: Wed, 17 Mar 2021 09:12:20 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To: Dmitry Osipenko <digetx@...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
On 17/03/2021 01:10, Dmitry Osipenko wrote:
> 16.03.2021 20:57, Krzysztof Kozlowski пишет:
>> 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;
>> +}
>> +EXPORT_SYMBOL(clk_set_parent);
>> +
>> +struct clk *clk_get_parent(struct clk *clk)
>> +{
>> + WARN_ON(clk);
>> + return NULL;
>> +}
>> +EXPORT_SYMBOL(clk_get_parent);
>
> I'm wondering whether symbols should be GPL or it doesn't matter in this
> case. Otherwise this looks good to me.
The ones in arch/mips/ar7/clock.c were not GPL but other stubs already
defined here are, so indeed I'll make them GPL for consistency.
>
> Also, I guess it should be possible to create a generic clk stubs that
> will use weak functions, allowing platforms to override only the wanted
> stubs and then we won't need to worry about the missing stubs for each
> platform individually. But of course that will be a much bigger change.
> Just wanted to share my thoughts.
Yes, it would be a good idea but also a bigger task. I am not sure if
these platforms are alive enough to get that attention.
Best regards,
Krzysztof
Powered by blists - more mailing lists