Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Apr 2022 21:59:14 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: 8d95af873f6b - main - ppc aim flush_disable_caches: Use void casts instead of a dummy variable.
Message-ID:  <202204122159.23CLxEp7035272@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=8d95af873f6bbc112603684f5feaa188fe2f962a

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

    ppc aim flush_disable_caches: Use void casts instead of a dummy variable.
---
 sys/powerpc/aim/aim_machdep.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sys/powerpc/aim/aim_machdep.c b/sys/powerpc/aim/aim_machdep.c
index c5f84675ebd3..7a42bc6b960e 100644
--- a/sys/powerpc/aim/aim_machdep.c
+++ b/sys/powerpc/aim/aim_machdep.c
@@ -649,7 +649,6 @@ flush_disable_caches(void)
 	register_t msscr0;
 	register_t cache_reg;
 	volatile uint32_t *memp;
-	uint32_t temp;
 	int i;
 	int x;
 
@@ -682,7 +681,7 @@ flush_disable_caches(void)
 	 */
 	memp = (volatile uint32_t *)0x00000000;
 	for (i = 0; i < 128 * 1024; i++) {
-		temp = *memp;
+		(void)*memp;
 		__asm__ __volatile__("dcbf 0,%0" :: "r"(memp));
 		memp += 32/sizeof(*memp);
 	}
@@ -693,7 +692,7 @@ flush_disable_caches(void)
 	for (; x != 0xff;) {
 		mtspr(SPR_LDSTCR, x);
 		for (i = 0; i < 128; i++) {
-			temp = *memp;
+			(void)*memp;
 			__asm__ __volatile__("dcbf 0,%0" :: "r"(memp));
 			memp += 32/sizeof(*memp);
 		}



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