diff options
author | John Baldwin <jhb@FreeBSD.org> | 2021-02-17 21:12:06 +0000 |
---|---|---|
committer | Alex Richardson <arichardson@FreeBSD.org> | 2021-07-05 09:46:11 +0000 |
commit | ae0219c10fe3a2ea9caa7bc88ddc7d0a7e988efd (patch) | |
tree | 3949d07eb069b7aab294db1905ec6767a39489ca | |
parent | 0a55a5bf61707c87b3976eaf203ef4f988c4c396 (diff) | |
download | src-ae0219c10fe3a2ea9caa7bc88ddc7d0a7e988efd.tar.gz src-ae0219c10fe3a2ea9caa7bc88ddc7d0a7e988efd.zip |
fwohci: Cast bitfield to uint32_t before passing it to roundup2().
The fallback for __align_up() used by roundup2() uses __typeof__()
which doesn't work for bitfields. This fixes the build on GCC which
uses the fallback.
Reviewed by: arichardson, markj
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D28599
(cherry picked from commit 50a61f8db532676d7dc37410540fff7209b7c072)
-rw-r--r-- | sys/dev/firewire/fwohci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index 30eca83900e7..634c78e6afe8 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -2696,7 +2696,7 @@ fwohci_get_plen(struct fwohci_softc *sc, struct fwohci_dbch *dbch, struct fw_pkt info = &tinfo[fp->mode.common.tcode]; r = info->hdr_len + sizeof(uint32_t); if ((info->flag & FWTI_BLOCK_ASY) != 0) - r += roundup2(fp->mode.wreqb.len, sizeof(uint32_t)); + r += roundup2((uint32_t)fp->mode.wreqb.len, sizeof(uint32_t)); if (r == sizeof(uint32_t)) { /* XXX */ |