From: Greg KH <gregkh@linuxfoundation.org>
To: Tri Vo <trong@android.com>
Cc: "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>,
LKML <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
"Cc: Android Kernel" <kernel-team@android.com>
Subject: Re: [PATCH] PM / wakeup: show wakeup sources stats in sysfs
Date: Thu, 27 Jun 2019 08:04:12 +0800 [thread overview]
Message-ID: <20190627000412.GA527@kroah.com> (raw)
In-Reply-To: <CANA+-vD+qBqENZrk_7KZzedbzGPMzHniHTE4sY93gnkzzBif6A@mail.gmail.com>
On Wed, Jun 26, 2019 at 03:48:58PM -0700, Tri Vo wrote:
> On Tue, Jun 25, 2019 at 6:33 PM Tri Vo <trong@android.com> wrote:
> >
> > On Tue, Jun 25, 2019 at 6:12 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> > >
> > > On Tue, Jun 25, 2019 at 05:54:49PM -0700, Tri Vo wrote:
> > > > Embedding a struct kobject into struct wakeup_source changes lifetime
> > > > requirements on the latter. To that end, change deallocation of struct
> > > > wakeup_source using kfree to kobject_put().
> > >
> > > Ick, are you sure you need a new kobject here? Why wouldn't a named
> > > attribute group work instead? That should keep this patch much smaller
> > > and simpler.
> >
> > Yeah, named attribute groups might be a much cleaner way to do this.
> > Let me investigate.
>
> Say, we read /sys/power/wakeup_sources/foo/active_count.
What is "foo" here? You didn't include Documentation of the sysfs
files so it was pretty impossible to say what exactly your heirachy was
going to be in order to determine this :)
> This
> attribute's show function needs to find wakeup_source struct of "foo".
> I'm not sure how to do that without embedding a kobject inside of
> wakeup_source.
Again, without knowing what "foo" is, I can't really answer this.
Surely "foo" is not a flat namespace of all 'struct device' in the
kernel, right?
thanks,
greg k-h
next prev parent reply other threads:[~2019-06-27 0:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 0:54 [PATCH] PM / wakeup: show wakeup sources stats in sysfs Tri Vo
2019-06-26 0:59 ` Tri Vo
2019-06-26 1:12 ` Greg KH
2019-06-26 1:33 ` Tri Vo
2019-06-26 1:46 ` Greg KH
2019-06-26 22:26 ` Tri Vo
2019-06-26 22:48 ` Tri Vo
2019-06-27 0:04 ` Greg KH [this message]
2019-06-27 22:53 ` [PATCH v2] " Tri Vo
2019-06-28 15:10 ` Greg KH
2019-07-04 10:31 ` Rafael J. Wysocki
2019-07-08 3:33 ` Tri Vo
2019-07-15 20:11 ` [PATCH v3] " Tri Vo
2019-07-15 20:36 ` Greg KH
2019-07-15 21:43 ` [PATCH v4] " Tri Vo
2019-07-15 21:48 ` Rafael J. Wysocki
2019-07-16 2:11 ` Greg Kroah-Hartman
2019-07-16 4:16 ` Tri Vo
2019-07-16 8:30 ` Rafael J. Wysocki
2019-07-16 8:39 ` Greg Kroah-Hartman
2019-07-16 9:36 ` Rafael J. Wysocki
2019-07-15 21:48 ` [PATCH v3] " Tri Vo
2019-07-16 2:12 ` Greg KH
2019-06-27 22:57 ` [PATCH] " Tri Vo
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=20190627000412.GA527@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=hridya@google.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.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;
as well as URLs for NNTP newsgroup(s).