[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3TfZ=_tm0CUC5aKtf5PDwscLYsAN9Tbs2v0iJN5Jz-Rw@mail.gmail.com>
Date: Sat, 19 Aug 2017 15:34:01 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Boqun Feng <boqun.feng@...il.com>
Cc: Byungchul Park <byungchul.park@....com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Michel Lespinasse <walken@...gle.com>, kirill@...temov.name,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>, willy@...radead.org,
Nicholas Piggin <npiggin@...il.com>, kernel-team@....com
Subject: Re: [PATCH v8 09/14] lockdep: Apply crossrelease to completions
On Sat, Aug 19, 2017 at 2:51 PM, Arnd Bergmann <arnd@...db.de> wrote:
>> --- a/include/linux/completion.h
>> +++ b/include/linux/completion.h
>> @@ -74,7 +74,7 @@ static inline void complete_release_commit(struct completion *x) {}
>> #endif
>>
>> #define COMPLETION_INITIALIZER_ONSTACK(work) \
>> - ({ init_completion(&work); work; })
>> + (*({ init_completion(&work); &work; }))
>>
>> /**
>> * DECLARE_COMPLETION - declare and initialize a completion structure
>
> Nice hack. Any idea why that's different to the compiler?
>
> I've applied that one to my test tree now, and reverted my own patch,
> will let you know if anything else shows up. I think we probably want
> to merge both patches to mainline.
There is apparently one user of COMPLETION_INITIALIZER_ONSTACK
that causes a regression with the patch above:
drivers/acpi/nfit/core.c: In function 'acpi_nfit_flush_probe':
include/linux/completion.h:77:3: error: value computed is not used
[-Werror=unused-value]
(*({ init_completion(&work); &work; }))
It would be trivial to convert to init_completion(), which seems to be
what was intended there.
Arnd
Powered by blists - more mailing lists