From: Boqun Feng <boqun.feng@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
walken@google.com, Byungchul Park <byungchul.park@lge.com>,
Arnd Bergmann <arnd@arndb.de>,
Andrew Morton <akpm@linux-foundation.org>,
willy@infradead.org, Nicholas Piggin <npiggin@gmail.com>,
kernel-team@lge.com, Dan Williams <dan.j.williams@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
linux-nvdimm@lists.01.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH 1/2] nfit: Use init_completion() in acpi_nfit_flush_probe()
Date: Thu, 24 Aug 2017 21:28:01 +0800 [thread overview]
Message-ID: <20170824132801.GM11771@tardis> (raw)
In-Reply-To: <alpine.DEB.2.20.1708241507160.1860@nanos>
[-- Attachment #1: Type: text/plain, Size: 1566 bytes --]
On Thu, Aug 24, 2017 at 03:07:42PM +0200, Thomas Gleixner wrote:
> On Wed, 23 Aug 2017, Boqun Feng wrote:
>
> > There is no need to use COMPLETION_INITIALIZER_ONSTACK() in
> > acpi_nfit_flush_probe(), replace it with init_completion().
>
> You completely fail to explain WHY.
>
I thought COMPLETION_INITIALIZER_ONSTACK() should only use in assigment
or compound literals, so the usage here is obviously wrong, but seems
I was wrong?
Ingo,
Is the usage of COMPLETION_INITIALIZER_ONSTACK() correct? If not,
I could rephrase my commit log saying this is a fix for wrong usage of
COMPLETION_INITIALIZER_ONSTACK(), otherwise, I will rewrite the commit
indicating this patch is a necessary dependency for patch #2. Thanks!
Regards,
Boqun
> Thanks,
>
> tglx
>
>
> > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> > ---
> > drivers/acpi/nfit/core.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> > index 19182d091587..1893e416e7c0 100644
> > --- a/drivers/acpi/nfit/core.c
> > +++ b/drivers/acpi/nfit/core.c
> > @@ -2884,7 +2884,7 @@ static int acpi_nfit_flush_probe(struct nvdimm_bus_descriptor *nd_desc)
> > * need to be interruptible while waiting.
> > */
> > INIT_WORK_ONSTACK(&flush.work, flush_probe);
> > - COMPLETION_INITIALIZER_ONSTACK(flush.cmp);
> > + init_completion(&flush.cmp);
> > queue_work(nfit_wq, &flush.work);
> > mutex_unlock(&acpi_desc->init_mutex);
> >
> > --
> > 2.14.1
> >
> >
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2017-08-24 13:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 15:25 [PATCH 0/2] completion: Reduce stack usage caused by COMPLETION_INITIALIZER_ONSTACK() Boqun Feng
2017-08-23 15:25 ` [PATCH 1/2] nfit: Use init_completion() in acpi_nfit_flush_probe() Boqun Feng
2017-08-23 22:08 ` Dan Williams
2017-08-24 13:07 ` Thomas Gleixner
2017-08-24 13:28 ` Boqun Feng [this message]
2017-08-24 13:46 ` Arnd Bergmann
2017-08-24 14:22 ` [PATCH v2 1/2] nfit: Fix the abuse of COMPLETION_INITIALIZER_ONSTACK() Boqun Feng
2017-08-25 0:18 ` Boqun Feng
2017-08-25 0:36 ` Dan Williams
2017-08-23 15:25 ` [PATCH 2/2] completion: Avoid unnecessary stack allocation for COMPLETION_INITIALIZER_ONSTACK() Boqun Feng
2017-08-23 15:33 ` [PATCH 0/2] completion: Reduce stack usage caused by COMPLETION_INITIALIZER_ONSTACK() Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170824132801.GM11771@tardis \
--to=boqun.feng@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=byungchul.park@lge.com \
--cc=dan.j.williams@intel.com \
--cc=kernel-team@lge.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mingo@kernel.org \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=walken@google.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox