public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Len Brown <len.brown@intel.com>,
	linux-embedded@vger.kernel.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	linux-pm@lists.linux-foundation.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] PM: Hide CONFIG_PM from users
Date: Tue, 8 Feb 2011 00:05:40 +0100	[thread overview]
Message-ID: <201102080005.40448.rjw@sisk.pl> (raw)
In-Reply-To: <20110207222350.GA24804@core.coreip.homeip.net>

On Monday, February 07, 2011, Dmitry Torokhov wrote:
> On Mon, Feb 07, 2011 at 11:00:03PM +0100, Rafael J. Wysocki wrote:
> > On Monday, February 07, 2011, Dmitry Torokhov wrote:
> > > On Mon, Feb 07, 2011 at 10:15:59PM +0100, Rafael J. Wysocki wrote:
> > > > On Monday, February 07, 2011, Mark Brown wrote:
> > > > > 
> > > > > Yeah, but some people seem very keen on removing the pointers to the PM
> > > > > ops entirely when CONFIG_PM is disabled which means that you end up with
> > > > > varying idioms for what you do with the PM ops as stuff gets ifdefed
> > > > > out.  Then again I'm not sure anything would make those people any
> > > > > happier.
> > > > 
> > > > I really think we should do things that makes sense rather that worry about
> > > > who's going to like or dislike it (except for Linus maybe, but he tends to like
> > > > things that make sense anyway).  At this point I think the change I suggested
> > > > makes sense, because it (a) simplifies things and (b) follows the quite common
> > > > practice which is to make PM callbacks depend on CONFIG_PM.
> > > 
> > > Many people make these callback dependent on PM not because it makes
> > > much sense but because it is possible to do so. However, aside of
> > > randconfig compile testing, nobody really tests drivers that implement
> > > PM in the !CONFIG_PM setting.
> > 
> > That I can agree with, but I'm not sure whether it is an argument against
> > the patch I've just posted or for it?
> 
> More of an observation for your (b) justification. I'd probably force
> CONFIG_PM to always 'y'w while we weeding references to it from
> drivers...

We simply can't force CONFIG_PM to 'y', because some platforms want it to be 'n'.

OTOH, if CONFIG_PM = CONFIG_PM_SLEEP||CONFIG_PM_RUNTIME, we can just leave the
#ifdefs as they are and simply avoid adding new ones, or use CONFIG_PM for all
PM callbacks.

