All of lore.kernel.org
 help / color / mirror / Atom feed
From: viresh.kumar@st.com (viresh kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V5 39/63] SPEAr CPU freq: Adding support for CPU Freq framework
Date: Fri, 21 Jan 2011 09:10:26 +0530	[thread overview]
Message-ID: <4D39002A.10703@st.com> (raw)
In-Reply-To: <20110120144941.GB25954@pulham.picochip.com>

On 01/20/2011 08:19 PM, Jamie Iles wrote:
>> > +	newfreq = clk_round_rate(cpu_clk, freqs.new * 1000);
>> > +	if (newfreq < 0) {
>> > +		pr_err("CPU Freq: clk_round_rate failed: %ld\n", newfreq);
>> > +		freqs.new = freqs.old;
> Nitpick, you don't need to assign freqs.new here as you return 
> immediately after.
> 
>> > +		return newfreq;
>> > +	}
>> > +
>> > +	freqs.new = newfreq / 1000;
>> > +
>> > +	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
>> > +
>> > +	/* Get current rate after clk_set_rate, for both success and failure */
>> > +	ret = clk_set_rate(cpu_clk, freqs.new * 1000);
>> > +	if (ret) {
>> > +		pr_err("CPU Freq: cpu clk_set_rate failed: %d\n", ret);
>> > +		freqs.new = clk_get_rate(cpu_clk) / 1000;
>> > +	}
>> > +
>> > +	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
>> > +	return 0;
> Shouldn't this return 'ret' here in case clk_set_rate() failed?

Will correct both of them.
I will resend this patch alone, instead of sending everything again.

-- 
viresh

  reply	other threads:[~2011-01-21  3:40 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20  7:25 [PATCH V5 00/63] Updating SPEAr Support Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 01/63] spear/vmalloc.h: Appending UL to VMALLOC_END Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 02/63] SPEAr: Defining IOMEM(x) and updating declaration of MISC_BASE Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 03/63] sp810 Fix: Switch to slow mode before sysctl_soft_reset Viresh Kumar
