Skip to content

Commit 280da4e

Browse files
rth7680torvalds
authored andcommitted
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: Richard Henderson <rth@twiddle.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 90fd30c commit 280da4e

5 files changed

Lines changed: 13 additions & 17 deletions

File tree

‎arch/alpha/kernel/core_mcpcia.c‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ conf_read(unsigned long addr, unsigned char type1,
8888
{
8989
unsigned long flags;
9090
unsigned long mid = MCPCIA_HOSE2MID(hose->index);
91-
unsigned int stat0, value, temp, cpu;
91+
unsigned int stat0, value, cpu;
9292

9393
cpu = smp_processor_id();
9494

@@ -101,7 +101,7 @@ conf_read(unsigned long addr, unsigned char type1,
101101
stat0 = *(vuip)MCPCIA_CAP_ERR(mid);
102102
*(vuip)MCPCIA_CAP_ERR(mid) = stat0;
103103
mb();
104-
temp = *(vuip)MCPCIA_CAP_ERR(mid);
104+
*(vuip)MCPCIA_CAP_ERR(mid);
105105
DBG_CFG(("conf_read: MCPCIA_CAP_ERR(%d) was 0x%x\n", mid, stat0));
106106

107107
mb();
@@ -136,7 +136,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1,
136136
{
137137
unsigned long flags;
138138
unsigned long mid = MCPCIA_HOSE2MID(hose->index);
139-
unsigned int stat0, temp, cpu;
139+
unsigned int stat0, cpu;
140140

141141
cpu = smp_processor_id();
142142

@@ -145,7 +145,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1,
145145
/* Reset status register to avoid losing errors. */
146146
stat0 = *(vuip)MCPCIA_CAP_ERR(mid);
147147
*(vuip)MCPCIA_CAP_ERR(mid) = stat0; mb();
148-
temp = *(vuip)MCPCIA_CAP_ERR(mid);
148+
*(vuip)MCPCIA_CAP_ERR(mid);
149149
DBG_CFG(("conf_write: MCPCIA CAP_ERR(%d) was 0x%x\n", mid, stat0));
150150

151151
draina();
@@ -157,7 +157,7 @@ conf_write(unsigned long addr, unsigned int value, unsigned char type1,
157157
*((vuip)addr) = value;
158158
mb();
159159
mb(); /* magic */
160-
temp = *(vuip)MCPCIA_CAP_ERR(mid); /* read to force the write */
160+
*(vuip)MCPCIA_CAP_ERR(mid); /* read to force the write */
161161
mcheck_expected(cpu) = 0;
162162
mb();
163163

@@ -572,12 +572,10 @@ mcpcia_print_system_area(unsigned long la_ptr)
572572
void
573573
mcpcia_machine_check(unsigned long vector, unsigned long la_ptr)
574574
{
575-
struct el_common *mchk_header;
576575
struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout;
577576
unsigned int cpu = smp_processor_id();
578577
int expected;
579578

580-
mchk_header = (struct el_common *)la_ptr;
581579
mchk_logout = (struct el_MCPCIA_uncorrected_frame_mcheck *)la_ptr;
582580
expected = mcheck_expected(cpu);
583581

‎arch/alpha/kernel/err_titan.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,6 @@ static struct el_subpacket_annotation el_titan_annotations[] = {
533533
static struct el_subpacket *
534534
el_process_regatta_subpacket(struct el_subpacket *header)
535535
{
536-
int status;
537-
538536
if (header->class != EL_CLASS__REGATTA_FAMILY) {
539537
printk("%s ** Unexpected header CLASS %d TYPE %d, aborting\n",
540538
err_print_prefix,
@@ -551,7 +549,7 @@ el_process_regatta_subpacket(struct el_subpacket *header)
551549
printk("%s ** Occurred on CPU %d:\n",
552550
err_print_prefix,
553551
(int)header->by_type.regatta_frame.cpuid);
554-
status = privateer_process_logout_frame((struct el_common *)
552+
privateer_process_logout_frame((struct el_common *)
555553
header->by_type.regatta_frame.data_start, 1);
556554
break;
557555
default:

‎arch/alpha/kernel/setup.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,8 +1404,6 @@ determine_cpu_caches (unsigned int cpu_type)
14041404
case PCA56_CPU:
14051405
case PCA57_CPU:
14061406
{
1407-
unsigned long cbox_config, size;
1408-
14091407
if (cpu_type == PCA56_CPU) {
14101408
L1I = CSHAPE(16*1024, 6, 1);
14111409
L1D = CSHAPE(8*1024, 5, 1);
@@ -1415,10 +1413,12 @@ determine_cpu_caches (unsigned int cpu_type)
14151413
}
14161414
L3 = -1;
14171415

1416+
#if 0
1417+
unsigned long cbox_config, size;
1418+
14181419
cbox_config = *(vulp) phys_to_virt (0xfffff00008UL);
14191420
size = 512*1024 * (1 << ((cbox_config >> 12) & 3));
14201421

1421-
#if 0
14221422
L2 = ((cbox_config >> 31) & 1 ? CSHAPE (size, 6, 1) : -1);
14231423
#else
14241424
L2 = external_cache_probe(512*1024, 6);

‎arch/alpha/kernel/smc37c93x.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
static unsigned long __init SMCConfigState(unsigned long baseAddr)
8080
{
8181
unsigned char devId;
82-
unsigned char devRev;
8382

8483
unsigned long configPort;
8584
unsigned long indexPort;
@@ -100,7 +99,7 @@ static unsigned long __init SMCConfigState(unsigned long baseAddr)
10099
devId = inb(dataPort);
101100
if (devId == VALID_DEVICE_ID) {
102101
outb(DEVICE_REV, indexPort);
103-
devRev = inb(dataPort);
102+
/* unsigned char devRev = */ inb(dataPort);
104103
break;
105104
}
106105
else

‎arch/alpha/kernel/sys_wildfire.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ static void __init
156156
wildfire_init_irq_per_pca(int qbbno, int pcano)
157157
{
158158
int i, irq_bias;
159-
unsigned long io_bias;
160159
static struct irqaction isa_enable = {
161160
.handler = no_action,
162161
.name = "isa_enable",
@@ -165,10 +164,12 @@ wildfire_init_irq_per_pca(int qbbno, int pcano)
165164
irq_bias = qbbno * (WILDFIRE_PCA_PER_QBB * WILDFIRE_IRQ_PER_PCA)
166165
+ pcano * WILDFIRE_IRQ_PER_PCA;
167166

167+
#if 0
168+
unsigned long io_bias;
169+
168170
/* Only need the following for first PCI bus per PCA. */
169171
io_bias = WILDFIRE_IO(qbbno, pcano<<1) - WILDFIRE_IO_BIAS;
170172

171-
#if 0
172173
outb(0, DMA1_RESET_REG + io_bias);
173174
outb(0, DMA2_RESET_REG + io_bias);
174175
outb(DMA_MODE_CASCADE, DMA2_MODE_REG + io_bias);

0 commit comments

Comments
 (0)