On 04.03.24 08:25, Jan Beulich wrote:
On 01.03.2024 15:37, Juergen Gross wrote:
On 29.02.24 16:32, Jan Beulich wrote:
On 12.12.2023 10:47, Juergen Gross wrote:
+#define nrspin_lock_irqsave(l, f)                               \
+    ({                                                          \
+        BUILD_BUG_ON(sizeof(f) != sizeof(unsigned long));       \
+        ((f) = __nrspin_lock_irqsave(l));                       \

I don't think the outer pair of parentheses is needed here.

Turns out it is needed. Otherwise something like:


if ( a )
      nrspin_lock_irqsave(l, f);
else
      ...

will fail with "else without a previous if".

That's for "outer" in the whole #define I suppose, when I commented on
just a specific line inside the construct.

Sorry, I applied your remark to the wrong context.

Yes, one level of parentheses can be removed from this line.


Juergen

Reply via email to