Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Apr 2022 21:59:10 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 9a0cd76bb00d - main - riscv bounce_bus_dma_tag_destroy: Silence set but unused warning.
Message-ID:  <202204122159.23CLxAEk035175@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=9a0cd76bb00da4c1abfca72fbae31dae486a1cb4

commit 9a0cd76bb00da4c1abfca72fbae31dae486a1cb4
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-12 21:58:57 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-12 21:58:57 +0000

    riscv bounce_bus_dma_tag_destroy: Silence set but unused warning.
---
 sys/riscv/riscv/busdma_bounce.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/riscv/riscv/busdma_bounce.c b/sys/riscv/riscv/busdma_bounce.c
index c3452c605390..25e676203fbb 100644
--- a/sys/riscv/riscv/busdma_bounce.c
+++ b/sys/riscv/riscv/busdma_bounce.c
@@ -200,11 +200,13 @@ bounce_bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
 static int
 bounce_bus_dma_tag_destroy(bus_dma_tag_t dmat)
 {
-	bus_dma_tag_t dmat_copy, parent;
+#ifdef KTR
+	bus_dma_tag_t dmat_copy = dmat;
+#endif
+	bus_dma_tag_t parent;
 	int error;
 
 	error = 0;
-	dmat_copy = dmat;
 
 	if (dmat != NULL) {
 		if (dmat->map_count != 0) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204122159.23CLxAEk035175>