public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] staging: lustre: Minor lnet module cleanup
@ 2014-10-25  1:30 Mariusz Gorski
  2014-10-25  1:30 ` [PATCH v2 1/2] staging: lustre: Reduce function visibility Mariusz Gorski
  2014-10-25  1:30 ` [PATCH v2 2/2] staging: lustre: Use __init and __exit markers for lifecycle functions Mariusz Gorski
  0 siblings, 2 replies; 4+ messages in thread
From: Mariusz Gorski @ 2014-10-25  1:30 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman, Peng Tao, devel,
	linux-kernel

These patches fix some sparse warnings and apply __init and __exit
markers to module's init and exit functions.

v2: Add missing commit sign-offs

Mariusz Gorski (2):
  staging: lustre: Reduce function visibility
  staging: lustre: Use __init and __exit markers for lifecycle functions

 drivers/staging/lustre/lnet/lnet/module.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

-- 
2.1.2


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

* [PATCH v2 1/2] staging: lustre: Reduce function visibility
  2014-10-25  1:30 [PATCH v2 0/2] staging: lustre: Minor lnet module cleanup Mariusz Gorski
@ 2014-10-25  1:30 ` Mariusz Gorski
  2014-10-29  8:35   ` Greg Kroah-Hartman
  2014-10-25  1:30 ` [PATCH v2 2/2] staging: lustre: Use __init and __exit markers for lifecycle functions Mariusz Gorski
  1 sibling, 1 reply; 4+ messages in thread
From: Mariusz Gorski @ 2014-10-25  1:30 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman, Peng Tao, devel,
	linux-kernel

This patch fixes the following sparse warnings:
drivers/staging/lustre/lnet/lnet/module.c:47:1: warning: symbol
  'lnet_configure' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/module.c:67:1: warning: symbol
  'lnet_unconfigure' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/module.c:87:1: warning: symbol
  'lnet_ioctl' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/module.c:114:1: warning: symbol
  'init_lnet' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/module.c:139:1: warning: symbol
  'fini_lnet' was not declared. Should it be static?

Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com>
---
 drivers/staging/lustre/lnet/lnet/module.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/module.c b/drivers/staging/lustre/lnet/lnet/module.c
index e84d59d..dc09b43 100644
--- a/drivers/staging/lustre/lnet/lnet/module.c
+++ b/drivers/staging/lustre/lnet/lnet/module.c
@@ -43,7 +43,7 @@ MODULE_PARM_DESC(config_on_load, "configure network at module load");
 
 static struct mutex lnet_config_mutex;
 
-int
+static int
 lnet_configure(void *arg)
 {
 	/* 'arg' only there so I can be passed to cfs_create_thread() */
@@ -63,7 +63,7 @@ lnet_configure(void *arg)
 	return rc;
 }
 
-int
+static int
 lnet_unconfigure(void)
 {
 	int   refcount;
@@ -83,7 +83,7 @@ lnet_unconfigure(void)
 	return (refcount == 0) ? 0 : -EBUSY;
 }
 
-int
+static int
 lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data)
 {
 	int   rc;
@@ -110,7 +110,7 @@ lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data)
 
 DECLARE_IOCTL_HANDLER(lnet_ioctl_handler, lnet_ioctl);
 
-int
+static int
 init_lnet(void)
 {
 	int		  rc;
@@ -135,7 +135,7 @@ init_lnet(void)
 	return 0;
 }
 
-void
+static void
 fini_lnet(void)
 {
 	int rc;
-- 
2.1.2


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

* [PATCH v2 2/2] staging: lustre: Use __init and __exit markers for lifecycle functions
  2014-10-25  1:30 [PATCH v2 0/2] staging: lustre: Minor lnet module cleanup Mariusz Gorski
  2014-10-25  1:30 ` [PATCH v2 1/2] staging: lustre: Reduce function visibility Mariusz Gorski
@ 2014-10-25  1:30 ` Mariusz Gorski
  1 sibling, 0 replies; 4+ messages in thread
From: Mariusz Gorski @ 2014-10-25  1:30 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman, Peng Tao, devel,
	linux-kernel

Apply __init marker to module's init function and __exit to module's
exit function as they both have no other usage.

Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com>
---
 drivers/staging/lustre/lnet/lnet/module.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/module.c b/drivers/staging/lustre/lnet/lnet/module.c
index dc09b43..3c23677 100644
--- a/drivers/staging/lustre/lnet/lnet/module.c
+++ b/drivers/staging/lustre/lnet/lnet/module.c
@@ -110,7 +110,7 @@ lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data)
 
 DECLARE_IOCTL_HANDLER(lnet_ioctl_handler, lnet_ioctl);
 
-static int
+static int __init
 init_lnet(void)
 {
 	int		  rc;
@@ -135,7 +135,7 @@ init_lnet(void)
 	return 0;
 }
 
-static void
+static void __exit
 fini_lnet(void)
 {
 	int rc;
-- 
2.1.2


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

* Re: [PATCH v2 1/2] staging: lustre: Reduce function visibility
  2014-10-25  1:30 ` [PATCH v2 1/2] staging: lustre: Reduce function visibility Mariusz Gorski
@ 2014-10-29  8:35   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2014-10-29  8:35 UTC (permalink / raw)
  To: Mariusz Gorski; +Cc: Oleg Drokin, Andreas Dilger, Peng Tao, devel, linux-kernel

On Sat, Oct 25, 2014 at 03:30:37AM +0200, Mariusz Gorski wrote:
> This patch fixes the following sparse warnings:
> drivers/staging/lustre/lnet/lnet/module.c:47:1: warning: symbol
>   'lnet_configure' was not declared. Should it be static?
> drivers/staging/lustre/lnet/lnet/module.c:67:1: warning: symbol
>   'lnet_unconfigure' was not declared. Should it be static?
> drivers/staging/lustre/lnet/lnet/module.c:87:1: warning: symbol
>   'lnet_ioctl' was not declared. Should it be static?
> drivers/staging/lustre/lnet/lnet/module.c:114:1: warning: symbol
>   'init_lnet' was not declared. Should it be static?
> drivers/staging/lustre/lnet/lnet/module.c:139:1: warning: symbol
>   'fini_lnet' was not declared. Should it be static?
> 
> Signed-off-by: Mariusz Gorski <marius.gorski@gmail.com>
> ---
>  drivers/staging/lustre/lnet/lnet/module.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lnet/lnet/module.c b/drivers/staging/lustre/lnet/lnet/module.c
> index e84d59d..dc09b43 100644
> --- a/drivers/staging/lustre/lnet/lnet/module.c
> +++ b/drivers/staging/lustre/lnet/lnet/module.c
> @@ -43,7 +43,7 @@ MODULE_PARM_DESC(config_on_load, "configure network at module load");
>  
>  static struct mutex lnet_config_mutex;
>  
> -int
> +static int
>  lnet_configure(void *arg)
>  {
>  	/* 'arg' only there so I can be passed to cfs_create_thread() */
> @@ -63,7 +63,7 @@ lnet_configure(void *arg)
>  	return rc;
>  }
>  
> -int
> +static int
>  lnet_unconfigure(void)
>  {
>  	int   refcount;
> @@ -83,7 +83,7 @@ lnet_unconfigure(void)
>  	return (refcount == 0) ? 0 : -EBUSY;
>  }
>  
> -int
> +static int
>  lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data)
>  {
>  	int   rc;
> @@ -110,7 +110,7 @@ lnet_ioctl(unsigned int cmd, struct libcfs_ioctl_data *data)
>  
>  DECLARE_IOCTL_HANDLER(lnet_ioctl_handler, lnet_ioctl);
>  
> -int
> +static int
>  init_lnet(void)
>  {
>  	int		  rc;
> @@ -135,7 +135,7 @@ init_lnet(void)
>  	return 0;
>  }
>  
> -void
> +static void
>  fini_lnet(void)
>  {
>  	int rc;

Someone did this patch before you, sorry.

greg k-h

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

end of thread, other threads:[~2014-10-29 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-25  1:30 [PATCH v2 0/2] staging: lustre: Minor lnet module cleanup Mariusz Gorski
2014-10-25  1:30 ` [PATCH v2 1/2] staging: lustre: Reduce function visibility Mariusz Gorski
2014-10-29  8:35   ` Greg Kroah-Hartman
2014-10-25  1:30 ` [PATCH v2 2/2] staging: lustre: Use __init and __exit markers for lifecycle functions Mariusz Gorski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox