From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Satyam Sharma" <satyam.sharma@gmail.com>,
"Andrew Morton" <akpm@linux-foundation.org>
Cc: "Johannes Berg" <johannes@sipsolutions.net>,
LKML <linux-kernel@vger.kernel.org>,
"Pavel Machek" <pavel@ucw.cz>,
"Nigel Cunningham" <nigel@nigel.suspend2.net>,
"Pekka Enberg" <penberg@cs.helsinki.fi>
Subject: Re: [PATCH -mm] PM: Separate hibernation code from suspend code
Date: Sat, 5 May 2007 00:47:24 +0200 [thread overview]
Message-ID: <200705050047.25517.rjw@sisk.pl> (raw)
In-Reply-To: <a781481a0705041022jdc163fg20882d450338fb53@mail.gmail.com>
On Friday, 4 May 2007 19:22, Satyam Sharma wrote:
> Trivial suggestions:
>
> On 5/4/07, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > --- linux-2.6.21.orig/include/linux/suspend.h 2007-05-02 22:08:58.000000000 +0200
> > +++ linux-2.6.21/include/linux/suspend.h 2007-05-03 15:22:24.000000000 +0200
> > [...]
> > +/**
> > + * hibernation_set_ops - set the global hibernate operations
> > + * @ops: the hibernation operations to use in subsequent hibernation transitions
> > + */
> > +extern void hibernation_set_ops(struct hibernation_ops *ops);
>
> Comment must go near code, not with prototype in header.
>
> > +/**
> > + * hibernate - hibernate the system
> > + */
> > +extern int hibernate(void);
>
> Pointless comment. You've already written a doc-book comment in the
> code for this function anyway, so could just as well remove this.
The appended patch fixes these problems.
Greetings,
Rafael
---
From: Rafael J. Wysocki <rjw@sisk.pl>
Remove unnecessary comments in include/linux/suspend.h and add a comment
describing hibernation_set_ops() in kernel/power/disk.c .
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
include/linux/suspend.h | 8 --------
kernel/power/disk.c | 5 +++++
2 files changed, 5 insertions(+), 8 deletions(-)
Index: linux-2.6.21/include/linux/suspend.h
===================================================================
--- linux-2.6.21.orig/include/linux/suspend.h 2007-05-05 00:39:53.000000000 +0200
+++ linux-2.6.21/include/linux/suspend.h 2007-05-05 00:43:39.000000000 +0200
@@ -58,15 +58,7 @@ extern void swsusp_set_page_free(struct
extern void swsusp_unset_page_free(struct page *);
extern unsigned long get_safe_page(gfp_t gfp_mask);
-/**
- * hibernation_set_ops - set the global hibernate operations
- * @ops: the hibernation operations to use in subsequent hibernation transitions
- */
extern void hibernation_set_ops(struct hibernation_ops *ops);
-
-/**
- * hibernate - hibernate the system
- */
extern int hibernate(void);
#else
static inline void register_nosave_region(unsigned long b, unsigned long e) {}
Index: linux-2.6.21/kernel/power/disk.c
===================================================================
--- linux-2.6.21.orig/kernel/power/disk.c 2007-05-05 00:40:02.000000000 +0200
+++ linux-2.6.21/kernel/power/disk.c 2007-05-05 00:43:32.000000000 +0200
@@ -47,6 +47,11 @@ enum {
struct hibernation_ops *hibernation_ops;
+/**
+ * hibernation_set_ops - set the global hibernate operations
+ * @ops: the hibernation operations to use in subsequent hibernation transitions
+ */
+
void hibernation_set_ops(struct hibernation_ops *ops)
{
if (ops && !(ops->prepare && ops->enter && ops->finish)) {
next prev parent reply other threads:[~2007-05-04 22:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-04 9:32 Rafael J. Wysocki
2007-05-04 17:22 ` Satyam Sharma
2007-05-04 22:47 ` Rafael J. Wysocki [this message]
2007-05-05 6:31 ` Andrew Morton
2007-05-05 10:16 ` Rafael J. Wysocki
2007-05-05 12:21 ` Rafael J. Wysocki
2007-05-05 12:27 ` Johannes Berg
2007-05-05 13:50 ` Rafael J. Wysocki
2007-05-05 21:01 ` Pavel Machek
2007-05-07 11:46 ` Johannes Berg
2007-05-07 11:56 ` Johannes Berg
2007-05-07 21:35 ` Rafael J. Wysocki
2007-05-08 8:41 ` Johannes Berg
2007-05-08 11:05 ` Rafael J. Wysocki
2007-05-08 20:46 ` [PATCH -mm] swsusp: Use reasonable default for hibernation_mode Rafael J. Wysocki
2007-05-05 16:55 ` [PATCH -mm] PM: Separate hibernation code from suspend code Jason L Tibbitts III
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=200705050047.25517.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@linux-foundation.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=nigel@nigel.suspend2.net \
--cc=pavel@ucw.cz \
--cc=penberg@cs.helsinki.fi \
--cc=satyam.sharma@gmail.com \
/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®