aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mlx
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-04-26 15:03:15 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-04-26 15:03:15 +0000
commit057b4402bf634907fd03590e2757e09e975d04c7 (patch)
treedf1bb710ebf946f1a7c1b38464ef836fddfee71c /sys/dev/mlx
parent768f89e0788ab1ab7ea5df9d57082f53567007ec (diff)
downloadsrc-057b4402bf634907fd03590e2757e09e975d04c7.tar.gz
src-057b4402bf634907fd03590e2757e09e975d04c7.zip
sys/dev: extend use of the howmany() macro when available.
We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read.
Notes
Notes: svn path=/head/; revision=298646
Diffstat (limited to 'sys/dev/mlx')
-rw-r--r--sys/dev/mlx/mlx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index 6d9c49b925f2..970053c1ec71 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -1868,7 +1868,7 @@ mlx_startio_cb(void *arg, bus_dma_segment_t *segs, int nsegments, int error)
/* build a suitable I/O command (assumes 512-byte rounded transfers) */
mlxd = bp->bio_disk->d_drv1;
driveno = mlxd->mlxd_drive - sc->mlx_sysdrive;
- blkcount = (bp->bio_bcount + MLX_BLKSIZE - 1) / MLX_BLKSIZE;
+ blkcount = howmany(bp->bio_bcount, MLX_BLKSIZE);
if ((bp->bio_pblkno + blkcount) > sc->mlx_sysdrive[driveno].ms_size)
device_printf(sc->mlx_dev,