CONFIG_PM_LEGACY = compiler warnings for deprecation ... solution?
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 / [email protected]
------------------------------
--
Free information on vast array of home improvement projects. Click here.
http://tagline.hushmail.com/fc/Ioyw6h4eNIBTzslyd6sFcem0DGn1xrajHGmTczUmHzuMeqA2wEMUHS/
Quoted 19 lines · Scott Thompson
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_LEGACYoption marked...I propose that within the
include/linux/pm_legacy.hfile, functions in theCONFIG_PM_LEGACYaren't marked 'deprecated' and functions outside the #if are marked deprecated. Then the handful of calls (12 or so) that actually call thepm_legacyapis can get wrapped in theCONFIG_PM_LEGACYflag.This is basically already being done in one case since as of 2.6.20.1 the
pm_registerfunction is only used indrivers/serial/68328serial.c.
Quoted 6 lines
The
pm_send_allis 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/ theCONFIG_PM_LEGACYifdef.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
Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth
Quoted 19 lines · Scott Thompson
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_LEGACYoption marked...I propose that within the
include/linux/pm_legacy.hfile, functions in theCONFIG_PM_LEGACYaren't marked 'deprecated' and functions outside the #if are marked deprecated. Then the handful of calls (12 or so) that actually call thepm_legacyapis can get wrapped in theCONFIG_PM_LEGACYflag.This is basically already being done in one case since as of 2.6.20.1 the
pm_registerfunction is only used indrivers/serial/68328serial.c.
Quoted 6 lines
The
pm_send_allis 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/ theCONFIG_PM_LEGACYifdef.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
Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth