diff options
| author | 2021-07-01 07:32:37 +0530 | |
|---|---|---|
| committer | 2021-07-01 07:32:37 +0530 | |
| commit | c503c193db7d7ccc0c58b1ef694eaef331318149 (patch) | |
| tree | 44d3215196f385e88fa5da6affc58649c90e0ea9 /include/linux/const.h | |
| parent | dt-bindings: cpufreq: update cpu type and clock name for MT8173 SoC (diff) | |
| parent | cpufreq: CPPC: Add support for frequency invariance (diff) | |
Merge branch 'cpufreq/cppc-fie' into cpufreq/arm/linux-next
Diffstat (limited to 'include/linux/const.h')
| -rw-r--r-- | include/linux/const.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/const.h b/include/linux/const.h index 81b8aae5a855..435ddd72d2c4 100644 --- a/include/linux/const.h +++ b/include/linux/const.h @@ -3,4 +3,12 @@ #include <vdso/const.h> +/* + * This returns a constant expression while determining if an argument is + * a constant expression, most importantly without evaluating the argument. + * Glory to Martin Uecker <Martin.Uecker@med.uni-goettingen.de> + */ +#define __is_constexpr(x) \ + (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8))) + #endif /* _LINUX_CONST_H */ |
