Commit 5835ea4d authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] ppc64: Fix spurious warnings uncovered by -Wno-uninitialized removal

Here are fixes for some false positives.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2b656999
......@@ -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;
......
......@@ -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;
......
......@@ -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) {
......
......@@ -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";
......
......@@ -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="))
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment