git: a94ed493b507 - main - dev/mana: replace power2 function
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 24 Jun 2024 07:27:51 UTC
The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=a94ed493b50752cee09245fc312c63b00331f217 commit a94ed493b50752cee09245fc312c63b00331f217 Author: Doug Moore <dougm@FreeBSD.org> AuthorDate: 2024-06-24 06:55:01 +0000 Commit: Doug Moore <dougm@FreeBSD.org> CommitDate: 2024-06-24 06:55:01 +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 --- 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 6be3e148d0da..6f3e182ba1eb 100644 --- a/sys/dev/mana/gdma_main.c +++ b/sys/dev/mana/gdma_main.c @@ -942,7 +942,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; }