[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 59/68] Type definition
From: |
Marin Ramesa |
Subject: |
[PATCH 59/68] Type definition |
Date: |
Fri, 29 Nov 2013 22:54:24 +0100 |
* i386/i386/pic.c (intnull): Define argument type.
(prtnull): Likewise.
* i386/i386at/com.c (compr_addr): Likewise.
* i386/i386at/kd.c (kd_cmdreg_write, kd_kbd_magic): Likewise.
* i386/i386at/kd_mouse.c (init_mouse_hw): Likewise.
* ipc/mach_port.c (sact_count): Declare void argument list and define void
return type.
Remove (#if 1).
* ipc/mach_rpc.c (mach_port_rpc_sig): Fix argument list.
* kern/act.c (dump_act): Define void return type.
* kern/lock_mon.c (simple_lock, simple_lock_try, simple_unlock): Define return
types.
(lip): Declare void argument list and define void return type.
(lock_info_sort): Define void return type and fix argument list.
(print_lock_info): Define void return type.
(time_lock): Define void return type and define argument type.
* kern/timer.c (time_trap_uexit): Define argument type.
---
i386/i386/pic.c | 5 ++---
i386/i386at/com.c | 2 +-
i386/i386at/kd.c | 4 ++--
i386/i386at/kd_mouse.c | 2 +-
ipc/mach_port.c | 7 ++-----
ipc/mach_rpc.c | 2 +-
kern/act.c | 2 +-
kern/lock_mon.c | 16 ++++++++--------
kern/timer.c | 2 +-
9 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/i386/i386/pic.c b/i386/i386/pic.c
index e09082e..f6d85b6 100644
--- a/i386/i386/pic.c
+++ b/i386/i386/pic.c
@@ -204,7 +204,6 @@ picinit(void)
}
-
/*
** form_pic_mask(int_lvl)
**
@@ -240,7 +239,7 @@ form_pic_mask(void)
}
void
-intnull(unit_dev)
+intnull(int unit_dev)
{
printf("intnull(%d)\n", unit_dev);
}
@@ -248,7 +247,7 @@ intnull(unit_dev)
int prtnull_count = 0;
void
-prtnull(unit)
+prtnull(int unit)
{
++prtnull_count;
}
diff --git a/i386/i386at/com.c b/i386/i386at/com.c
index e6ba427..681ff36 100644
--- a/i386/i386at/com.c
+++ b/i386/i386at/com.c
@@ -824,7 +824,7 @@ comstop(
* Code to be called from debugger.
*
*/
-void compr_addr(addr)
+void compr_addr(unsigned short addr)
{
/* The two line_stat prints may show different values, since
* touching some of the registers constitutes changing them.
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index 53b549e..176034e 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -2240,7 +2240,7 @@ int ch=KC_CMD_READ;
}
void
-kd_cmdreg_write(val)
+kd_cmdreg_write(int val)
{
int ch=KC_CMD_WRITE;
@@ -2353,7 +2353,7 @@ static int which_button[] = {0, MOUSE_LEFT, MOUSE_MIDDLE,
MOUSE_RIGHT};
static struct mouse_motion moved;
int
-kd_kbd_magic(scancode)
+kd_kbd_magic(int scancode)
{
int new_button = 0;
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index 020bc8c..a1aaaf2 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -110,7 +110,7 @@ int mouse_char_index; /* mouse
response */
* init_mouse_hw - initialize the serial port.
*/
void
-init_mouse_hw(unit, mode)
+init_mouse_hw(int unit, int mode)
{
unsigned short base_addr = cominfo[unit]->address;
diff --git a/ipc/mach_port.c b/ipc/mach_port.c
index acbcfb9..383e8c4 100644
--- a/ipc/mach_port.c
+++ b/ipc/mach_port.c
@@ -1453,11 +1453,9 @@ mach_port_set_rpcinfo(
return kr;
}
-#if 1
int sacts, maxsacts;
-#endif
-sact_count()
+void sact_count(void)
{
printf("%d server activations in use, %d max\n", sacts, maxsacts);
}
@@ -1525,12 +1523,11 @@ mach_port_create_act(
/* Pass our reference to the activation back to the user. */
*out_act = act;
-#if 1
sacts++;
if (sacts > maxsacts)
maxsacts = sacts;
act->mact.pcb->ss.mpsfu_high = 0x69;
-#endif
+
return KERN_SUCCESS;
}
diff --git a/ipc/mach_rpc.c b/ipc/mach_rpc.c
index d84e93f..36ce17e 100644
--- a/ipc/mach_rpc.c
+++ b/ipc/mach_rpc.c
@@ -142,7 +142,7 @@ mach_port_rpc_copy(
}
kern_return_t
-mach_port_rpc_sig(space, name, buffer, buflen)
+mach_port_rpc_sig(void)
{
return KERN_FAILURE;
}
diff --git a/kern/act.c b/kern/act.c
index f7808fa..52084d3 100644
--- a/kern/act.c
+++ b/kern/act.c
@@ -1072,7 +1072,7 @@ void act_count(void)
ACT_STATIC_KLUDGE-i, ACT_STATIC_KLUDGE, ACT_STATIC_KLUDGE-amin);
}
-dump_act(Act *act)
+void dump_act(Act *act)
{
act_count();
kact_count();
diff --git a/kern/lock_mon.c b/kern/lock_mon.c
index 135e0a1..8733524 100644
--- a/kern/lock_mon.c
+++ b/kern/lock_mon.c
@@ -107,7 +107,7 @@ decl_simple_lock_data(, **lock)
return(li);
}
-simple_lock(lock)
+void simple_lock(lock)
decl_simple_lock_data(, *lock)
{
struct lock_info *li = locate_lock_info(&lock);
@@ -126,7 +126,7 @@ decl_simple_lock_data(, *lock)
li->time = time_stamp - li->time;
}
-simple_lock_try(lock)
+int simple_lock_try(lock)
decl_simple_lock_data(, *lock)
{
struct lock_info *li = locate_lock_info(&lock);
@@ -146,7 +146,7 @@ decl_simple_lock_data(, *lock)
}
}
-simple_unlock(lock)
+void simple_unlock(lock)
decl_simple_lock_data(, *lock)
{
time_stamp_t stamp = time_stamp;
@@ -162,7 +162,7 @@ decl_simple_lock_data(, *lock)
}
}
-lip() {
+void lip(void) {
lis(4, 1, 0);
}
@@ -171,7 +171,7 @@ lip() {
unsigned scurval, ssum;
struct lock_info *sli;
-lock_info_sort(arg, abs, count)
+void lock_info_sort(int count)
{
struct lock_info *li, mean;
int bucket = 0;
@@ -252,7 +252,7 @@ lock_info_sort(arg, abs, count)
#define lock_info_clear lic
-lock_info_clear()
+void lock_info_clear(void)
{
struct lock_info *li;
int bucket = 0;
@@ -266,7 +266,7 @@ lock_info_clear()
memset(&default_lock_info, 0, sizeof(struct lock_info));
}
-print_lock_info(struct lock_info *li)
+void print_lock_info(struct lock_info *li)
{
int off;
int sum = li->success + li->fail;
@@ -293,7 +293,7 @@ print_lock_info(struct lock_info *li)
* Measure lock/unlock operations
*/
-time_lock(loops)
+void time_lock(int loops)
{
decl_simple_lock_data(, lock)
time_stamp_t stamp;
diff --git a/kern/timer.c b/kern/timer.c
index 1c9ea11..70932c6 100644
--- a/kern/timer.c
+++ b/kern/timer.c
@@ -142,7 +142,7 @@ time_trap_uentry(unsigned ts)
* user mode.
*/
void
-time_trap_uexit(ts)
+time_trap_uexit(int ts)
{
int elapsed;
int mycpu;
--
1.8.1.4
- [PATCH 46/68] kern/ipc_kobject.c: remove forward declarations, (continued)
- [PATCH 46/68] kern/ipc_kobject.c: remove forward declarations, Marin Ramesa, 2013/11/29
- [PATCH 47/68] vm/vm_fault.c: remove forward declaration, Marin Ramesa, 2013/11/29
- [PATCH 48/68] vm/vm_kern.c: remove forward declarations, Marin Ramesa, 2013/11/29
- [PATCH 50/68] vm/vm_pageout.c: remove forward declarations, Marin Ramesa, 2013/11/29
- [PATCH 49/68] vm/vm_map.c: remove forward declarations, Marin Ramesa, 2013/11/29
- [PATCH 52/68] vm/vm_user.c: remove forward declaration, Marin Ramesa, 2013/11/29
- [PATCH 51/68] vm/vm_resident.c: correct comment, Marin Ramesa, 2013/11/29
- [PATCH 53/68] Normalize whitespace, Marin Ramesa, 2013/11/29
- [PATCH 56/68] Remove unnecessary files, Marin Ramesa, 2013/11/29
- [PATCH 58/68] kern/time_stamp.c: remove multimax code, Marin Ramesa, 2013/11/29
- [PATCH 59/68] Type definition,
Marin Ramesa <=
- [PATCH 60/68] device/net_io.c: remove forward declarations, Marin Ramesa, 2013/11/29
- [PATCH 61/68] i386/i386at/kd.c: remove forward declarations, Marin Ramesa, 2013/11/29
- [PATCH 62/68] i386/i386at/model_dep.c: remove forward declaration, Marin Ramesa, 2013/11/29
- [PATCH 63/68] ipc/ipc_entry.c: remove forward declaration, Marin Ramesa, 2013/11/29
- [PATCH 65/68] kern/mach_clock.c: remove forward declaration, Marin Ramesa, 2013/11/29
- [PATCH 64/68] ipc/mach_port.c: remove forward declaration, Marin Ramesa, 2013/11/29
- [PATCH 66/68] ddb/db_variables.c: fix near initialization, Marin Ramesa, 2013/11/29
- [PATCH 67/68] device/ds_routines.c: fix initialization from incompatible pointer type, Marin Ramesa, 2013/11/29
- [PATCH 68/68] i386/i386at/com.h: include chips/busses.h for struct bus_device, Marin Ramesa, 2013/11/29
- [PATCH 57/68] Remove MACH_TTD code, Marin Ramesa, 2013/11/29