[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200705081305.17628.rjw@sisk.pl>
Date: Tue, 8 May 2007 13:05:16 +0200
From: "Rafael J. Wysocki" <rjw@...k.pl>
To: Johannes Berg <johannes@...solutions.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>, Pavel Machek <pavel@....cz>,
Nigel Cunningham <nigel@...el.suspend2.net>,
Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [PATCH -mm] PM: Separate hibernation code from suspend code
On Tuesday, 8 May 2007 10:41, Johannes Berg wrote:
> On Mon, 2007-05-07 at 23:35 +0200, Rafael J. Wysocki wrote:
>
> > > Also, you could then simplify all the instances of
> > > (hibernation_mode == HIBERNATION_PLATFORM && hibernation_ops)
> > > to just
> > > (hibernation_mode == HIBERNATION_PLATFORM)
> > > in various if statements and other places.
> >
> > No, that's not a good idea, because of the "reduce code duplication patch"
> > that I'd like to go on top of this. I'd rather use 'if (hibernation_ops)' here. :-)
>
> But if you want the user to be able to change away from 'platform' mode
> you still have to have
> if (hibernation_ops && hibernation_mode == HIBERNATION_PLATFORM)
> in most places, no?
Yes, and that's why I'm not going to change that. The code from user.c is also
going to call these functions in the future, so the full test is necessary.
For now, I'll only add the 'else if' check to hibernation_set_ops().
Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists