]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc64: Fix spurious warnings uncovered by -Wno-uninitialized removal
authorAnton Blanchard <anton@samba.org>
Tue, 14 Sep 2004 00:43:55 +0000 (17:43 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 14 Sep 2004 00:43:55 +0000 (17:43 -0700)
Here are fixes for some false positives.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
12 files changed:
arch/ppc64/kernel/iommu.c
arch/ppc64/kernel/nvram.c
arch/ppc64/kernel/pSeries_pci.c
arch/ppc64/kernel/rtasd.c
arch/ppc64/kernel/setup.c
arch/ppc64/kernel/signal.c
arch/ppc64/kernel/signal32.c
arch/ppc64/kernel/sysfs.c
arch/ppc64/oprofile/op_model_rs64.c
arch/ppc64/xmon/xmon.c
drivers/char/hvsi.c
drivers/macintosh/via-pmu.c

index 5cac0d2400ceae7b2895eec448c2e1aeb5ed087b..d5d64d1d725848f8e520716b9a8df6ec1c6c730e 100644 (file)
@@ -229,7 +229,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
                struct scatterlist *sglist, int nelems,
                enum dma_data_direction direction)
 {
-       dma_addr_t dma_next, dma_addr;
+       dma_addr_t dma_next = 0, dma_addr;
        unsigned long flags;
        struct scatterlist *s, *outs, *segstart;
        int outcount;
index 89d6a0ad74f4d55507b6d157f1df8b4c90f6af5e..f11a1d4159dc636d772a1f7f10ad5efdb5cf1452 100644 (file)
@@ -340,7 +340,7 @@ static int nvram_create_os_partition(void)
        struct list_head * p;
        struct nvram_partition * part;
        struct nvram_partition * new_part = NULL;
-       struct nvram_partition * free_part;
+       struct nvram_partition * free_part = NULL;
        int seq_init[2] = { 0, 0 };
        loff_t tmp_index;
        long size = 0;
index 3d08423501fbb5f8b10d6e58cf9b1670936115d0..6a8f6257b1c3dcd634af63a4ed27688f0a8443c5 100644 (file)
@@ -497,7 +497,7 @@ unsigned long __init find_and_init_phbs(void)
        struct pci_controller *phb;
        unsigned int root_size_cells = 0;
        unsigned int index;
-       unsigned int *opprop;
+       unsigned int *opprop = NULL;
        struct device_node *root = of_find_node_by_path("/");
 
        if (naca->interrupt_controller == IC_OPEN_PIC) {
index 85192f09c57a85140bab01c49c3dc899c5eeef64..c6370a8e30bd03e0244d11f9746d9f6fb9a6b7c2 100644 (file)
@@ -106,7 +106,7 @@ static char *rtas_event_type(int type)
 static void printk_log_rtas(char *buf, int len)
 {
 
-       int i,j,n;
+       int i,j,n = 0;
        int perline = 16;
        char buffer[64];
        char * str = "RTAS event";
index e84f42a750ef315602b74cb0d7a717166c2cf13f..e5e24d859a12703234a92a39a88f73347c49c272 100644 (file)
@@ -598,7 +598,7 @@ static int __init set_preferred_console(void)
 {
        struct device_node *prom_stdout;
        char *name;
-       int offset;
+       int offset = 0;
 
        /* The user has requested a console so this is already set up. */
        if (strstr(saved_command_line, "console="))
index 63bac5fbd0816b9f2f1803550b822972bc238ddf..d7ebd887006df75d6da0d71599ff95bce3964a36 100644 (file)
@@ -178,7 +178,7 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig,
        elf_vrreg_t __user *v_regs;
 #endif
        unsigned long err = 0;
-       unsigned long save_r13;
+       unsigned long save_r13 = 0;
        elf_greg_t *gregs = (elf_greg_t *)regs;
        int i;
 
index 2a165163df053a82c2831f617f9af25545934227..3a9d9004f35f0fce2eb964d167e41e12da4757c1 100644 (file)
@@ -189,7 +189,7 @@ static long restore_user_regs(struct pt_regs *regs,
        elf_greg_t64 *gregs = (elf_greg_t64 *)regs;
        int i;
        long err = 0;
-       unsigned int save_r2;
+       unsigned int save_r2 = 0;
 #ifdef CONFIG_ALTIVEC
        unsigned long msr;
 #endif
index f6ef0071c704af3525cdba6127ef7b8fe47912b5..f4e121c1ccd478ac3d0019f57d3afcb37e05c17a 100644 (file)
@@ -97,6 +97,13 @@ __setup("smt-snooze-delay=", setup_smt_snooze_delay);
 
 /* PMC stuff */
 
+#ifdef CONFIG_PPC_ISERIES
+void ppc64_enable_pmcs(void)
+{
+       /* XXX Implement for iseries */
+}
+#else
+
 /*
  * Enabling PMCs will slow partition context switch times so we only do
  * it the first time we write to the PMCs.
@@ -104,12 +111,6 @@ __setup("smt-snooze-delay=", setup_smt_snooze_delay);
 
 static DEFINE_PER_CPU(char, pmcs_enabled);
 
-#ifdef CONFIG_PPC_ISERIES
-void ppc64_enable_pmcs(void)
-{
-       /* XXX Implement for iseries */
-}
-#else
 void ppc64_enable_pmcs(void)
 {
        unsigned long hid0;
index 514aec82869938b8caaa7051b7beeb33b4ef9584..251fdef4384a03affa747586958e030d79e01e2e 100644 (file)
@@ -21,8 +21,8 @@
 
 static void ctrl_write(unsigned int i, unsigned int val)
 {
-       unsigned int tmp;
-       unsigned long shift, mask;
+       unsigned int tmp = 0;
+       unsigned long shift = 0, mask = 0;
 
        dbg("ctrl_write %d %x\n", i, val);
 
index d84ac32fa3b8cf93526767eed382dd1387857ec7..e438cf4cdbfe6b3fcf39e59386e2bef98da1ac65 100644 (file)
@@ -2059,7 +2059,7 @@ ppc_inst_dump(unsigned long adr, long count, int praddr)
 {
        int nr, dotted;
        unsigned long first_adr;
-       unsigned long inst, last_inst;
+       unsigned long inst, last_inst = 0;
        unsigned char val[4];
 
        dotted = 0;
index 16f32156e37883a3074304ff8e291e8c2669301f..595079c07be541edff08da5b86286dabd4f420e6 100644 (file)
@@ -1004,7 +1004,7 @@ static int hvsi_write(struct tty_struct *tty, int from_user,
 {
        struct hvsi_struct *hp = tty->driver_data;
        const char *source = buf;
-       char *kbuf;
+       char *kbuf = NULL;
        unsigned long flags;
        int total = 0;
        int origcount = count;
index 1babc0f87bc2b0d05c2863a540f83b45bdce7c63..db0c0a726cfac6b14f76670ed32b705e84cbb59b 100644 (file)
@@ -1446,7 +1446,7 @@ static struct adb_request* __pmac
 pmu_sr_intr(struct pt_regs *regs)
 {
        struct adb_request *req;
-       int bite;
+       int bite = 0;
 
        if (via[B] & TREQ) {
                printk(KERN_ERR "PMU: spurious SR intr (%x)\n", via[B]);