Date: Tue, 31 Aug 2021 19:57:37 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 1aaf3bbc74ce - stable/12 - fwohci: Cast bitfield to uint32_t before passing it to roundup2(). Message-ID: <202108311957.17VJvbeJ042438@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1aaf3bbc74ced642831682ee222c68ad42f96d8c commit 1aaf3bbc74ced642831682ee222c68ad42f96d8c Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2021-02-17 21:12:06 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2021-08-31 19:56:51 +0000 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) (cherry picked from commit ae0219c10fe3a2ea9caa7bc88ddc7d0a7e988efd) --- sys/dev/firewire/fwohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index 03df023b7531..e54d0c4f53bd 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -2695,7 +2695,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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108311957.17VJvbeJ042438>