Commit
fd0cbdd378258fdf44eac5ea091256a4a665315b
Exists in
master
and in
39 other branches
8mp-imx_5.4.70_2.3.0, 8qm-imx_5.4.70_2.3.0, emb_imx_lf-5.15.y, emb_lf-6.1.y, imx_3.0.35_4.1.0, imx_3.10.17_1.0.1_ga, imx_3.10.53_1.1.0_ga, imx_3.14.28_1.0.0_ga, imx_4.1.15_1.0.0_ga, pitx_8mp_lf-5.10.y, rt-smarc-imx_4.1.15_1.0.0_ga, rt_linux_5.15.71, smarc-8m-android-11.0.0_2.0.0, smarc-imx6_4.14.98_2.0.0_ga, smarc-imx6_4.9.88_2.0.0_ga, smarc-imx7_4.14.98_2.0.0_ga, smarc-imx7_4.9.11_1.0.0_ga, smarc-imx7_4.9.88_2.0.0_ga, smarc-imx_3.10.53_1.1.0_ga, smarc-imx_3.14.28_1.0.0_ga, smarc-imx_4.1.15_1.0.0_ga, smarc-imx_4.9.11_1.0.0_ga, smarc-imx_4.9.51_imx8m_ga, smarc-imx_4.9.88_2.0.0_ga, smarc-m6.0.1_2.1.0-ga, smarc-n7.1.2_2.0.0-ga, smarc-rel_imx_4.1.15_1.2.0_ga, smarc_8m_00d0_imx_4.14.98_2.0.0_ga, smarc_8m_imx_4.14.78_1.0.0_ga, smarc_8m_imx_4.14.98_2.0.0_ga, smarc_8m_imx_4.19.35_1.1.0, smarc_8mm_imx_4.14.78_1.0.0_ga, smarc_8mm_imx_4.14.98_2.0.0_ga, smarc_8mm_imx_4.19.35_1.1.0, smarc_8mm_imx_5.4.24_2.1.0, smarc_8mp_lf-5.10.y, smarc_8mq_imx_5.4.24_2.1.0, smarc_8mq_lf-5.10.y, smarc_imx_lf-5.15.y
Fix WARN_ON() on bitfield ops for all other archs
Fixes WARN_ON() on bitfiels ops for all architectures that have
been left out in 8d4fbcfbe0a4bfc73e7f0297c59ae514e1f1436f.
Cc: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing
4 changed files
with
4 additions
and
4 deletions
Side-by-side Diff
... |
... |
@@ -57,7 +57,7 @@ |
57
|
57 |
|
58
|
58 |
#define WARN_ON(condition) \ |
59
|
59 |
({ \ |
60
|
|
- typeof(condition) __ret_warn_on = (condition); \ |
|
60 |
+ int __ret_warn_on = !!(condition); \ |
61
|
61 |
if (unlikely(__ret_warn_on)) \ |
62
|
62 |
_BUG_OR_WARN(BUGFLAG_WARNING); \ |
63
|
63 |
unlikely(__ret_warn_on); \ |
... |
... |
@@ -74,7 +74,7 @@ |
74
|
74 |
|
75
|
75 |
|
76
|
76 |
#define WARN_ON(x) ({ \ |
77
|
|
- typeof(x) __ret_warn_on = (x); \ |
|
77 |
+ int __ret_warn_on = !!(x); \ |
78
|
78 |
if (__builtin_constant_p(__ret_warn_on)) { \ |
79
|
79 |
if (__ret_warn_on) \ |
80
|
80 |
__WARN(); \ |
... |
... |
@@ -50,7 +50,7 @@ |
50
|
50 |
#define BUG() __EMIT_BUG(0) |
51
|
51 |
|
52
|
52 |
#define WARN_ON(x) ({ \ |
53
|
|
- typeof(x) __ret_warn_on = (x); \ |
|
53 |
+ int __ret_warn_on = !!(x); \ |
54
|
54 |
if (__builtin_constant_p(__ret_warn_on)) { \ |
55
|
55 |
if (__ret_warn_on) \ |
56
|
56 |
__EMIT_BUG(BUGFLAG_WARNING); \ |
... |
... |
@@ -61,7 +61,7 @@ |
61
|
61 |
} while (0) |
62
|
62 |
|
63
|
63 |
#define WARN_ON(x) ({ \ |
64
|
|
- typeof(x) __ret_warn_on = (x); \ |
|
64 |
+ int __ret_warn_on = !!(x); \ |
65
|
65 |
if (__builtin_constant_p(__ret_warn_on)) { \ |
66
|
66 |
if (__ret_warn_on) \ |
67
|
67 |
__WARN(); \ |