public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <swboyd@chromium.org>
To: Tri Vo <trong@android.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Hridya Valsaraju <hridya@google.com>,
	Sandeep Patil <sspatil@google.com>,
	Kalesh Singh <kaleshsingh@google.com>,
	Ravi Chandra Sadineni <ravisadineni@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	"Cc: Android Kernel" <kernel-team@android.com>
Subject: Re: [PATCH v7 1/3] PM / wakeup: Drop wakeup_source_init(), wakeup_source_prepare()
Date: Mon, 05 Aug 2019 14:15:14 -0700	[thread overview]
Message-ID: <5d489c63.1c69fb81.f26ec.f009@mx.google.com> (raw)
In-Reply-To: <CANA+-vBX0ZAyZu3itcHUpFcqbbDsa5n3xz547mMYCn_q2dbHtw@mail.gmail.com>

Quoting Tri Vo (2019-08-05 14:11:55)
> On Mon, Aug 5, 2019 at 1:54 PM Stephen Boyd <swboyd@chromium.org> wrote:
> >
> > Quoting Tri Vo (2019-08-05 10:58:46)
> > > @@ -96,13 +79,23 @@ EXPORT_SYMBOL_GPL(wakeup_source_prepare);
> > >  struct wakeup_source *wakeup_source_create(const char *name)
> > >  {
> > >         struct wakeup_source *ws;
> > > +       const char *ws_name;
> > >
> > > -       ws = kmalloc(sizeof(*ws), GFP_KERNEL);
> > > +       ws = kzalloc(sizeof(*ws), GFP_KERNEL);
> > >         if (!ws)
> > > -               return NULL;
> > > +               goto err_ws;
> > > +
> > > +       ws_name = kstrdup_const(name, GFP_KERNEL);
> > > +       if (!ws_name)
> >
> > Does this intentionally change this function to return an error if
> > 'name' is NULL? Before, wakeup_source_prepare() would just assign
> > ws->name to NULL, but now it errors out. I don't see how it's good or
> > useful to allow NULL for the wakeup source name, but it is what it is.
> 
> Yes, the change to not allow ws->name to be NULL is intentional.

Ok. It would be good to mention it in the commit text so we don't think
it was a bug when looking back a few months later.


  reply	other threads:[~2019-08-05 21:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-05 17:58 [PATCH v7 0/3] PM / wakeup: show wakeup sources stats in sysfs Tri Vo
2019-08-05 17:58 ` [PATCH v7 1/3] PM / wakeup: Drop wakeup_source_init(), wakeup_source_prepare() Tri Vo
2019-08-05 20:54   ` Stephen Boyd
2019-08-05 21:11     ` Tri Vo
2019-08-05 21:15       ` Stephen Boyd [this message]
2019-08-05 17:58 ` [PATCH v7 2/3] PM / wakeup: Use wakeup_source_register() in wakelock.c Tri Vo
2019-08-05 20:57   ` Stephen Boyd
2019-08-05 17:58 ` [PATCH v7 3/3] PM / wakeup: Show wakeup sources stats in sysfs Tri Vo
2019-08-05 21:02   ` Stephen Boyd
2019-08-05 23:29   ` Stephen Boyd
2019-08-06 18:51     ` Tri Vo
2019-08-06 21:32       ` Rafael J. Wysocki

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=5d489c63.1c69fb81.f26ec.f009@mx.google.com \
    --to=swboyd@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hridya@google.com \
    --cc=kaleshsingh@google.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=ravisadineni@chromium.org \
    --cc=rjw@rjwysocki.net \
    --cc=sspatil@google.com \
    --cc=trong@android.com \
    --cc=viresh.kumar@linaro.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