Thread (47 messages) 47 messages, 7 authors, 2016-05-27
STALE3702d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 07/13] ACPICA: Utilities: Add ACPI_IS_ALIGNED() macro

From: Lv Zheng <hidden>
Date: 2016-05-05 04:58:41
Also in: lkml
Subsystem: acpi, acpi component architecture (acpica), the rest · Maintainers: "Rafael J. Wysocki", Saket Dumbre, Linus Torvalds

This patch introduces ACPI_IS_ALIGNED() macro. Lv Zheng.

Signed-off-by: Lv Zheng <redacted>
---
 drivers/acpi/acpica/acmacros.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h
index 73f6653..ecbaaba 100644
--- a/drivers/acpi/acpica/acmacros.h
+++ b/drivers/acpi/acpica/acmacros.h
@@ -262,7 +262,8 @@
 
 /* Generic (power-of-two) rounding */
 
-#define ACPI_IS_POWER_OF_TWO(a)             (((a) & ((a) - 1)) == 0)
+#define ACPI_IS_ALIGNED(a, s)               (((a) & ((s) - 1)) == 0)
+#define ACPI_IS_POWER_OF_TWO(a)             ACPI_IS_ALIGNED(a, a)
 
 /*
  * Bitmask creation
-- 
1.7.10
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help