public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	Sergei Shtylyov <sergei.shtylyov@gmail.com>,
	John Crispin <john@phrozen.org>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: thierry.reding@gmail.com, linux-tegra@vger.kernel.org,
	balbi@kernel.org, linux-usb@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] MIPS: ralink: define stubs for clk_set_parent to fix compile testing
Date: Wed, 17 Mar 2021 22:37:45 +0300	[thread overview]
Message-ID: <1cd074f0-3a58-d1bf-2a72-4fadd0d3b796@gmail.com> (raw)
In-Reply-To: <856fbd45-67ae-fed2-97c4-b555993d5ae9@canonical.com>

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@intel.com>
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.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.

  parent reply	other threads:[~2021-03-17 19:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 17:57 [PATCH] MIPS: ralink: define stubs for clk_set_parent to fix compile testing Krzysztof Kozlowski
2021-03-16 18:01 ` John Crispin
2021-03-16 21:58 ` Thomas Bogendoerfer
2021-03-17  0:14   ` Dmitry Osipenko
2021-03-17  8:16   ` Krzysztof Kozlowski
2021-03-17  0:10 ` Dmitry Osipenko
2021-03-17  8:12   ` Krzysztof Kozlowski
2021-03-17  9:52 ` Sergei Shtylyov
2021-03-17  9:56   ` Krzysztof Kozlowski
2021-03-17 10:06     ` Sergei Shtylyov
2021-03-17 19:37     ` Dmitry Osipenko [this message]
2021-03-17 19:59       ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1cd074f0-3a58-d1bf-2a72-4fadd0d3b796@gmail.com \
    --to=digetx@gmail.com \
    --cc=balbi@kernel.org \
    --cc=john@phrozen.org \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=sergei.shtylyov@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox