From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Shaohua Li <shaohua.li@intel.com>
Cc: "linux-pm@lists.linux-foundation.org"
<linux-pm@lists.linux-foundation.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
"david-b@pacbell.net" <david-b@pacbell.net>,
"dbrownell@users.sourceforge.net"
<dbrownell@users.sourceforge.net>
Subject: Re: [RFC 3/5] pci wakeup handler
Date: Wed, 22 Oct 2008 14:01:52 +0200 [thread overview]
Message-ID: <200810221401.53211.rjw@sisk.pl> (raw)
In-Reply-To: <20081022053444.GC15271@sli10-desk.sh.intel.com>
On Wednesday, 22 of October 2008, Shaohua Li wrote:
> On Mon, Oct 20, 2008 at 03:50:40AM +0800, Rafael J. Wysocki wrote:
> > On Thursday, 11 of September 2008, Shaohua Li wrote:
> > > pci subsystem wakeup handler.
> >
> > Perhaps add a bit more explanation here - what is introduced, why and why this
> > particular way.
> I'll add a kernel doc in later post.
>
> > > +static bool pci_handle_one_wakeup_event(struct pci_dev *pdev)
> > > +{
> >
> > I don't really like that being a boolean function. I'd make it return 0 on
> > success and error code on failure.
> Oh, in my previous post, somebody like a boolean and then you like an int
> in the mail list. Either is ok to me, but I'd like to have a reason
> instead of a 'like' or 'unlike'.
That was probably me, but in a different context. ;-)
Use 'bool' for functions that are intended as boolean, eg.
'system_entering_hibernation()' will return 'true' if the system is entering
hibernation at the moment and 'false' otherwise, but for functions like
pci_handle_one_wakeup_event() the standard it to return 0 on success, so IMO
we should follow the standard.
HTH
next prev parent reply other threads:[~2008-10-22 11:57 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-11 6:30 [RFC 0/5] device wakeup event support v2 Shaohua Li
2008-09-11 6:30 ` [RFC 1/5] devcore introduce wakeup_event callback Shaohua Li
2008-09-11 6:30 ` Shaohua Li
2008-10-19 19:04 ` Rafael J. Wysocki
2008-10-19 19:42 ` Rafael J. Wysocki
2008-10-19 19:42 ` Rafael J. Wysocki
2008-10-22 5:23 ` Shaohua Li
2008-10-22 5:23 ` Shaohua Li
2008-09-11 6:30 ` [RFC 2/5] devcore adds generic wakeup event handler Shaohua Li
2008-09-11 6:30 ` Shaohua Li
2008-09-11 18:48 ` Bjorn Helgaas
2008-09-11 18:48 ` Bjorn Helgaas
2008-10-19 19:06 ` Rafael J. Wysocki
2008-10-22 5:24 ` Shaohua Li
2008-10-22 11:57 ` Rafael J. Wysocki
2008-10-22 11:57 ` Rafael J. Wysocki
2008-10-22 5:24 ` Shaohua Li
2008-10-19 19:06 ` Rafael J. Wysocki
2008-09-11 6:30 ` [RFC 3/5] pci wakeup handler Shaohua Li
2008-10-19 19:50 ` Rafael J. Wysocki
2008-10-22 5:34 ` Shaohua Li
2008-10-22 12:01 ` Rafael J. Wysocki [this message]
2008-10-22 12:01 ` Rafael J. Wysocki
2008-10-22 5:34 ` Shaohua Li
2008-09-11 6:30 ` Shaohua Li
2008-09-11 6:30 ` [RFC 4/5] PCIe native PME detection Shaohua Li
2008-09-11 6:30 ` Shaohua Li
2008-10-19 20:30 ` Rafael J. Wysocki
2008-10-22 5:49 ` Shaohua Li
2008-10-22 12:08 ` Rafael J. Wysocki
2008-10-22 12:08 ` Rafael J. Wysocki
2008-10-22 5:49 ` Shaohua Li
2008-09-11 6:30 ` [RFC 5/5] ACPI GPE based wakeup event detection Shaohua Li
2008-10-19 20:39 ` Rafael J. Wysocki
2008-10-22 6:51 ` Shaohua Li
2008-10-22 12:12 ` Rafael J. Wysocki
2008-10-22 12:12 ` Rafael J. Wysocki
2008-10-22 6:51 ` Shaohua Li
2008-09-11 6:30 ` Shaohua Li
2008-09-14 23:50 ` [RFC 0/5] device wakeup event support v2 Rafael J. Wysocki
2008-09-14 23:50 ` Rafael J. Wysocki
2008-10-06 1:57 ` Shaohua Li
2008-10-06 1:57 ` Shaohua Li
-- strict thread matches above, loose matches on Subject: below --
2008-09-08 9:19 [RFC 0/5] device wakeup event support shaohua.li
2008-09-08 9:19 ` [RFC 3/5] pci wakeup handler shaohua.li
2008-09-08 9:19 ` shaohua.li
2008-09-08 13:09 ` Rafael J. Wysocki
2008-09-09 1:44 ` Li, Shaohua
2008-09-09 1:44 ` Li, Shaohua
2008-09-09 2:56 ` David Brownell
2008-09-09 2:56 ` David Brownell
2008-09-09 3:38 ` Li, Shaohua
2008-09-09 3:38 ` Li, Shaohua
2008-09-08 13:09 ` Rafael J. Wysocki
2008-09-09 2:56 ` David Brownell
2008-09-09 3:33 ` Li, Shaohua
2008-09-09 4:04 ` David Brownell
2008-09-09 4:04 ` David Brownell
2008-09-09 3:33 ` Li, Shaohua
2008-09-09 11:09 ` Rafael J. Wysocki
2008-09-09 11:09 ` Rafael J. Wysocki
2008-09-09 16:18 ` David Brownell
2008-09-09 16:18 ` David Brownell
2008-09-09 2:56 ` David Brownell
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=200810221401.53211.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=david-b@pacbell.net \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=shaohua.li@intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.