* [RFC] CONFIG_PM_LEGACY = compiler warnings for deprecation ... solution?
@ 2007-08-01 5:08 Scott Thompson
2007-08-01 10:57 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Scott Thompson @ 2007-08-01 5:08 UTC (permalink / raw)
To: linux-acpi
w/ CONFIG_PM_LEGACY .config option set, you get following batch of
compile errors because it marks the functions as 'deprecated'. w/o
it set, it just uses stubs. compiler warnings for refernece (from
2.6.23-1, though appears to have been around since at least 2.6.11
from another mail list post).
However, since these functions are required if you have
CONFIG_PM_LEGACY option marked...
I propose that within the include/linux/pm_legacy.h file, functions
in the CONFIG_PM_LEGACY aren't marked 'deprecated' and functions
outside the #if are marked deprecated. Then the handful of calls
(12 or so) that actually call the pm_legacy apis can get wrapped in
the CONFIG_PM_LEGACY flag.
This is basically already being done in one case since as of
2.6.20.1 the pm_register function is only used in
drivers/serial/68328serial.c.
The pm_send_all is not wrapped around all uses yet, but that is
pretty easy to patch. Then the compile will actually complain
should someone try to call it and not wrap w/ the CONFIG_PM_LEGACY
ifdef.
Happy to hear thoughts or other solutions.
------------------------------
Regards,
Scott Thompson / postfail@hushmail.com
------------------------------
--
Free information on vast array of home improvement projects. Click here.
http://tagline.hushmail.com/fc/Ioyw6h4eNIBTzslyd6sFcem0DGn1xrajHGmTczUmHzuMeqA2wEMUHS/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] CONFIG_PM_LEGACY = compiler warnings for deprecation ... solution?
2007-08-01 5:08 [RFC] CONFIG_PM_LEGACY = compiler warnings for deprecation ... solution? Scott Thompson
@ 2007-08-01 10:57 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2007-08-01 10:57 UTC (permalink / raw)
To: postfail; +Cc: linux-acpi, Pavel Machek, pm list
On Wednesday, 1 August 2007 07:08, Scott Thompson wrote:
> w/ CONFIG_PM_LEGACY .config option set, you get following batch of
> compile errors because it marks the functions as 'deprecated'. w/o
> it set, it just uses stubs. compiler warnings for refernece (from
> 2.6.23-1, though appears to have been around since at least 2.6.11
> from another mail list post).
>
> However, since these functions are required if you have
> CONFIG_PM_LEGACY option marked...
>
> I propose that within the include/linux/pm_legacy.h file, functions
> in the CONFIG_PM_LEGACY aren't marked 'deprecated' and functions
> outside the #if are marked deprecated. Then the handful of calls
> (12 or so) that actually call the pm_legacy apis can get wrapped in
> the CONFIG_PM_LEGACY flag.
>
> This is basically already being done in one case since as of
> 2.6.20.1 the pm_register function is only used in
> drivers/serial/68328serial.c.
>
> The pm_send_all is not wrapped around all uses yet, but that is
> pretty easy to patch. Then the compile will actually complain
> should someone try to call it and not wrap w/ the CONFIG_PM_LEGACY
> ifdef.
>
> Happy to hear thoughts or other solutions.
We are going to remove the legacy PM altogether, AFAICS, although there still
are some obstacles.
Greetings,
Rafael
--
"Premature optimization is the root of all evil." - Donald Knuth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] CONFIG_PM_LEGACY = compiler warnings for deprecation ... solution?
@ 2007-08-01 13:53 Scott Thompson
0 siblings, 0 replies; 3+ messages in thread
From: Scott Thompson @ 2007-08-01 13:53 UTC (permalink / raw)
To: rjw; +Cc: linux-acpi, pavel, linux-pm
On Wed, 01 Aug 2007 06:57:25 -0400 "Rafael J. Wysocki"
<rjw@sisk.pl> wrote:
>We are going to remove the legacy PM altogether, AFAICS, although
>there still
>are some obstacles.
>
Thanks -- I had checked Documentation/feature_removal_schedule.txt
for this, but looks like the obsoletion is referenced in
Documentation/pm.txt.
I'll offer to patch in the solution I proposed to prevent the
compile warnings in the interim if you're interested...
---------------------------------------
Scott Thompson / postfail@hushmail.com
---------------------------------------
--
Click to get 150,000 in student loans and find the lowest rates
http://tagline.hushmail.com/fc/Ioyw6h4d7Femgqznt3WSEFC1KSqiZZ3eudvCzwr9tOXpy1LdMQYzRK/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-01 13:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-01 5:08 [RFC] CONFIG_PM_LEGACY = compiler warnings for deprecation ... solution? Scott Thompson
2007-08-01 10:57 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2007-08-01 13:53 Scott Thompson
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).