All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpuidle: moved EXPORT_SYMBOL so that it immediately followed its function/variable
@ 2021-06-23  9:25 Jinchao Wang
  2021-06-30 17:38 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Jinchao Wang @ 2021-06-23  9:25 UTC (permalink / raw)
  To: rjw, daniel.lezcano; +Cc: linux-pm, linux-kernel, wjc

change made to resolve following checkpatch message:
  WARNING: EXPORT_SYMBOL(foo); should immediately follow its
function/variable

Signed-off-by: Jinchao Wang <wjc@cdjrlc.com>
---
 drivers/cpuidle/cpuidle.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index ef2ea1b12cd8..ddd11236a0cc 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -457,7 +457,6 @@ void cpuidle_pause_and_lock(void)
 	mutex_lock(&cpuidle_lock);
 	cpuidle_uninstall_idle_handler();
 }
-
 EXPORT_SYMBOL_GPL(cpuidle_pause_and_lock);
 
 /**
@@ -468,7 +467,6 @@ void cpuidle_resume_and_unlock(void)
 	cpuidle_install_idle_handler();
 	mutex_unlock(&cpuidle_lock);
 }
-
 EXPORT_SYMBOL_GPL(cpuidle_resume_and_unlock);
 
 /* Currently used in suspend/resume path to suspend cpuidle */
@@ -538,7 +536,6 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
 
 	return ret;
 }
-
 EXPORT_SYMBOL_GPL(cpuidle_enable_device);
 
 /**
@@ -566,7 +563,6 @@ void cpuidle_disable_device(struct cpuidle_device *dev)
 	cpuidle_remove_device_sysfs(dev);
 	enabled_devices--;
 }
-
 EXPORT_SYMBOL_GPL(cpuidle_disable_device);
 
 static void __cpuidle_unregister_device(struct cpuidle_device *dev)
@@ -665,7 +661,6 @@ int cpuidle_register_device(struct cpuidle_device *dev)
 	__cpuidle_unregister_device(dev);
 	goto out_unlock;
 }
-
 EXPORT_SYMBOL_GPL(cpuidle_register_device);
 
 /**
@@ -689,7 +684,6 @@ void cpuidle_unregister_device(struct cpuidle_device *dev)
 
 	cpuidle_resume_and_unlock();
 }
-
 EXPORT_SYMBOL_GPL(cpuidle_unregister_device);
 
 /**
-- 
2.31.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cpuidle: moved EXPORT_SYMBOL so that it immediately followed its function/variable
  2021-06-23  9:25 [PATCH] cpuidle: moved EXPORT_SYMBOL so that it immediately followed its function/variable Jinchao Wang
@ 2021-06-30 17:38 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-06-30 17:38 UTC (permalink / raw)
  To: Jinchao Wang
  Cc: Rafael J. Wysocki, Daniel Lezcano, Linux PM, Linux Kernel Mailing List

On Wed, Jun 23, 2021 at 11:26 AM Jinchao Wang <wjc@cdjrlc.com> wrote:
>
> change made to resolve following checkpatch message:
>   WARNING: EXPORT_SYMBOL(foo); should immediately follow its
> function/variable

checkpatch errors regarding the existing code base are not relevant as a rule.

Now, this patch removes unnecessary empty lines, so it is not
meritless, but it should go under a different subject and with a
changelog describing what's going on.

Something like

Subject: [PATCH] cpuidle: Remove unnecessary empty lines preceding
EXPORT_SYMBOL_GPL()

In several places in cpuidle.c there are empty lines between the
definition of a function and the following EXPORT_SYMBOL_GPL() which
are not necessary, so remove them.

> Signed-off-by: Jinchao Wang <wjc@cdjrlc.com>
> ---
>  drivers/cpuidle/cpuidle.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index ef2ea1b12cd8..ddd11236a0cc 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -457,7 +457,6 @@ void cpuidle_pause_and_lock(void)
>         mutex_lock(&cpuidle_lock);
>         cpuidle_uninstall_idle_handler();
>  }
> -
>  EXPORT_SYMBOL_GPL(cpuidle_pause_and_lock);
>
>  /**
> @@ -468,7 +467,6 @@ void cpuidle_resume_and_unlock(void)
>         cpuidle_install_idle_handler();
>         mutex_unlock(&cpuidle_lock);
>  }
> -
>  EXPORT_SYMBOL_GPL(cpuidle_resume_and_unlock);
>
>  /* Currently used in suspend/resume path to suspend cpuidle */
> @@ -538,7 +536,6 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
>
>         return ret;
>  }
> -
>  EXPORT_SYMBOL_GPL(cpuidle_enable_device);
>
>  /**
> @@ -566,7 +563,6 @@ void cpuidle_disable_device(struct cpuidle_device *dev)
>         cpuidle_remove_device_sysfs(dev);
>         enabled_devices--;
>  }
> -
>  EXPORT_SYMBOL_GPL(cpuidle_disable_device);
>
>  static void __cpuidle_unregister_device(struct cpuidle_device *dev)
> @@ -665,7 +661,6 @@ int cpuidle_register_device(struct cpuidle_device *dev)
>         __cpuidle_unregister_device(dev);
>         goto out_unlock;
>  }
> -
>  EXPORT_SYMBOL_GPL(cpuidle_register_device);
>
>  /**
> @@ -689,7 +684,6 @@ void cpuidle_unregister_device(struct cpuidle_device *dev)
>
>         cpuidle_resume_and_unlock();
>  }
> -
>  EXPORT_SYMBOL_GPL(cpuidle_unregister_device);
>
>  /**
> --
> 2.31.1
>
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-30 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23  9:25 [PATCH] cpuidle: moved EXPORT_SYMBOL so that it immediately followed its function/variable Jinchao Wang
2021-06-30 17:38 ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.