]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc32: fix several warnings
authorMatt Porter <mporter@kernel.crashing.org>
Wed, 6 Oct 2004 01:12:42 +0000 (18:12 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 6 Oct 2004 01:12:42 +0000 (18:12 -0700)
Fixes some annoying warnings due to unitialized variables.

Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc/kernel/signal.c
arch/ppc/mm/44x_mmu.c
arch/ppc/syslib/ppc4xx_pic.c
arch/ppc/syslib/todc_time.c

index ac2673ca5133a17bf547368c82214004c0f72d18..260716af587d5dcf265a43ef87aaa58971d2314b 100644 (file)
@@ -270,7 +270,7 @@ save_user_regs(struct pt_regs *regs, struct mcontext __user *frame, int sigret)
 static int
 restore_user_regs(struct pt_regs *regs, struct mcontext __user *sr, int sig)
 {
-       unsigned long save_r2;
+       unsigned long save_r2 = 0;
 #if defined(CONFIG_ALTIVEC) || defined(CONFIG_SPE)
        unsigned long msr;
 #endif
index 1d79838d90acbd2db532cf0036a0b10f30b6ce67..a2ab8b0538300da5db9a0862bbaab79786fc0a09 100644 (file)
@@ -72,7 +72,7 @@ unsigned int tlb_44x_hwater = 62;
 static void __init
 ppc44x_pin_tlb(int slot, unsigned int virt, unsigned int phys)
 {
-       unsigned long attrib;
+       unsigned long attrib = 0;
 
        __asm__ __volatile__("\
        clrrwi  %2,%2,10\n\
index e6da0a20d8ec952f3d5584bba21cfb725963d59c..2dc63a58cec66f057bae6349ee07fdebb1d7c923 100644 (file)
@@ -256,7 +256,7 @@ static void
 ppc4xx_uic_end(unsigned int irq)
 {
        int bit, word;
-       unsigned int tr_bits;
+       unsigned int tr_bits = 0;
 
        bit = irq & 0x1f;
        word = irq >> 5;
index c1eb1f429f9cce4f6974961db61f906d9396f223..1dc7e0bf5316ee5e849d9a02fb6f11467fcc9a26 100644 (file)
@@ -277,9 +277,9 @@ todc_time_init(void)
 ulong
 todc_get_rtc_time(void)
 {
-       uint    year, mon, day, hour, min, sec;
+       uint    year = 0, mon = 0, day = 0, hour = 0, min = 0, sec = 0;
        uint    limit, i;
-       u_char  save_control, uip;
+       u_char  save_control, uip = 0;
 
        spin_lock(&rtc_lock);
        save_control = todc_read_val(todc_info->control_a);
@@ -361,7 +361,7 @@ int
 todc_set_rtc_time(unsigned long nowtime)
 {
        struct rtc_time tm;
-       u_char          save_control, save_freq_select;
+       u_char          save_control, save_freq_select = 0;
 
        spin_lock(&rtc_lock);
        to_tm(nowtime, &tm);
@@ -416,7 +416,7 @@ todc_set_rtc_time(unsigned long nowtime)
  */
 static unsigned char __init todc_read_timereg(int addr)
 {
-       unsigned char save_control, val;
+       unsigned char save_control = 0, val;
 
        switch (todc_info->rtc_type) {
                case TODC_TYPE_DS1557: