diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-26 15:03:15 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-26 15:03:15 +0000 |
commit | 96555d383362c30d444593333d60a4588416db62 (patch) | |
tree | df1bb710ebf946f1a7c1b38464ef836fddfee71c /sys/dev/amr/amr.c | |
parent | 8f98488963488a3a64220dd06361d0286c15cdb4 (diff) | |
download | FreeBSD-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/amr/amr.c')
-rw-r--r-- | sys/dev/amr/amr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index 0b52d9f8..16cbeec 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -1316,7 +1316,7 @@ amr_bio_command(struct amr_softc *sc, struct amr_command **acp) } amrd = (struct amrd_softc *)bio->bio_disk->d_drv1; driveno = amrd->amrd_drive - sc->amr_drive; - blkcount = (bio->bio_bcount + AMR_BLKSIZE - 1) / AMR_BLKSIZE; + blkcount = howmany(bio->bio_bcount, AMR_BLKSIZE); ac->ac_mailbox.mb_command = cmd; if (bio->bio_cmd == BIO_READ || bio->bio_cmd == BIO_WRITE) { |