mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "Arve Hjønnevåg" <arve@android.com>,
	"Linux-pm mailing list" <linux-pm@lists.linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] PM / Wakeup: Introduce wakeup source objects and event statistics (was: Re: Wakeup-events implementation)
Date: Sat, 11 Sep 2010 00:29:31 +0200	[thread overview]
Message-ID: <201009110029.31843.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1009101119060.1651-100000@iolanthe.rowland.org>

On Friday, September 10, 2010, Rafael J. Wysocki wrote:
> On Friday, September 10, 2010, Alan Stern wrote:
> > On Wed, 8 Sep 2010, Rafael J. Wysocki wrote:
> > 
> > > +struct wakeup_source *wakeup_source_create(const char *name)
> > > +{
> > > +	struct wakeup_source *ws;
> > > +
> > > +	ws = kzalloc(sizeof(*ws), GFP_KERNEL);
> > > +	if (!ws)
> > > +		return NULL;
> > > +
> > > +	if (name) {
> > > +		int len = strlen(name);
> > > +		char *s = kzalloc(len + 1, GFP_KERNEL);
> > > +		if (s) {
> > > +			strncpy(s, name, len);
> > > +			ws->name = s;
> > > +		}
> > > +	}
> > > +
> > > +	return ws;
> > > +}
> > 
> > Forget what I wrote earlier; it was stupid.  Just use kstrdup.

Right, I didn't know it existed. :-)

Thanks,
Rafael

  reply	other threads:[~2010-09-10 22:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.44L0.1008201051490.1716-100000@iolanthe.rowland.org>
2010-09-07 23:51 ` Rafael J. Wysocki
2010-09-08 20:17   ` Alan Stern
2010-09-08 23:58     ` Rafael J. Wysocki
2010-09-10 15:21   ` Alan Stern
2010-09-10 22:29     ` Rafael J. Wysocki [this message]
2010-09-14 22:31       ` PM / Wakeup: Introduce wakeup source objects and event statistics (v2) Rafael J. Wysocki
2010-09-17  0:41         ` Kevin Hilman
2010-09-17  0:54           ` Rafael J. Wysocki
2010-09-17 14:03             ` Alan Stern
2010-09-17 22:26               ` 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=201009110029.31843.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=arve@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®