Commit 280da4e4 authored by Richard Henderson's avatar Richard Henderson Committed by Linus Torvalds

alpha: Remove set but unused variables.

This is a new warning in gcc 4.6.  Several of these variables are
used within #if 0 code, which probably ought to be removed.  Most
of the changes are legitimate cleanups.
Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 90fd30c9
...@@ -88,7 +88,7 @@ conf_read(unsigned long addr, unsigned char type1, ...@@ -88,7 +88,7 @@ conf_read(unsigned long addr, unsigned char type1,
{ {
unsigned long flags; unsigned long flags;
unsigned long mid = MCPCIA_HOSE2MID(hose->index); unsigned long mid = MCPCIA_HOSE2MID(hose->index);
unsigned int stat0, value, temp, cpu; unsigned int stat0, value, cpu;
cpu = smp_processor_id(); cpu = smp_processor_id();
...@@ -101,7 +101,7 @@ conf_read(unsigned long addr, unsigned char type1, ...@@ -101,7 +101,7 @@ conf_read(unsigned long addr, unsigned char type1,
stat0 = *(vuip)MCPCIA_CAP_ERR(mid); stat0 = *(vuip)MCPCIA_CAP_ERR(mid);
*(vuip)MCPCIA_CAP_ERR(mid) = stat0; *(vuip)MCPCIA_CAP_ERR(mid) = stat0;
mb(); mb();
temp = *(vuip)MCPCIA_CAP_ERR(mid); *(vuip)MCPCIA_CAP_ERR(mid);
DBG_CFG(("conf_read: MCPCIA_CAP_ERR(%d) was 0x%x\n", mid, stat0)); DBG_CFG(("conf_read: MCPCIA_CAP_ERR(%d) was 0x%x\n", mid, stat0));
mb(); mb();
...@@ -136,7 +136,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1, ...@@ -136,7 +136,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1,
{ {
unsigned long flags; unsigned long flags;
unsigned long mid = MCPCIA_HOSE2MID(hose->index); unsigned long mid = MCPCIA_HOSE2MID(hose->index);
unsigned int stat0, temp, cpu; unsigned int stat0, cpu;
cpu = smp_processor_id(); cpu = smp_processor_id();
...@@ -145,7 +145,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1, ...@@ -145,7 +145,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1,
/* Reset status register to avoid losing errors. */ /* Reset status register to avoid losing errors. */
stat0 = *(vuip)MCPCIA_CAP_ERR(mid); stat0 = *(vuip)MCPCIA_CAP_ERR(mid);
*(vuip)MCPCIA_CAP_ERR(mid) = stat0; mb(); *(vuip)MCPCIA_CAP_ERR(mid) = stat0; mb();
temp = *(vuip)MCPCIA_CAP_ERR(mid); *(vuip)MCPCIA_CAP_ERR(mid);
DBG_CFG(("conf_write: MCPCIA CAP_ERR(%d) was 0x%x\n", mid, stat0)); DBG_CFG(("conf_write: MCPCIA CAP_ERR(%d) was 0x%x\n", mid, stat0));
draina(); draina();
...@@ -157,7 +157,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1, ...@@ -157,7 +157,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1,
*((vuip)addr) = value; *((vuip)addr) = value;
mb(); mb();
mb(); /* magic */ mb(); /* magic */
temp = *(vuip)MCPCIA_CAP_ERR(mid); /* read to force the write */ *(vuip)MCPCIA_CAP_ERR(mid); /* read to force the write */
mcheck_expected(cpu) = 0; mcheck_expected(cpu) = 0;
mb(); mb();
...@@ -572,12 +572,10 @@ mcpcia_print_system_area(unsigned long la_ptr) ...@@ -572,12 +572,10 @@ mcpcia_print_system_area(unsigned long la_ptr)
void void
mcpcia_machine_check(unsigned long vector, unsigned long la_ptr) mcpcia_machine_check(unsigned long vector, unsigned long la_ptr)
{ {
struct el_common *mchk_header;
struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout; struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout;
unsigned int cpu = smp_processor_id(); unsigned int cpu = smp_processor_id();
int expected; int expected;
mchk_header = (struct el_common *)la_ptr;
mchk_logout = (struct el_MCPCIA_uncorrected_frame_mcheck *)la_ptr; mchk_logout = (struct el_MCPCIA_uncorrected_frame_mcheck *)la_ptr;
expected = mcheck_expected(cpu); expected = mcheck_expected(cpu);
......
...@@ -533,8 +533,6 @@ static struct el_subpacket_annotation el_titan_annotations[] = { ...@@ -533,8 +533,6 @@ static struct el_subpacket_annotation el_titan_annotations[] = {
static struct el_subpacket * static struct el_subpacket *
el_process_regatta_subpacket(struct el_subpacket *header) el_process_regatta_subpacket(struct el_subpacket *header)
{ {
int status;
if (header->class != EL_CLASS__REGATTA_FAMILY) { if (header->class != EL_CLASS__REGATTA_FAMILY) {
printk("%s ** Unexpected header CLASS %d TYPE %d, aborting\n", printk("%s ** Unexpected header CLASS %d TYPE %d, aborting\n",
err_print_prefix, err_print_prefix,
...@@ -551,7 +549,7 @@ el_process_regatta_subpacket(struct el_subpacket *header) ...@@ -551,7 +549,7 @@ el_process_regatta_subpacket(struct el_subpacket *header)
printk("%s ** Occurred on CPU %d:\n", printk("%s ** Occurred on CPU %d:\n",
err_print_prefix, err_print_prefix,
(int)header->by_type.regatta_frame.cpuid); (int)header->by_type.regatta_frame.cpuid);
status = privateer_process_logout_frame((struct el_common *) privateer_process_logout_frame((struct el_common *)
header->by_type.regatta_frame.data_start, 1); header->by_type.regatta_frame.data_start, 1);
break; break;
default: default:
......
...@@ -1404,8 +1404,6 @@ determine_cpu_caches (unsigned int cpu_type) ...@@ -1404,8 +1404,6 @@ determine_cpu_caches (unsigned int cpu_type)
case PCA56_CPU: case PCA56_CPU:
case PCA57_CPU: case PCA57_CPU:
{ {
unsigned long cbox_config, size;
if (cpu_type == PCA56_CPU) { if (cpu_type == PCA56_CPU) {
L1I = CSHAPE(16*1024, 6, 1); L1I = CSHAPE(16*1024, 6, 1);
L1D = CSHAPE(8*1024, 5, 1); L1D = CSHAPE(8*1024, 5, 1);
...@@ -1415,10 +1413,12 @@ determine_cpu_caches (unsigned int cpu_type) ...@@ -1415,10 +1413,12 @@ determine_cpu_caches (unsigned int cpu_type)
} }
L3 = -1; L3 = -1;
#if 0
unsigned long cbox_config, size;
cbox_config = *(vulp) phys_to_virt (0xfffff00008UL); cbox_config = *(vulp) phys_to_virt (0xfffff00008UL);
size = 512*1024 * (1 << ((cbox_config >> 12) & 3)); size = 512*1024 * (1 << ((cbox_config >> 12) & 3));
#if 0
L2 = ((cbox_config >> 31) & 1 ? CSHAPE (size, 6, 1) : -1); L2 = ((cbox_config >> 31) & 1 ? CSHAPE (size, 6, 1) : -1);
#else #else
L2 = external_cache_probe(512*1024, 6); L2 = external_cache_probe(512*1024, 6);
......
...@@ -79,7 +79,6 @@ ...@@ -79,7 +79,6 @@
static unsigned long __init SMCConfigState(unsigned long baseAddr) static unsigned long __init SMCConfigState(unsigned long baseAddr)
{ {
unsigned char devId; unsigned char devId;
unsigned char devRev;
unsigned long configPort; unsigned long configPort;
unsigned long indexPort; unsigned long indexPort;
...@@ -100,7 +99,7 @@ static unsigned long __init SMCConfigState(unsigned long baseAddr) ...@@ -100,7 +99,7 @@ static unsigned long __init SMCConfigState(unsigned long baseAddr)
devId = inb(dataPort); devId = inb(dataPort);
if (devId == VALID_DEVICE_ID) { if (devId == VALID_DEVICE_ID) {
outb(DEVICE_REV, indexPort); outb(DEVICE_REV, indexPort);
devRev = inb(dataPort); /* unsigned char devRev = */ inb(dataPort);
break; break;
} }
else else
......
...@@ -156,7 +156,6 @@ static void __init ...@@ -156,7 +156,6 @@ static void __init
wildfire_init_irq_per_pca(int qbbno, int pcano) wildfire_init_irq_per_pca(int qbbno, int pcano)
{ {
int i, irq_bias; int i, irq_bias;
unsigned long io_bias;
static struct irqaction isa_enable = { static struct irqaction isa_enable = {
.handler = no_action, .handler = no_action,
.name = "isa_enable", .name = "isa_enable",
...@@ -165,10 +164,12 @@ wildfire_init_irq_per_pca(int qbbno, int pcano) ...@@ -165,10 +164,12 @@ wildfire_init_irq_per_pca(int qbbno, int pcano)
irq_bias = qbbno * (WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA) irq_bias = qbbno * (WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA)
+ pcano * WILDFIRE_IRQ_PER_PCA; + pcano * WILDFIRE_IRQ_PER_PCA;
#if 0
unsigned long io_bias;
/* Only need the following for first PCI bus per PCA. */ /* Only need the following for first PCI bus per PCA. */
io_bias = WILDFIRE_IO(qbbno, pcano<<1) - WILDFIRE_IO_BIAS; io_bias = WILDFIRE_IO(qbbno, pcano<<1) - WILDFIRE_IO_BIAS;
#if 0
outb(0, DMA1_RESET_REG + io_bias); outb(0, DMA1_RESET_REG + io_bias);
outb(0, DMA2_RESET_REG + io_bias); outb(0, DMA2_RESET_REG + io_bias);
outb(DMA_MODE_CASCADE, DMA2_MODE_REG + io_bias); outb(DMA_MODE_CASCADE, DMA2_MODE_REG + io_bias);
......
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