Thanks,
Rafael

  parent reply	other threads:[~2011-02-07 23:05 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1297081335-13631-1-git-send-email-broonie@opensource.wolfsonmicro.com>
2011-02-07 12:40 ` [PATCH] PM: Hide CONFIG_PM from users Geert Uytterhoeven
2011-02-07 12:48 ` Ingo Molnar
     [not found] ` <20110207124846.GA10442@elte.hu>
2011-02-07 13:09   ` Mark Brown
     [not found] ` <AANLkTimxpRHW2TPwSnufpoeOHoEtkz1iaR3-VsC1qM4j@mail.gmail.com>
2011-02-07 13:26   ` Mark Brown
2011-02-07 14:13 ` Stephen Rothwell
     [not found] ` <20110208011324.d5371c4c.sfr@canb.auug.org.au>
2011-02-07 14:18   ` Mark Brown
     [not found]   ` <20110207141829.GK10564@opensource.wolfsonmicro.com>
2011-02-07 14:44     ` Stephen Rothwell
     [not found]     ` <20110208014432.2c9288e4.sfr@canb.auug.org.au>
2011-02-07 14:50       ` Mark Brown
     [not found]       ` <20110207145031.GL10564@opensource.wolfsonmicro.com>
2011-02-07 15:00         ` Geert Uytterhoeven
     [not found]         ` <AANLkTikw7j5Q7CGZK=Xbcgubt9LYBGiXf01wQ4nbg8NR@mail.gmail.com>
2011-02-07 15:10           ` Stephen Rothwell
     [not found]           ` <20110208021045.699654ca.sfr@canb.auug.org.au>
2011-02-07 15:19             ` Stephen Rothwell
     [not found]             ` <20110208021916.68b33b37.sfr@canb.auug.org.au>
2011-02-07 15:21               ` Mark Brown
2011-02-07 19:14 ` Rafael J. Wysocki
     [not found] ` <201102072014.04259.rjw@sisk.pl>
2011-02-07 19:30   ` Mark Brown
     [not found]   ` <20110207193026.GT10564@opensource.wolfsonmicro.com>
2011-02-07 19:46     ` Rafael J. Wysocki
     [not found]     ` <201102072046.48763.rjw@sisk.pl>
2011-02-07 20:18       ` Mark Brown
     [not found]       ` <20110207201803.GU10564@opensource.wolfsonmicro.com>
2011-02-07 21:15         ` Rafael J. Wysocki
     [not found]         ` <201102072215.59921.rjw@sisk.pl>
2011-02-07 21:47           ` Dmitry Torokhov
     [not found]           ` <20110207214732.GA24703@core.coreip.homeip.net>
2011-02-07 22:00             ` Rafael J. Wysocki
     [not found]             ` <201102072300.03986.rjw@sisk.pl>
2011-02-07 22:23               ` Dmitry Torokhov
     [not found]               ` <20110207222350.GA24804@core.coreip.homeip.net>
2011-02-07 23:05                 ` Rafael J. Wysocki [this message]
2011-02-08  0:50                   ` Dmitry Torokhov
     [not found]                   ` <20110208005053.GB24804@core.coreip.homeip.net>
2011-02-08  9:23                     ` Rafael J. Wysocki
2011-02-08 16:48                   ` Paul Mundt
2011-02-08 12:12           ` Mark Brown
2011-02-08 12:21           ` [PATCH] Remove CONFIG_PM altogether, enable power management all the time Ingo Molnar
     [not found]           ` <20110208122159.GA8284@elte.hu>
2011-02-08 21:18             ` [PATCH 0/5] " Rafael J. Wysocki
     [not found]             ` <201102082218.28015.rjw@sisk.pl>
2011-02-08 21:20               ` [PATCH 1/5] ACPI / PM: Move references to pm_flags into sleep.c Rafael J. Wysocki
2011-02-08 21:21               ` [PATCH 2/5] PM: Make CONFIG_PM depend on (CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME) Rafael J. Wysocki
2011-02-08 21:21               ` [PATCH 3/5] PM: Reorder power management Kconfig options Rafael J. Wysocki
2011-02-08 21:22               ` [PATCH 4/5] PM: Replace CONFIG_PM_OPS with CONFIG_PM Rafael J. Wysocki
2011-02-08 21:23               ` [PATCH 5/5] PM: Clean up Kconfig dependencies Rafael J. Wysocki
     [not found]               ` <201102082220.25240.rjw@sisk.pl>
2011-02-08 23:40                 ` [PATCH 1/5] ACPI / PM: Move references to pm_flags into sleep.c Linus Torvalds
     [not found]                 ` <AANLkTinAZphXC=7FParFnxDPQvpB1ic=FwTe7u4Txy5o@mail.gmail.com>
2011-02-09  0:37                   ` Rafael J. Wysocki
     [not found]                   ` <201102090137.52697.rjw@sisk.pl>
2011-02-09  1:04                     ` Linus Torvalds
     [not found]               ` <201102082223.37975.rjw@sisk.pl>
2011-02-08 23:43                 ` [PATCH 5/5] PM: Clean up Kconfig dependencies Linus Torvalds
2011-02-10 23:32                 ` [Updated][PATCH 5/5] PM: Clean up PM_TRACE dependencies and drop unnecessary Kconfig option Rafael J. Wysocki
2011-02-08 23:35             ` [PATCH] Remove CONFIG_PM altogether, enable power management all the time Frank Rowand
2011-02-08 23:35             ` Tim Bird
     [not found]             ` <AANLkTimWnT8f=PyLgOOrZOaMx0pdv+yNtPw2T7=kO2G-@mail.gmail.com>
2011-02-09  2:41               ` Ingo Molnar
2011-02-08  2:52 ` [PATCH] PM: Hide CONFIG_PM from users Frank Rowand
     [not found] ` <4D50AFD0.9020704@am.sony.com>
2011-02-08 14:15   ` Mark Brown
2011-02-08 14:29 ` Pavel Machek
     [not found] <20110207152132.GM10564@opensource.wolfsonmicro.com>
2011-02-07 15:36 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.1102071035320.1924-100000@iolanthe.rowland.org>
2011-02-07 15:49   ` Mark Brown
     [not found]   ` <20110207154953.GN10564@opensource.wolfsonmicro.com>
2011-02-07 19:16     ` Rafael J. Wysocki
2011-02-08  1:17     ` Ray Lee
     [not found]     ` <AANLkTimh=8pSmQ6i-5H5+agSso7dCOcOrUJ6Uq_fu7nh@mail.gmail.com>
2011-02-08 11:18       ` Mark Brown
2011-02-07 12:22 Mark Brown

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=201102080005.40448.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=len.brown@intel.com \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mingo@elte.hu \
    /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