Re: [PATCH v4 1/2] OMAP3: SDRC: Dynamic Calculation of SDRC stall latency during DVFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"G, Manjunath Kondaiah" <manjugk@xxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux