From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752795AbdBAQiS (ORCPT ); Wed, 1 Feb 2017 11:38:18 -0500 Received: from mail-oi0-f67.google.com ([209.85.218.67]:35604 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbdBAQiR (ORCPT ); Wed, 1 Feb 2017 11:38:17 -0500 MIME-Version: 1.0 In-Reply-To: <20170201163426.2287910-1-arnd@arndb.de> References: <20170201163426.2287910-1-arnd@arndb.de> From: Arnd Bergmann Date: Wed, 1 Feb 2017 17:38:16 +0100 X-Google-Sender-Auth: O8eSt9ca5suDHasin0mJRneRj-g Message-ID: Subject: Re: [PATCH] [RFC] sched: make DECLARE_COMPLETION_ONSTACK() work with clang To: Linux Kernel Mailing List Cc: linux-mm@kvack.org, Arnd Bergmann , Ingo Molnar Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 1, 2017 at 5:34 PM, Arnd Bergmann wrote: > diff --git a/include/linux/completion.h b/include/linux/completion.h > index fa5d3efaba56..5d5aaae3af43 100644 > --- a/include/linux/completion.h > +++ b/include/linux/completion.h > @@ -31,7 +31,7 @@ struct completion { > { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) } > > #define COMPLETION_INITIALIZER_ONSTACK(work) \ > - (*init_completion(&work)) > + ({ init_completion(&work); work; }) > > /** > * DECLARE_COMPLETION - declare and initialize a completion structure > @@ -70,11 +70,10 @@ struct completion { > * This inline function will initialize a dynamically created completion > * structure. > */ > -static inline struct completion *init_completion(struct completion *x) > +static inline void init_completion(struct completion *x) > { > x->done = 0; > init_waitqueue_head(&x->wait); > - return x; > } > I accidentally submitted the wrong patch, this is the revert of the actual change. Arnd