summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2002-06-10 19:25:21 +0000
committersobomax <sobomax@FreeBSD.org>2002-06-10 19:25:21 +0000
commit920300b8349bd6c222b5aa8140a0446a150745ff (patch)
tree8057ab6ff79b4ef75fecf02f7517751fb7fa424a /sys
parent0dbb92d539359835dcfa6e29ec4d2ac63a38e39b (diff)
downloadFreeBSD-src-920300b8349bd6c222b5aa8140a0446a150745ff.zip
FreeBSD-src-920300b8349bd6c222b5aa8140a0446a150745ff.tar.gz
- Whitespace only: use return statement consistentlt (return (foo), not
return(foo)), kill extra blank names between function names; - fix format string in printf(): devtoname() returns string, not pointer.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/md/md.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 2165c56..29158de 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -201,16 +201,16 @@ new_indir(uint shift)
ip = malloc(sizeof *ip, M_MD, M_NOWAIT | M_ZERO);
if (ip == NULL)
- return(NULL);
+ return (NULL);
ip->array = malloc(sizeof(uintptr_t) * NINDIR,
M_MDSECT, M_NOWAIT | M_ZERO);
if (ip->array == NULL) {
free(ip, M_MD);
- return(NULL);
+ return (NULL);
}
ip->total = NINDIR;
ip->shift = shift;
- return(ip);
+ return (ip);
}
static void
@@ -237,7 +237,6 @@ destroy_indir(struct md_s *sc, struct indir *ip)
del_indir(ip);
}
-
/*
* This function does the math and alloctes the top level "indir" structure
* for a device of "size" sectors.
@@ -290,7 +289,7 @@ s_read(struct indir *ip, off_t offset)
continue;
}
idx = offset & NMASK;
- return(cip->array[idx]);
+ return (cip->array[idx]);
}
return (0);
}
@@ -324,7 +323,7 @@ s_write(struct indir *ip, off_t offset, uintptr_t ptr)
cip->array[idx] =
(uintptr_t)new_indir(cip->shift - nshift);
if (cip->array[idx] == 0)
- return(ENOMEM);
+ return (ENOMEM);
cip->used++;
up = cip->array[idx];
cip = (struct indir *)up;
@@ -363,7 +362,7 @@ mdopen(dev_t dev, int flag, int fmt, struct thread *td)
struct disklabel *dl;
if (md_debug)
- printf("mdopen(%p %x %x %p)\n",
+ printf("mdopen(%s %x %x %p)\n",
devtoname(dev), flag, fmt, td);
sc = dev->si_drv1;
@@ -468,7 +467,6 @@ mdstart_malloc(struct md_s *sc, struct bio *bp)
return (error);
}
-
static int
mdstart_preload(struct md_s *sc, struct bio *bp)
{
OpenPOWER on IntegriCloud