git: 16b7da6f7abe - stable/14 - dev/mana: replace power2 function
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 10 Feb 2025 11:15:19 UTC
The branch stable/14 has been updated by dougm:
URL: https://cgit.FreeBSD.org/src/commit/?id=16b7da6f7abea88a34f09651516e9093fc4e8b68
commit 16b7da6f7abea88a34f09651516e9093fc4e8b68
Author: Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2024-06-24 06:55:01 +0000
Commit: Doug Moore <dougm@FreeBSD.org>
CommitDate: 2025-02-10 10:50:32 +0000
dev/mana: replace power2 function
Replace is_power_of_2(length) with power2(length). When length != 0, as in
this case, they produce the same result. This will allow an implementation
of is_power_of_two to be dropped.
Reviewed by: alc, markj
Differential Revision: https://reviews.freebsd.org/D45536
(cherry picked from commit a94ed493b50752cee09245fc312c63b00331f217)
---
sys/dev/mana/gdma_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/mana/gdma_main.c b/sys/dev/mana/gdma_main.c
index 090f6382b071..70985f4fbf65 100644
--- a/sys/dev/mana/gdma_main.c
+++ b/sys/dev/mana/gdma_main.c
@@ -939,7 +939,7 @@ mana_gd_create_dma_region(struct gdma_dev *gd,
int err;
int i;
- if (length < PAGE_SIZE || !is_power_of_2(length)) {
+ if (length < PAGE_SIZE || !powerof2(length)) {
mana_err(NULL, "gmi size incorrect: %u\n", length);
return EINVAL;
}