diff mbox series

[v1,1/1] PM: Revert "Add EXPORT macros for exporting PM functions"

Message ID 20250116152152.147048-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Superseded, archived
Headers show
Series [v1,1/1] PM: Revert "Add EXPORT macros for exporting PM functions" | expand

Commit Message

Andy Shevchenko Jan. 16, 2025, 3:21 p.m. UTC
The introduced macros are not doing what they intend for.
Also there were no users of them for all this time.
Drop them for good and to avoid possible misleading.

This reverts commit 41a337b40e983db4f0e1602308109f2b93687a06.

Reported-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/pm.h | 4 ----
 1 file changed, 4 deletions(-)

Comments

Greg Kroah-Hartman Jan. 16, 2025, 3:24 p.m. UTC | #1
On Thu, Jan 16, 2025 at 05:21:51PM +0200, Andy Shevchenko wrote:
> The introduced macros are not doing what they intend for.
> Also there were no users of them for all this time.
> Drop them for good and to avoid possible misleading.
> 
> This reverts commit 41a337b40e983db4f0e1602308109f2b93687a06.
> 
> Reported-by: Adrian Hunter <adrian.hunter@intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  include/linux/pm.h | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/include/linux/pm.h b/include/linux/pm.h
> index 08c37b83fea8..5dae93817141 100644
> --- a/include/linux/pm.h
> +++ b/include/linux/pm.h
> @@ -384,12 +384,8 @@ const struct dev_pm_ops name = { \
>  
>  #ifdef CONFIG_PM
>  #define _EXPORT_DEV_PM_OPS(name, license, ns)		_EXPORT_PM_OPS(name, license, ns)
> -#define EXPORT_PM_FN_GPL(name)				EXPORT_SYMBOL_GPL(name)
> -#define EXPORT_PM_FN_NS_GPL(name, ns)			EXPORT_SYMBOL_NS_GPL(name, "ns")
>  #else
>  #define _EXPORT_DEV_PM_OPS(name, license, ns)		_DISCARD_PM_OPS(name, license, ns)
> -#define EXPORT_PM_FN_GPL(name)
> -#define EXPORT_PM_FN_NS_GPL(name, ns)

Why not start using them instead?

thanks,

greg k-h
Andy Shevchenko Jan. 16, 2025, 3:32 p.m. UTC | #2
On Thu, Jan 16, 2025 at 04:24:16PM +0100, Greg Kroah-Hartman wrote:
> On Thu, Jan 16, 2025 at 05:21:51PM +0200, Andy Shevchenko wrote:

...

> >  #ifdef CONFIG_PM
> >  #define _EXPORT_DEV_PM_OPS(name, license, ns)		_EXPORT_PM_OPS(name, license, ns)
> > -#define EXPORT_PM_FN_GPL(name)				EXPORT_SYMBOL_GPL(name)
> > -#define EXPORT_PM_FN_NS_GPL(name, ns)			EXPORT_SYMBOL_NS_GPL(name, "ns")
> >  #else
> >  #define _EXPORT_DEV_PM_OPS(name, license, ns)		_DISCARD_PM_OPS(name, license, ns)
> > -#define EXPORT_PM_FN_GPL(name)
> > -#define EXPORT_PM_FN_NS_GPL(name, ns)
> 
> Why not start using them instead?

I tried and they didn't produce what we want (code elimination for
the CONFIG_PM=n).
Greg Kroah-Hartman Jan. 16, 2025, 3:39 p.m. UTC | #3
On Thu, Jan 16, 2025 at 05:32:23PM +0200, Andy Shevchenko wrote:
> On Thu, Jan 16, 2025 at 04:24:16PM +0100, Greg Kroah-Hartman wrote:
> > On Thu, Jan 16, 2025 at 05:21:51PM +0200, Andy Shevchenko wrote:
> 
> ...
> 
> > >  #ifdef CONFIG_PM
> > >  #define _EXPORT_DEV_PM_OPS(name, license, ns)		_EXPORT_PM_OPS(name, license, ns)
> > > -#define EXPORT_PM_FN_GPL(name)				EXPORT_SYMBOL_GPL(name)
> > > -#define EXPORT_PM_FN_NS_GPL(name, ns)			EXPORT_SYMBOL_NS_GPL(name, "ns")
> > >  #else
> > >  #define _EXPORT_DEV_PM_OPS(name, license, ns)		_DISCARD_PM_OPS(name, license, ns)
> > > -#define EXPORT_PM_FN_GPL(name)
> > > -#define EXPORT_PM_FN_NS_GPL(name, ns)
> > 
> > Why not start using them instead?
> 
> I tried and they didn't produce what we want (code elimination for
> the CONFIG_PM=n).

Ok, then please say that in the changelog text.

thanks,

greg k-h
diff mbox series

Patch

diff --git a/include/linux/pm.h b/include/linux/pm.h
index 08c37b83fea8..5dae93817141 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -384,12 +384,8 @@  const struct dev_pm_ops name = { \
 
 #ifdef CONFIG_PM
 #define _EXPORT_DEV_PM_OPS(name, license, ns)		_EXPORT_PM_OPS(name, license, ns)
-#define EXPORT_PM_FN_GPL(name)				EXPORT_SYMBOL_GPL(name)
-#define EXPORT_PM_FN_NS_GPL(name, ns)			EXPORT_SYMBOL_NS_GPL(name, "ns")
 #else
 #define _EXPORT_DEV_PM_OPS(name, license, ns)		_DISCARD_PM_OPS(name, license, ns)
-#define EXPORT_PM_FN_GPL(name)
-#define EXPORT_PM_FN_NS_GPL(name, ns)
 #endif
 
 #ifdef CONFIG_PM_SLEEP