- 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.
This commit is contained in:
parent
0dbb92d539
commit
920300b834
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user