aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVirupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>2010-05-28 16:39:33 +0530
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:45:45 -0600
commit20970d371a89aaefcdd3eb7e75834d4a49f82969 (patch)
treed4ae9167992ff657a22ed3f08bac6b333bd9a2d3
parentcff7f06817a40803a4acc08cd07509fc990d8439 (diff)
downloadlinux-2.6.34-ux500-20970d371a89aaefcdd3eb7e75834d4a49f82969.tar.gz
fix kernel warnings
Fix for the kernel warnings seen on compiling the kernel using the extra flag EXTRA_CFLAGS=-W. The action taken on the kernel warnings is as below. Below ones are fixed arch/arm/mach-ux500/clock.c:243: warning: comparison between signed and unsigned integer expressions arch/arm/mach-ux500/clock.c:246: warning: comparison between signed and unsigned integer expressions arch/arm/mach-ux500/clock.c:254: warning: comparison between signed and unsigned integer expressions arch/arm/mach-ux500/clock.c:257: warning: comparison between signed and unsigned integer expressions arch/arm/mach-ux500/clock.c:599: warning: comparison between signed and unsigned integer expressions arch/arm/mach-ux500/clock.c:641: warning: comparison between signed and unsigned integer expressions arch/arm/mach-ux500/clock.c:667: warning: comparison between signed and unsigned integer expressions arch/arm/mach-ux500/dma_40.c:1521: warning: comparison between signed and unsigned integer expressions arch/arm/mach-ux500/dma_40.c:1597: warning: comparison between signed and unsigned integer expressions arch/arm/mach-ux500/dma_40.c:1705: warning: comparison between signed and unsigned integer expressions arch/arm/mach-ux500/dma_40.c:1806: warning: comparison between signed and unsigned integer expressions arch/arm/mach-ux500/platsmp.c:211: warning: comparison between signed and unsigned integer expressions drivers/mmc/host/mmc-u8500.c:690: warning: comparison between signed and unsigned integer expressions drivers/mmc/host/mmc-u8500.c:757: warning: comparison between signed and unsigned integer expressions drivers/misc/ab8500.c:297: warning: comparison between signed and unsigned integer expressions Below warning is from the macro included from the /include/linux/clocksource.h header file, not fixed. arch/arm/mach-ux500/timer.c:57: warning: signed and unsigned type in conditional expression Below warnings are compiler dependant and are ignored. arch/arm/mach-ux500/prcmu-fw.c:306: warning: comparison of unsigned expression < 0 is always false arch/arm/mach-ux500/prcmu-fw.c:313: warning: comparison of unsigned expression < 0 is always false arch/arm/mach-ux500/prcmu-fw.c:332: warning: comparison of unsigned expression < 0 is always false arch/arm/mach-ux500/prcmu-fw.c:339: warning: comparison of unsigned expression < 0 is always false arch/arm/mach-ux500/prcmu-fw.c:365: warning: comparison of unsigned expression < 0 is always false arch/arm/mach-ux500/prcmu-fw.c:395: warning: comparison of unsigned expression < 0 is always false arch/arm/mach-ux500/prcmu-fw.c:464: warning: comparison of unsigned expression < 0 is always false arch/arm/mach-ux500/prcmu-fw.c:626: warning: comparison of unsigned expression < 0 is always false arch/arm/mach-ux500/prcmu-fw.c:627: warning: comparison of unsigned expression < 0 is always false arch/arm/mach-ux500/prcmu-fw.c:635: warning: comparison of unsigned expression < 0 is always false arch/arm/mach-ux500/prcmu-fw.c:636: warning: comparison of unsigned expression < 0 is always false Below one is ignored. arch/arm/mach-ux500/hotplug.c:48: warning: comparison between signed and unsigned integer expressions ST-Ericsson ID:ER259868 Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/722 Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Change-Id: I5d53beb5d05fab217fe95096480b354a22ff9d35 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2622 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rwxr-xr-xarch/arm/mach-ux500/clock.c6
-rwxr-xr-xarch/arm/mach-ux500/clock.h4
-rwxr-xr-xarch/arm/mach-ux500/dma_40.c4
-rw-r--r--arch/arm/mach-ux500/platsmp.c2
-rw-r--r--drivers/misc/ab8500.c3
-rw-r--r--drivers/mmc/host/mmc-u8500.c6
6 files changed, 13 insertions, 12 deletions
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index 5ab9027368b..24561b35ee7 100755
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -595,7 +595,7 @@ static void clk_register(struct clk *clk);
static void clks_register(struct clk_lookup *clks, size_t num)
{
- int i;
+ unsigned int i;
for (i = 0; i < num; i++) {
clkdev_add(&clks[i]);
@@ -637,7 +637,7 @@ struct clk *boot_clks[ARRAY_SIZE(u8500_boot_clk)];
*/
static int __init u8500_boot_clk_disable(void)
{
- int i = 0;
+ unsigned int i = 0;
for (i = 0; i < ARRAY_SIZE(u8500_boot_clk); i++) {
if (!boot_clks[i])
@@ -653,7 +653,7 @@ late_initcall_sync(u8500_boot_clk_disable);
static void u8500_amba_clk_enable(void)
{
- int i = 0;
+ unsigned int i = 0;
writel(~0x0 & ~(1 << 9), IO_ADDRESS(U8500_PER1_BASE + 0xF000 + 0x04));
writel(~0x0, IO_ADDRESS(U8500_PER1_BASE + 0xF000 + 0x0C));
diff --git a/arch/arm/mach-ux500/clock.h b/arch/arm/mach-ux500/clock.h
index eb4a16c955e..50383fb028d 100755
--- a/arch/arm/mach-ux500/clock.h
+++ b/arch/arm/mach-ux500/clock.h
@@ -103,8 +103,8 @@ struct clk {
/* The rest are only for PRCC clks */
int cluster;
- unsigned int prcc_bus;
- unsigned int prcc_kernel;
+ int prcc_bus;
+ int prcc_kernel;
struct clk *parent_cluster;
struct clk *parent_periph;
diff --git a/arch/arm/mach-ux500/dma_40.c b/arch/arm/mach-ux500/dma_40.c
index 13d19c3cb62..174f94360c7 100755
--- a/arch/arm/mach-ux500/dma_40.c
+++ b/arch/arm/mach-ux500/dma_40.c
@@ -1464,7 +1464,7 @@ struct scatterlist *generate_sg_list(struct dma_channel_info *info,
static int map_lli_info_log_chan(struct dma_channel_info *info, int type,
struct std_log_memory_param *params)
{
- int idx = 0;
+ unsigned int idx = 0;
struct scatterlist *sg;
u32 step_size = 0;
u32 lli_count = 0;
@@ -1646,7 +1646,7 @@ static int map_lli_info_log_chan(struct dma_channel_info *info, int type,
*/
static int map_lli_info_phys_chan(struct dma_channel_info *info, int type)
{
- int idx = 0;
+ unsigned int idx = 0;
struct dma_lli_info *lli_ptr = NULL;
u32 temp;
dma_addr_t phys_lli_addr = 0;
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 438ef16aec9..baf788d5749 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -134,7 +134,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
{
unsigned int ncores = get_core_count();
unsigned int cpu = smp_processor_id();
- int i;
+ unsigned int i;
/* sanity check */
if (ncores == 0) {
diff --git a/drivers/misc/ab8500.c b/drivers/misc/ab8500.c
index 4134d32f2ab..b4b1efce810 100644
--- a/drivers/misc/ab8500.c
+++ b/drivers/misc/ab8500.c
@@ -289,7 +289,8 @@ static irqreturn_t ab8500_interrupt_handler(int irq, void *dev_id)
*/
static void ab8500_work(struct work_struct *work)
{
- int bit, i, count = 0;
+ int bit, count = 0;
+ unsigned int i;
unsigned long intl;
struct client_callbacks *cur_list_ptr = NULL;
diff --git a/drivers/mmc/host/mmc-u8500.c b/drivers/mmc/host/mmc-u8500.c
index c75b7d157db..9316c6d3224 100644
--- a/drivers/mmc/host/mmc-u8500.c
+++ b/drivers/mmc/host/mmc-u8500.c
@@ -665,7 +665,7 @@ static int u8500_mmci_read(struct u8500_mmci_host *host, u32 * buffer,
unsigned int data_xfered = 0;
u8 *char_buf;
u16 *word_buf;
- int temp;
+ unsigned int temp;
u32 flag = MCI_DATA_IRQ;
base = host->base;
@@ -727,8 +727,8 @@ static int u8500_mmci_write(struct u8500_mmci_host *host, u32 * buffer,
unsigned int remain, u32 hoststatus)
{
void __iomem *base;
- int count, max_count, temp;
- unsigned int data_xfered = 0;
+ int count, max_count;
+ unsigned int data_xfered = 0, temp;
u16 *buf16;
u8 *buf8;
u32 flag = MCI_DATA_IRQ;