From: Kees van Reeuwijk Date: Wed, 2 Jun 2010 19:41:38 +0000 (+0000) Subject: Removed some unused variables and functions. X-Git-Tag: v3.1.7~12 X-Git-Url: http://zhaoyanbai.com/repos/nsupdate.html?a=commitdiff_plain;h=ed0b81c25c78cb4dded4c099f76b5ea0c9d47c5b;p=minix.git Removed some unused variables and functions. --- diff --git a/drivers/audio/es1370/es1370.c b/drivers/audio/es1370/es1370.c index c690dee17..52020f129 100644 --- a/drivers/audio/es1370/es1370.c +++ b/drivers/audio/es1370/es1370.c @@ -602,7 +602,6 @@ PRIVATE int disable_int(int chan) { PRIVATE int get_samples_in_buf (u32_t *samples_in_buf, int *len, int chan) { u16_t samp_ct_reg; u16_t curr_samp_ct_reg; - u16_t samp_ct; /* nr of samples - 1 that will be played back */ u16_t curr_samp_ct; /* counts back from SAMP_CT till 0 */ *len = sizeof(*samples_in_buf); diff --git a/drivers/audio/es1371/es1371.c b/drivers/audio/es1371/es1371.c index 9ac2fc121..500bb74c6 100644 --- a/drivers/audio/es1371/es1371.c +++ b/drivers/audio/es1371/es1371.c @@ -604,7 +604,6 @@ PRIVATE int disable_int(int chan) { PRIVATE int get_samples_in_buf (u32_t *samples_in_buf, int *len, int chan) { u16_t samp_ct_reg; u16_t curr_samp_ct_reg; - u16_t samp_ct; /* nr of samples - 1 that will be played back */ u16_t curr_samp_ct; /* counts back from SAMP_CT till 0 */ *len = sizeof(*samples_in_buf); diff --git a/drivers/pci/main.c b/drivers/pci/main.c index 11f53c055..8ddd0cc4d 100644 --- a/drivers/pci/main.c +++ b/drivers/pci/main.c @@ -34,7 +34,7 @@ FORWARD _PROTOTYPE( void sef_local_startup, (void) ); int main(void) { - int i, r; + int r; message m; int ipc_status; @@ -121,10 +121,9 @@ message *mp; mp->m_source, r); } -PRIVATE void do_first_dev(mp) -message *mp; +PRIVATE void do_first_dev(message *mp) { - int i, r, devind; + int r, devind; u16_t vid, did; struct rs_pci *aclp; @@ -376,10 +375,9 @@ message *mp; reply(mp, OK); } -PRIVATE void do_del_acl(mp) -message *mp; +PRIVATE void do_del_acl(message *mp) { - int i, r, proc_nr; + int i, proc_nr; if (mp->m_source != RS_PROC_NR) { @@ -417,10 +415,9 @@ message *mp; reply(mp, OK); } -PRIVATE void do_reserve(mp) -message *mp; +PRIVATE void do_reserve(message *mp) { - int i, r, devind; + int r, devind; devind= mp->m1_i1; diff --git a/drivers/ti1225/ti1225.c b/drivers/ti1225/ti1225.c index 65ba4a5e3..1d590c88b 100644 --- a/drivers/ti1225/ti1225.c +++ b/drivers/ti1225/ti1225.c @@ -185,8 +185,7 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info) return(OK); } -PRIVATE void hw_init(pp) -struct port *pp; +PRIVATE void hw_init(struct port *pp) { int r, devind, irq; u8_t v8; @@ -313,8 +312,7 @@ PRIVATE void map_regs(struct port *pp, u32_t base) panic("map_regs: sys_vm_map failed: %d", r); } -PRIVATE void do_int(pp) -struct port *pp; +PRIVATE void do_int(struct port *pp) { int r, devind, vcc_5v, vcc_3v, vcc_Xv, vcc_Yv, socket_5v, socket_3v, socket_Xv, socket_Yv; diff --git a/kernel/arch/i386/apic.c b/kernel/arch/i386/apic.c index 37b1b2a9e..9af83c8ac 100644 --- a/kernel/arch/i386/apic.c +++ b/kernel/arch/i386/apic.c @@ -45,14 +45,11 @@ #define VERBOSE_APIC(x) x -PRIVATE int reboot_type; PRIVATE int ioapic_enabled; PRIVATE u32_t ioapic_id_mask[8]; -PRIVATE u32_t lapic_id_mask[8]; PUBLIC u32_t lapic_addr_vaddr; PUBLIC vir_bytes lapic_addr; PUBLIC vir_bytes lapic_eoi_addr; -PRIVATE u32_t lapic_taskpri_addr; PRIVATE volatile int probe_ticks; PRIVATE u64_t tsc0, tsc1; @@ -62,8 +59,6 @@ PRIVATE u32_t lapic_tctr0, lapic_tctr1; PUBLIC u8_t apicid2cpuid[MAX_NR_APICIDS+1]; /* Accessed from asm */ PRIVATE unsigned apic_imcrp; -PRIVATE unsigned nioapics; -PRIVATE unsigned nbuses; PRIVATE unsigned nintrs; PRIVATE const unsigned nlints = 0; @@ -77,7 +72,6 @@ PRIVATE u32_t lapic_bus_freq[CONFIG_MAX_CPUS]; #define PROBE_TICKS (system_hz / 10) PRIVATE u32_t pci_config_intr_data; -PRIVATE u32_t ioapic_extint_assigned = 0; PRIVATE int lapic_extint_assigned = 0; PRIVATE int calib_clk_handler(irq_hook_t * UNUSED(hook)) @@ -225,35 +219,6 @@ PRIVATE u32_t lapic_errstatus(void) return lapic_read(LAPIC_ESR); } -PRIVATE void lapic_disable(void) -{ - /* Disable current APIC and close interrupts from PIC */ - u32_t val; - - if (!lapic_addr) - return; - { - /* leave it enabled if imcr is not set */ - val = lapic_read(LAPIC_LINT0); - val &= ~(APIC_ICR_DM_MASK|APIC_ICR_INT_MASK); - val |= APIC_ICR_DM_EXTINT; /* ExtINT at LINT0 */ - lapic_write (LAPIC_LINT0, val); - return; - } - - val = lapic_read(LAPIC_LINT0) & 0xFFFE58FF; - val |= APIC_ICR_INT_MASK; - lapic_write (LAPIC_LINT0, val); - - val = lapic_read(LAPIC_LINT1) & 0xFFFE58FF; - val |= APIC_ICR_INT_MASK; - lapic_write (LAPIC_LINT1, val); - - val = lapic_read(LAPIC_SIVR) & 0xFFFFFF00; - val &= ~APIC_ENABLE; - lapic_write(LAPIC_SIVR, val); -} - PRIVATE void lapic_enable_no_lints(void) { u32_t val; diff --git a/kernel/arch/i386/arch_clock.c b/kernel/arch/i386/arch_clock.c index f43d992b9..8646a32cc 100644 --- a/kernel/arch/i386/arch_clock.c +++ b/kernel/arch/i386/arch_clock.c @@ -63,26 +63,6 @@ PUBLIC void stop_8253A_timer(void) outb(TIMER0, 0); } -/*===========================================================================* - * read_8235A_timer * - *===========================================================================*/ -PRIVATE clock_t read_8253A_timer(void) -{ - /* Read the counter of channel 0 of the 8253A timer. This counter - * counts down at a rate of TIMER_FREQ and restarts at - * TIMER_COUNT-1 when it reaches zero. A hardware interrupt - * (clock tick) occurs when the counter gets to zero and restarts - * its cycle. - */ - u32_t count; - - outb(TIMER_MODE, LATCH_COUNT); - count = inb(TIMER0); - count |= (inb(TIMER0) << 8); - - return count; -} - PRIVATE int calib_cpu_handler(irq_hook_t * UNUSED(hook)) { u64_t tsc; diff --git a/servers/ipc/sem.c b/servers/ipc/sem.c index 496049e4f..baddc6201 100644 --- a/servers/ipc/sem.c +++ b/servers/ipc/sem.c @@ -101,7 +101,6 @@ PUBLIC int do_semget(message *m) PRIVATE void send_message_to_process(endpoint_t who, int ret, int ignore) { message m; - int r; m.m_type = ret; sendnb(who, &m); diff --git a/servers/mfs/cache.c b/servers/mfs/cache.c index b6fb0101e..6e3d522b3 100644 --- a/servers/mfs/cache.c +++ b/servers/mfs/cache.c @@ -53,7 +53,6 @@ PUBLIC struct buf *get_block( int b; static struct buf *bp, *prev_ptr; - int vmfound = 0; u64_t yieldid = VM_BLOCKID_NONE, getid = make64(dev, block); int vmcache = 0; diff --git a/servers/pm/main.c b/servers/pm/main.c index d2a55320c..56da25b61 100644 --- a/servers/pm/main.c +++ b/servers/pm/main.c @@ -59,9 +59,7 @@ FORWARD _PROTOTYPE( int sef_cb_signal_manager, (endpoint_t target, int signo) ); PUBLIC int main() { /* Main routine of the process manager. */ - int result, s, proc_nr; - struct mproc *rmp; - sigset_t sigset; + int result; /* SEF local startup. */ sef_local_startup(); @@ -196,12 +194,10 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info) static char core_sigs[] = { SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGEMT, SIGFPE, SIGBUS, SIGSEGV }; static char ign_sigs[] = { SIGCHLD, SIGWINCH, SIGCONT }; - static char mess_sigs[] = { SIGTERM, SIGHUP, SIGABRT, SIGQUIT }; static char noign_sigs[] = { SIGILL, SIGTRAP, SIGEMT, SIGFPE, SIGBUS, SIGSEGV }; register struct mproc *rmp; register char *sig_ptr; - register int signo; message mess; /* Initialize process table, including timers. */ diff --git a/servers/pm/misc.c b/servers/pm/misc.c index bfce13cc7..984200148 100644 --- a/servers/pm/misc.c +++ b/servers/pm/misc.c @@ -406,7 +406,7 @@ PUBLIC int do_reboot() *===========================================================================*/ PUBLIC int do_getsetpriority() { - int r, arg_which, arg_who, arg_pri, new_q; + int r, arg_which, arg_who, arg_pri; struct mproc *rmp; arg_which = m_in.m1_i1;