linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Mike Turquette <mturquette@linaro.org>,
	Rabin Vincent <rabin.vincent@stericsson.com>,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC 5/5] clk: Add floor and ceiling constraints to clock rates
Date: Sat, 28 Jun 2014 01:10:27 +0200	[thread overview]
Message-ID: <20140627231026.GA26184@ulmo> (raw)
In-Reply-To: <53ADF6E6.6090705@wwwdotorg.org>

[-- Attachment #1: Type: text/plain, Size: 1054 bytes --]

On Fri, Jun 27, 2014 at 04:57:42PM -0600, Stephen Warren wrote:
> On 06/27/2014 01:57 AM, Tomeu Vizoso wrote:
> > Adds a way for clock consumers to set maximum and minimum rates. This can be
> > used for thermal drivers to set ceiling rates, or by misc. drivers to set
> > floor rates to assure a minimum performance level.
> 
> > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> 
> > +static struct rate_constraint *__ensure_constraint(struct clk *clk_user,
> > +						   enum constraint_type type)
> 
> > +	if (!found) {
> > +		constraint = kzalloc(sizeof(*constraint), GFP_KERNEL);
> > +		if (!constraint) {
> > +			pr_err("%s: could not allocate constraint\n", __func__);
> 
> Doesn't kzalloc print an error itself if the allocation fails? I've
> certainly seen quite a few patches ripping out custom "allocation
> failed" errors in code.

Yes, these are unnecessary. There's even a checkpatch warning for this
construct nowadays:

	f9a5a624f414 checkpatch: attempt to find unnecessary 'out of memory' messages

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-06-27 23:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27  7:57 [RFC 0/5] Per-user clock constraints Tomeu Vizoso
2014-06-27  7:57 ` [RFC 1/5] clk: Add temporary mapping to the existing API Tomeu Vizoso
2014-06-27  7:57 ` [RFC 2/5] clk: Move all drivers to use internal API Tomeu Vizoso
2014-06-27  7:57 ` [RFC 3/5] clk: use struct clk only for external API Tomeu Vizoso
2014-06-27 22:37   ` Stephen Warren
2014-06-30 19:43     ` Rabin Vincent
2014-06-27  7:57 ` [RFC 4/5] clk: per-user clock accounting for debug Tomeu Vizoso
2014-06-27 22:44   ` Stephen Warren
2014-06-27 22:51     ` Stephen Warren
2014-06-30 19:49     ` Rabin Vincent
2014-06-27  7:57 ` [RFC 5/5] clk: Add floor and ceiling constraints to clock rates Tomeu Vizoso
2014-06-27 22:57   ` Stephen Warren
2014-06-27 23:10     ` Thierry Reding [this message]
2014-07-03 14:02     ` Tomeu Vizoso
2014-06-27 22:30 ` [RFC 0/5] Per-user clock constraints Stephen Warren

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=20140627231026.GA26184@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=rabin.vincent@stericsson.com \
    --cc=swarren@wwwdotorg.org \
    --cc=tomeu.vizoso@collabora.com \
    /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;
as well as URLs for NNTP newsgroup(s).