From c8309ef6a4c52919d44bbc9743d7ea05ae8f4c7f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 30 Mar 2011 00:24:43 -0700 Subject: ARM: tegra: gpio: Fix unused variable warnings Change b0f18edaf6ee4e6fac89cae63a90bd38ad2a3418 (arm: tegra: Remove unused bogus irq enable/disable magic) introduces warnings: arch/arm/mach-tegra/gpio.c: In function 'tegra_gpio_resume': arch/arm/mach-tegra/gpio.c:260: warning: unused variable 'i' arch/arm/mach-tegra/gpio.c: In function 'tegra_gpio_suspend': arch/arm/mach-tegra/gpio.c:283: warning: unused variable 'i' Fix them, and fix a coding style issue on the same lines. Signed-off-by: Colin Cross Acked-by: Erik Gilling --- arch/arm/mach-tegra/gpio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/gpio.c b/arch/arm/mach-tegra/gpio.c index 76a3f654220f..65a1aba6823d 100644 --- a/arch/arm/mach-tegra/gpio.c +++ b/arch/arm/mach-tegra/gpio.c @@ -257,7 +257,8 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) void tegra_gpio_resume(void) { unsigned long flags; - int b, p, i; + int b; + int p; local_irq_save(flags); @@ -280,7 +281,8 @@ void tegra_gpio_resume(void) void tegra_gpio_suspend(void) { unsigned long flags; - int b, p, i; + int b; + int p; local_irq_save(flags); for (b = 0; b < ARRAY_SIZE(tegra_gpio_banks); b++) { -- cgit v1.2.2 From 906c3b616dcf8e64b11d7d665d62f5e9940f4d46 Mon Sep 17 00:00:00 2001 From: Nicolas Kaiser Date: Wed, 30 Mar 2011 15:59:11 +0200 Subject: arm: tegra: fix error check in tegra2_clocks.c Checking 'rate < 0' doesn't work because 'rate' is unsigned. Signed-off-by: Nicolas Kaiser Signed-off-by: Colin Cross --- arch/arm/mach-tegra/tegra2_clocks.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c index 6d7c4eea4dcb..4459470c052d 100644 --- a/arch/arm/mach-tegra/tegra2_clocks.c +++ b/arch/arm/mach-tegra/tegra2_clocks.c @@ -1362,14 +1362,15 @@ static int tegra_clk_shared_bus_set_rate(struct clk *c, unsigned long rate) { unsigned long flags; int ret; + long new_rate = rate; - rate = clk_round_rate(c->parent, rate); - if (rate < 0) - return rate; + new_rate = clk_round_rate(c->parent, new_rate); + if (new_rate < 0) + return new_rate; spin_lock_irqsave(&c->parent->spinlock, flags); - c->u.shared_bus_user.rate = rate; + c->u.shared_bus_user.rate = new_rate; ret = tegra_clk_shared_bus_update(c->parent); spin_unlock_irqrestore(&c->parent->spinlock, flags); -- cgit v1.2.2