2011-02-19 14:40   ` Russell King - ARM Linux
2011-02-19 17:14     ` viresh kumar
2011-01-20  7:25 ` [PATCH V5 04/63] ST SPEAr: Padmux code Updated Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 05/63] ST SPEAr: Making clock functions more generic Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 06/63] ST SPEAr: Formalized timer support Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 07/63] ST SPEAr13XX: Adding machine specific header files Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 08/63] ST SPEAr13XX: Adding machine specific src files Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 09/63] ST SPEAr: Adding support for SPEAr13xx SoC in spear generic plat/ Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 10/63] ST SPEAr13XX: Added compilation support in arch/arm/ Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 11/63] ST SPEAr13xx: Adding default config file Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 12/63] ST SPEAr: Adding support for CLCD on SPEAr3xx/6xx Viresh Kumar
2011-02-16  9:56   ` Russell King - ARM Linux
2011-02-16 10:14     ` Russell King - ARM Linux
2011-02-17  4:19       ` viresh kumar
2011-01-20  7:25 ` [PATCH V5 13/63] ST SPEAr: Updating Clock Support Viresh Kumar
2011-02-19 17:16   ` Russell King - ARM Linux
2011-01-20  7:25 ` [PATCH V5 14/63] ST SPEAr: Adding Debugfs support on clock framework Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 15/63] ST SPEAr: Correcting SOC Config base address for spear320 Viresh Kumar
2011-02-19 16:40   ` Russell King - ARM Linux
2011-02-19 17:20     ` viresh kumar
2011-01-20  7:25 ` [PATCH V5 16/63] ST SPEAr: Adding PLGPIO driver for spear platform Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 18/63] ST SPEAr: Adding machine support for rtc-spear Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 19/63] ST SPEAr: adding support for synopsis i2c designware Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 20/63] ST SPEAr: Adding machine support for USB host Viresh Kumar
2011-01-20  7:25 ` [PATCH V5 21/63] ST SPEAr: Adding machine support for keyboard Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 22/63] ST SPEAr: Added ARM PL061 GPIO Support on SPEAr13xx and modified resource size Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 23/63] ST SPEAr: Adding support for ST's PWM IP Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 24/63] ST SPEAr: Adding Watchdog support Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 25/63] ST SPEAr: Adding machine support for nand Viresh Kumar
2011-01-25  8:57   ` stanley.miao
2011-01-25  9:20     ` viresh kumar
2011-01-20  7:26 ` [PATCH V5 26/63] ST SPEAr: Added PCIE host controller base driver support Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 27/63] ST SPEAr: Adding support for SSP PL022 Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 28/63] ST SPEAr: Adding support for SDHCI (SDIO) Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 29/63] ST SPEAr: Changing resource size of amba devices to SZ_4K Viresh Kumar
2011-02-19 17:58   ` Russell King - ARM Linux
2011-02-21  6:37     ` viresh kumar
2011-01-20  7:26 ` [PATCH V5 30/63] ST SPEAr: Replacing SIZE macro's with actual required size Viresh Kumar
2011-02-19 18:01   ` Russell King - ARM Linux
2011-02-21  6:39     ` viresh kumar
2011-02-21 11:03       ` Russell King - ARM Linux
2011-02-21 11:44         ` viresh kumar
2011-02-21 11:53           ` Russell King - ARM Linux
2011-02-21 12:04             ` viresh kumar
2011-02-21 13:09               ` Russell King - ARM Linux
2011-02-21 13:57                 ` viresh kumar
2011-01-20  7:26 ` [PATCH V5 31/63] SPEAr: defines base addresses as ulong Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 32/63] ST SPEAr: Adding miscellaneous devices Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 33/63] ST SPEAr 13xx : Adding support for SPEAr1310 Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 34/63] SPEAr320: Adding support for CAN Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 35/63] ST SPEAr: Adding support for DDR in clock framework Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 36/63] ST SPEAr : EMI (Extrenal Memory Interface) controller driver Viresh Kumar
2011-02-19 17:13   ` Russell King - ARM Linux
2011-02-21  6:26     ` Vipin Kumar
2011-02-21 11:02       ` Russell King - ARM Linux
2011-02-21 11:44         ` Vipin Kumar
2011-01-20  7:26 ` [PATCH V5 37/63] SPEAr Clock Framework: Adding support for PLL frequency change Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 38/63] SPEAr Power Management: Added the support for Standby mode Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 39/63] SPEAr CPU freq: Adding support for CPU Freq framework Viresh Kumar
2011-01-20 14:49   ` Jamie Iles
2011-01-21  3:40     ` viresh kumar [this message]
2011-01-20  7:26 ` [PATCH V5 40/63] ST SPEAr13xx: Adding CPU hotplug support added for SMP platforms Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 41/63] ST SPEAr: replace readl, writel with readl_relaxed, writel_relaxed in uncompress.h Viresh Kumar
2011-02-19 14:44   ` Russell King - ARM Linux
2011-02-19 17:16     ` viresh kumar
2011-01-20  7:26 ` [PATCH V5 42/63] ST SPEAr13xx: add L2 cache support Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 43/63] ST SPEAr13xx: Modified static mappings Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 44/63] SPEAr1310: Adding Static Mapping for RAS Area Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 45/63] SPEAr: Adding and Updating Clock definitions Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 46/63] SPEAr : Pad multiplexing handling modified Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 47/63] SPEAr13xx : Fixed part devices in SPEAr13xx addded to the generic implementation Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 48/63] SPEAr : Updating pad multiplexing support Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 49/63] ST SPEAr3xx: Passing pmx devices address from machine *.c files Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 50/63] ST SPEAr Clock Framework: Updating for single image solution Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 51/63] SPEAr3xx: Make local structures static Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 52/63] SPEAR3xx: Rename register/irq defines to remove naming conflicts Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 53/63] SPEAr3xx: Rework pmx_dev code to remove conflicts Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 54/63] SPEAr3xx: Rework KConfig to allow all boards to be compiled in Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 55/63] SPEAr3xx: Replace defconfigs with single unified defconfig Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 56/63] ST SPEAr: Appending spear3** with global structures Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 57/63] ST SPEAr3xx: Updating plgpio and emi source to make it compliant with single image strategy Viresh Kumar
2011-02-19 16:50   ` Russell King - ARM Linux
2011-02-19 17:30     ` viresh kumar
2011-01-20  7:26 ` [PATCH V5 58/63] SPEAr6xx: Rework Kconfig for single image solution Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 59/63] ST SPEAR6xx: renaming spear600_defconfig as spear6xx_defconfig Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 60/63] ST SPEAr13xx: Pass default padmux settings as parameter to spear13**_init routine Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 61/63] ST SPEAr: Adding devices & clocks Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 62/63] ST SPEAr: Adding information in Documentation/ and MAINTAINERS Viresh Kumar
2011-01-20  7:26 ` [PATCH V5 63/63] ST SPEAr: Updating defconfigs Viresh Kumar
2011-01-21 16:57 ` [PATCH V5 00/63] Updating SPEAr Support Jamie Iles
2011-01-31  4:30 ` viresh kumar
2011-01-31  9:22   ` Russell King - ARM Linux
2011-02-14  8:31     ` viresh kumar
2011-02-16 10:04       ` Russell King - ARM Linux
2011-02-15  9:06 ` stanley.miao
2011-02-19 13:47 ` Russell King - ARM Linux
2011-02-19 17:48   ` viresh kumar
2011-03-01 11:00 ` viresh kumar

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=4D39002A.10703@st.com \
    --to=viresh.kumar@st.com \
    --cc=linux-arm-kernel@lists.infradead.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.