Declaration whitespace changes for style(9).

MFC after:	1 week
This commit is contained in:
truckman 2014-07-07 22:02:39 +00:00
parent 67a12ecf16
commit 9f3ff514ca

View File

@ -94,12 +94,12 @@ struct resource_i {
u_long r_end; /* index of the last entry (inclusive) */ u_long r_end; /* index of the last entry (inclusive) */
u_int r_flags; u_int r_flags;
void *r_virtual; /* virtual address of this resource */ void *r_virtual; /* virtual address of this resource */
struct device *r_dev; /* device which has allocated this resource */ struct device *r_dev; /* device which has allocated this resource */
struct rman *r_rm; /* resource manager from whence this came */ struct rman *r_rm; /* resource manager from whence this came */
int r_rid; /* optional rid for this resource. */ int r_rid; /* optional rid for this resource. */
}; };
static int rman_debug = 0; static int rman_debug = 0;
SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RWTUN, SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RWTUN,
&rman_debug, 0, "rman debug"); &rman_debug, 0, "rman debug");
@ -107,12 +107,12 @@ SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RWTUN,
static MALLOC_DEFINE(M_RMAN, "rman", "Resource manager"); static MALLOC_DEFINE(M_RMAN, "rman", "Resource manager");
struct rman_head rman_head; struct rman_head rman_head;
static struct mtx rman_mtx; /* mutex to protect rman_head */ static struct mtx rman_mtx; /* mutex to protect rman_head */
static int int_rman_activate_resource(struct rman *rm, struct resource_i *r, static int int_rman_activate_resource(struct rman *rm, struct resource_i *r,
struct resource_i **whohas); struct resource_i **whohas);
static int int_rman_deactivate_resource(struct resource_i *r); static int int_rman_deactivate_resource(struct resource_i *r);
static int int_rman_release_resource(struct rman *rm, struct resource_i *r); static int int_rman_release_resource(struct rman *rm, struct resource_i *r);
static __inline struct resource_i * static __inline struct resource_i *
int_alloc_resource(int malloc_flag) int_alloc_resource(int malloc_flag)
@ -316,8 +316,8 @@ rman_last_free_region(struct rman *rm, u_long *start, u_long *end)
int int
rman_adjust_resource(struct resource *rr, u_long start, u_long end) rman_adjust_resource(struct resource *rr, u_long start, u_long end)
{ {
struct resource_i *r, *s, *t, *new; struct resource_i *r, *s, *t, *new;
struct rman *rm; struct rman *rm;
/* Not supported for shared resources. */ /* Not supported for shared resources. */
r = rr->__r_i; r = rr->__r_i;
@ -438,12 +438,12 @@ rman_adjust_resource(struct resource *rr, u_long start, u_long end)
struct resource * struct resource *
rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end, rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end,
u_long count, u_long bound, u_int flags, u_long count, u_long bound, u_int flags,
struct device *dev) struct device *dev)
{ {
u_int new_rflags; u_int new_rflags;
struct resource_i *r, *s, *rv; struct resource_i *r, *s, *rv;
u_long rstart, rend, amask, bmask; u_long rstart, rend, amask, bmask;
rv = NULL; rv = NULL;
@ -720,9 +720,9 @@ rman_activate_resource(struct resource *re)
int int
rman_await_resource(struct resource *re, int pri, int timo) rman_await_resource(struct resource *re, int pri, int timo)
{ {
int rv; int rv;
struct resource_i *r, *whohas; struct resource_i *r, *whohas;
struct rman *rm; struct rman *rm;
r = re->__r_i; r = re->__r_i;
rm = r->r_rm; rm = r->r_rm;
@ -758,7 +758,7 @@ int_rman_deactivate_resource(struct resource_i *r)
int int
rman_deactivate_resource(struct resource *r) rman_deactivate_resource(struct resource *r)
{ {
struct rman *rm; struct rman *rm;
rm = r->__r_i->r_rm; rm = r->__r_i->r_rm;
mtx_lock(rm->rm_mtx); mtx_lock(rm->rm_mtx);
@ -770,7 +770,7 @@ rman_deactivate_resource(struct resource *r)
static int static int
int_rman_release_resource(struct rman *rm, struct resource_i *r) int_rman_release_resource(struct rman *rm, struct resource_i *r)
{ {
struct resource_i *s, *t; struct resource_i *s, *t;
if (r->r_flags & RF_ACTIVE) if (r->r_flags & RF_ACTIVE)
int_rman_deactivate_resource(r); int_rman_deactivate_resource(r);
@ -864,9 +864,9 @@ out:
int int
rman_release_resource(struct resource *re) rman_release_resource(struct resource *re)
{ {
int rv; int rv;
struct resource_i *r; struct resource_i *r;
struct rman *rm; struct rman *rm;
r = re->__r_i; r = re->__r_i;
rm = r->r_rm; rm = r->r_rm;
@ -879,7 +879,7 @@ rman_release_resource(struct resource *re)
uint32_t uint32_t
rman_make_alignment_flags(uint32_t size) rman_make_alignment_flags(uint32_t size)
{ {
int i; int i;
/* /*
* Find the hightest bit set, and add one if more than one bit * Find the hightest bit set, and add one if more than one bit
@ -897,96 +897,112 @@ rman_make_alignment_flags(uint32_t size)
void void
rman_set_start(struct resource *r, u_long start) rman_set_start(struct resource *r, u_long start)
{ {
r->__r_i->r_start = start; r->__r_i->r_start = start;
} }
u_long u_long
rman_get_start(struct resource *r) rman_get_start(struct resource *r)
{ {
return (r->__r_i->r_start); return (r->__r_i->r_start);
} }
void void
rman_set_end(struct resource *r, u_long end) rman_set_end(struct resource *r, u_long end)
{ {
r->__r_i->r_end = end; r->__r_i->r_end = end;
} }
u_long u_long
rman_get_end(struct resource *r) rman_get_end(struct resource *r)
{ {
return (r->__r_i->r_end); return (r->__r_i->r_end);
} }
u_long u_long
rman_get_size(struct resource *r) rman_get_size(struct resource *r)
{ {
return (r->__r_i->r_end - r->__r_i->r_start + 1); return (r->__r_i->r_end - r->__r_i->r_start + 1);
} }
u_int u_int
rman_get_flags(struct resource *r) rman_get_flags(struct resource *r)
{ {
return (r->__r_i->r_flags); return (r->__r_i->r_flags);
} }
void void
rman_set_virtual(struct resource *r, void *v) rman_set_virtual(struct resource *r, void *v)
{ {
r->__r_i->r_virtual = v; r->__r_i->r_virtual = v;
} }
void * void *
rman_get_virtual(struct resource *r) rman_get_virtual(struct resource *r)
{ {
return (r->__r_i->r_virtual); return (r->__r_i->r_virtual);
} }
void void
rman_set_bustag(struct resource *r, bus_space_tag_t t) rman_set_bustag(struct resource *r, bus_space_tag_t t)
{ {
r->r_bustag = t; r->r_bustag = t;
} }
bus_space_tag_t bus_space_tag_t
rman_get_bustag(struct resource *r) rman_get_bustag(struct resource *r)
{ {
return (r->r_bustag); return (r->r_bustag);
} }
void void
rman_set_bushandle(struct resource *r, bus_space_handle_t h) rman_set_bushandle(struct resource *r, bus_space_handle_t h)
{ {
r->r_bushandle = h; r->r_bushandle = h;
} }
bus_space_handle_t bus_space_handle_t
rman_get_bushandle(struct resource *r) rman_get_bushandle(struct resource *r)
{ {
return (r->r_bushandle); return (r->r_bushandle);
} }
void void
rman_set_rid(struct resource *r, int rid) rman_set_rid(struct resource *r, int rid)
{ {
r->__r_i->r_rid = rid; r->__r_i->r_rid = rid;
} }
int int
rman_get_rid(struct resource *r) rman_get_rid(struct resource *r)
{ {
return (r->__r_i->r_rid); return (r->__r_i->r_rid);
} }
void void
rman_set_device(struct resource *r, struct device *dev) rman_set_device(struct resource *r, struct device *dev)
{ {
r->__r_i->r_dev = dev; r->__r_i->r_dev = dev;
} }
struct device * struct device *
rman_get_device(struct resource *r) rman_get_device(struct resource *r)
{ {
return (r->__r_i->r_dev); return (r->__r_i->r_dev);
} }