All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francesco VIRLINZI <francesco.virlinzi@st.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh: clkfwk: Changed the init function
Date: Mon, 16 Mar 2009 05:24:18 +0000	[thread overview]
Message-ID: <49BDE282.3040601@st.com> (raw)
In-Reply-To: <49BA1505.7000500@st.com>

Hi Jean-Christophe
>> (clk->flags & CLK_ALWAYS_ENABLED)
>> @@ -167,6 +156,11 @@ EXPORT_SYMBOL_GPL(clk_disable);
>>  
>>  int clk_register(struct clk *clk)
>>  {
>> +
>> +	if (clk->ops && clk->ops->init)
>> +		if (clk->ops->init(clk))
>> +			return -EINVAL;
>> +
>>     
> why do you check the return if all clk_init will always return 0; ?
>
> IMHO if clk-ops is NULL return directly instead of recheck it later
>
> Best Regards,
> J.
>   
I'm sorry but I don't understand your issue.
You are right if you mean the current SOC-clocks implementations return 
0 in all the .init functions...

But it was currently required to maintain a working system (it's the 
only manner to change a void function with the int function).

In the future if required the .init function will be able to do extra 
check and if required it will be able to
 reject a clock registration.

Currently it could seem useless (all .init return zero) but for my point 
of view it's only a currently issue... And not really an issue.

Regards
 Francesco

  parent reply	other threads:[~2009-03-16  5:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13  8:10 [PATCH] sh: clkfwk: Changed the init function Francesco VIRLINZI
2009-03-13  8:34 ` Francesco VIRLINZI
2009-03-13 16:31 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-16  5:24 ` Francesco VIRLINZI [this message]
2009-03-16 11:13 ` Paul Mundt
2009-03-16 12:39 ` Francesco VIRLINZI
2009-03-16 12:45 ` Paul Mundt
2009-03-19  8:24 ` Francesco VIRLINZI
2009-04-07  8:25 ` Francesco VIRLINZI
2009-04-07 20:27 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-14  3:40 ` Paul Mundt

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=49BDE282.3040601@st.com \
    --to=francesco.virlinzi@st.com \
    --cc=linux-sh@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.