diff options
author | Ka Ho Ng <khng@FreeBSD.org> | 2021-03-23 08:11:56 +0000 |
---|---|---|
committer | Ka Ho Ng <khng@FreeBSD.org> | 2021-03-26 13:50:36 +0000 |
commit | c4a34bb3f82346df0f96ce128bd2e7306ba9bfec (patch) | |
tree | bff3486a5fb582a7ed9075007eebce69ce15b790 | |
parent | 47c00a9835926e96e562c67fa28e4432e99d9c56 (diff) | |
download | src-c4a34bb3f82346df0f96ce128bd2e7306ba9bfec.tar.gz src-c4a34bb3f82346df0f96ce128bd2e7306ba9bfec.zip |
bhyve amd: Small cleanups in amdvi_dump_cmds
Bump offset with MOD_INC instead in amdvi_dump_cmds.
Reviewed by: jhb
Approved by: philip (mentor)
Differential Revision: https://reviews.freebsd.org/D28862
(cherry picked from commit be97fc8dced052f824387a1ae6a0063f9dcfdc89)
-rw-r--r-- | sys/amd64/vmm/amd/amdvi_hw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/amd64/vmm/amd/amdvi_hw.c b/sys/amd64/vmm/amd/amdvi_hw.c index 62aba04de050..132ae8389f2a 100644 --- a/sys/amd64/vmm/amd/amdvi_hw.c +++ b/sys/amd64/vmm/amd/amdvi_hw.c @@ -514,8 +514,7 @@ amdvi_dump_cmds(struct amdvi_softc *softc, int count) printf(" [CMD%d, off:0x%x] opcode= 0x%x 0x%x" " 0x%x 0x%lx\n", i, off, cmd->opcode, cmd->word0, cmd->word1, cmd->addr); - off = (off + sizeof(struct amdvi_cmd)) % - (softc->cmd_max * sizeof(struct amdvi_cmd)); + off = MOD_INC(off, sizeof(struct amdvi_cmd), softc->cmd_max); } } |