From: Lv Zheng Date: Thu, 5 May 2016 04:58:32 +0000 (+0800) Subject: ACPICA: Utilities: Add ACPI_IS_ALIGNED() macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e35d75024b28083b0a84cdb73b826f8450b29d49;p=openwrt%2Fstaging%2Fblogic.git ACPICA: Utilities: Add ACPI_IS_ALIGNED() macro This patch introduces ACPI_IS_ALIGNED() macro. Lv Zheng. Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h index 73f6653c848d..ecbaabae59e7 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