From fed2c08c45bd0e87b90d07fd52011de129be9315 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Fri, 20 Jan 2023 01:19:53 -0500 Subject: Fix several warnings for -Wmissing-prototypes * device/ds_routines.c: use static qualifier. * device/subrs.c: delete unused functions. * i386/i386/ast_check.c: include prototypes in kern/ast.h * i386/i386/db_disasm.c: Include prototypes in ddb/db_examine.h * i386/i386/db_interface.h: Define prototype for kdb_kentry. Expose debug methods feep and kd_debug_put. * i386/i386/db_trace.c: delete left over cthreads support, functions are not used. * i386/i386/model_dep.h: Define prototype for c_boot_entry. * i386/i386at/acpi_parse_apic.c: Static qualifiers. * i386/i386at/autoconf.c: Include header file for prototypes and remove dead code. * i386/i386at/autoconf.h: Fix prototype. * i386/i386at/com.c: Add static qualifiers, delete dead code. * i386/i386at/com.c: ditto. * i386/i386at/com.h: Define prototypes for debug functions. * i386/i386at/int_init.c: Include header. * i386/i386at/kd.c: Include header for debug interface. Remove dead kd_cmdreg_read and make xga_getpos static. * i386/i386at/kd_mouse.c: Static qualifiers. * i386/i386at/lpr.c: Dead lprpr. * i386/i386at/model_dep.c: Remove exit function. * kern/mach_clock.c: Include mig prototypes. * kern/mach_clock.h: Remove duplicates of mig prototypes. * kern/machine.c: Use static. * kern/startup.c: slave_main is unused. * kern/thread.h: Define thread_stats that is useful for debugging. * kern/timer.c: Keep db_thread_times since it can be used for debugging. * kern/timer.h: ditto. * linux/dev/glue/misc.c: Use mig header for host_get_time. Message-Id: --- device/subrs.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'device/subrs.c') diff --git a/device/subrs.c b/device/subrs.c index 2cf7e6f4..6e90a810 100644 --- a/device/subrs.c +++ b/device/subrs.c @@ -38,18 +38,6 @@ -/* - * Print out disk name and block number for hard disk errors. - */ -void harderr(const io_req_t ior, const char *cp) -{ - printf("%s%d%c: hard error sn%lu ", - cp, - minor(ior->io_unit) >> 3, - 'a' + (minor(ior->io_unit) & 0x7), - ior->io_recnum); -} - /* * Convert Ethernet address to printable (loggable) representation. */ @@ -96,35 +84,3 @@ void wakeup(vm_offset_t channel) { thread_wakeup((event_t) channel); } - -io_req_t -geteblk(int size) -{ - io_req_t ior; - - io_req_alloc(ior, 0); - ior->io_device = (mach_device_t)0; - ior->io_unit = 0; - ior->io_op = 0; - ior->io_mode = 0; - ior->io_recnum = 0; - ior->io_count = size; - ior->io_residual = 0; - ior->io_error = 0; - - size = round_page(size); - ior->io_alloc_size = size; - if (kmem_alloc(kernel_map, (vm_offset_t *)&ior->io_data, size) - != KERN_SUCCESS) - panic("geteblk"); - - return (ior); -} - -void brelse(io_req_t ior) -{ - (void) vm_deallocate(kernel_map, - (vm_offset_t) ior->io_data, - ior->io_alloc_size); - io_req_free(ior); -} -- cgit v1.2.3