All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: "G, Manjunath Kondaiah" <manjugk@ti.com>
Cc: "Gurav , Pramod" <pramod.gurav@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Reddy, Teerth" <teerth@ti.com>,
	"Sripathy, Vishwanath" <vishwanath.bs@ti.com>
Subject: Re: [PATCH v4 1/2] OMAP3: SDRC: Dynamic Calculation of SDRC stall latency during DVFS
Date: Thu, 18 Mar 2010 07:48:28 -0700	[thread overview]
Message-ID: <87ljdpofcz.fsf@deeprootsystems.com> (raw)
In-Reply-To: <E0D41E29EB0DAC4E9F3FF173962E9E94026F078B5E@dbde02.ent.ti.com> (Manjunath Kondaiah G.'s message of "Thu\, 18 Mar 2010 11\:47\:52 +0530")

"G, Manjunath Kondaiah" <manjugk@ti.com> writes:

>> +#ifdef CONFIG_ARCH_OMAP3
>> +void (*_omap3_sram_delay)(unsigned int);
>> +unsigned int  measure_sram_delay(unsigned int loop)
>> +{
>> +	static struct omap_dm_timer *gpt;
>> +	unsigned long flags, diff = 0, gt_rate, mpurate;
>> +	unsigned int delay_sram, error_gain;
>> +	unsigned int start = 0, end = 0;
>> +
>> +	omap_dm_timer_init();
>> +	gpt = omap_dm_timer_request();
>> +	if (!gpt) {
>
> Request timer API returns NULL on failure. 
> Use   BUG_ON(gpt == NULL);

No.  BUG_ON() will panic the kernel and hang here.  There is no need
to crash the kernel for that.

Current aproach is fine, or if a more verbose warning is desired,
you can use if (WARN_ON(!gpt)) ... and drop the pr_err()

Kevin

  reply	other threads:[~2010-03-18 14:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18  4:55 [PATCH 0/2] OMAP3: Dynamic Calculation of SDRC stall latency during DVFS Pramod Gurav
2010-03-18  4:55 ` [PATCH v4 1/2] OMAP3: SDRC: " Pramod Gurav
2010-03-18  4:55   ` [PATCH v2 2/2] OMAP3630 SDRC: Change in DVFS Latency Formula for OMAP3630 Pramod Gurav
2010-03-18  7:17     ` ambresh
2010-03-19 13:17       ` Sripathy, Vishwanath
2010-03-23  2:49         ` ambresh
2010-03-18  6:17   ` [PATCH v4 1/2] OMAP3: SDRC: Dynamic Calculation of SDRC stall latency during DVFS G, Manjunath Kondaiah
2010-03-18 14:48     ` Kevin Hilman [this message]
2010-03-18  7:15   ` ambresh
2010-03-19 13:15     ` Sripathy, Vishwanath
2010-03-21 13:24       ` ambresh
2010-03-18 15:09   ` Kevin Hilman
  -- strict thread matches above, loose matches on Subject: below --
2010-04-01 17:16 [PATCH V4 0/2] OMAP3: " Pramod Gurav
2010-04-01 17:16 ` [PATCH v4 1/2] OMAP3: SDRC: " Pramod Gurav

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=87ljdpofcz.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=manjugk@ti.com \
    --cc=pramod.gurav@ti.com \
    --cc=teerth@ti.com \
    --cc=vishwanath.bs@ti.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 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.