summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-26 15:03:15 +0000
committerpfg <pfg@FreeBSD.org>2016-04-26 15:03:15 +0000
commit96555d383362c30d444593333d60a4588416db62 (patch)
treedf1bb710ebf946f1a7c1b38464ef836fddfee71c /sys/dev/mlx
parent8f98488963488a3a64220dd06361d0286c15cdb4 (diff)
downloadFreeBSD-src-96555d383362c30d444593333d60a4588416db62.zip
FreeBSD-src-96555d383362c30d444593333d60a4588416db62.tar.gz
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.
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 6d9c49b..970053c 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,
OpenPOWER on IntegriCloud