All of lore.kernel.org
 help / color / mirror / Atom feed
* [lustre-devel] [PATCH] staging: lustre: lov: Fix sparse warning
@ 2015-11-21  8:26 ` Paul Davies C
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Davies C @ 2015-11-21  8:26 UTC (permalink / raw)
  To: lustre-devel

This patch fixes the following warnings:-

drivers/staging/lustre/lustre/lov/lov_object.c:926:22: warning: symbol 'lov_lsm_get' was not declared. Should it be static?
drivers/staging/lustre/lustre/lov/lov_object.c:942:6: warning: symbol 'lov_lsm_put' was not declared. Should it be static?

Signed-off-by: Paul Davies C <pauldaviesc@gmail.com>
---
 drivers/staging/lustre/lustre/lov/lov_object.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c
index c7ff817..a667336 100644
--- a/drivers/staging/lustre/lustre/lov/lov_object.c
+++ b/drivers/staging/lustre/lustre/lov/lov_object.c
@@ -923,7 +923,7 @@ static struct lov_stripe_md *lov_lsm_addref(struct lov_object *lov)
 	return lsm;
 }
 
-struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
+static struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
 {
 	struct lu_object *luobj;
 	struct lov_stripe_md *lsm = NULL;
@@ -939,7 +939,7 @@ struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
 }
 EXPORT_SYMBOL(lov_lsm_get);
 
-void lov_lsm_put(struct cl_object *unused, struct lov_stripe_md *lsm)
+static void lov_lsm_put(struct cl_object *unused, struct lov_stripe_md *lsm)
 {
 	if (lsm != NULL)
 		lov_free_memmd(&lsm);
-- 
1.9.1

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

* [PATCH] staging: lustre: lov: Fix sparse warning
@ 2015-11-21  8:26 ` Paul Davies C
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Davies C @ 2015-11-21  8:26 UTC (permalink / raw)
  To: lustre-devel, oleg.drokin, gregkh, devel, linux-kernel

This patch fixes the following warnings:-

drivers/staging/lustre/lustre/lov/lov_object.c:926:22: warning: symbol 'lov_lsm_get' was not declared. Should it be static?
drivers/staging/lustre/lustre/lov/lov_object.c:942:6: warning: symbol 'lov_lsm_put' was not declared. Should it be static?

Signed-off-by: Paul Davies C <pauldaviesc@gmail.com>
---
 drivers/staging/lustre/lustre/lov/lov_object.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c
index c7ff817..a667336 100644
--- a/drivers/staging/lustre/lustre/lov/lov_object.c
+++ b/drivers/staging/lustre/lustre/lov/lov_object.c
@@ -923,7 +923,7 @@ static struct lov_stripe_md *lov_lsm_addref(struct lov_object *lov)
 	return lsm;
 }
 
-struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
+static struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
 {
 	struct lu_object *luobj;
 	struct lov_stripe_md *lsm = NULL;
@@ -939,7 +939,7 @@ struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
 }
 EXPORT_SYMBOL(lov_lsm_get);
 
-void lov_lsm_put(struct cl_object *unused, struct lov_stripe_md *lsm)
+static void lov_lsm_put(struct cl_object *unused, struct lov_stripe_md *lsm)
 {
 	if (lsm != NULL)
 		lov_free_memmd(&lsm);
-- 
1.9.1


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

* [lustre-devel] [PATCH] staging: lustre: lov: Fix sparse warning
  2015-11-21  8:26 ` Paul Davies C
@ 2015-11-21 15:09   ` Drokin, Oleg
  -1 siblings, 0 replies; 4+ messages in thread
From: Drokin, Oleg @ 2015-11-21 15:09 UTC (permalink / raw)
  To: lustre-devel

Hello!

On Nov 21, 2015, at 3:26 AM, Paul Davies C wrote:

> This patch fixes the following warnings:-
> 
> drivers/staging/lustre/lustre/lov/lov_object.c:926:22: warning: symbol 'lov_lsm_get' was not declared. Should it be static?
> drivers/staging/lustre/lustre/lov/lov_object.c:942:6: warning: symbol 'lov_lsm_put' was not declared. Should it be static?
> 
> Signed-off-by: Paul Davies C <pauldaviesc@gmail.com>
> ---
> drivers/staging/lustre/lustre/lov/lov_object.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c
> index c7ff817..a667336 100644
> --- a/drivers/staging/lustre/lustre/lov/lov_object.c
> +++ b/drivers/staging/lustre/lustre/lov/lov_object.c
> @@ -923,7 +923,7 @@ static struct lov_stripe_md *lov_lsm_addref(struct lov_object *lov)
> 	return lsm;
> }
> 
> -struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
> +static struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
> {
> 	struct lu_object *luobj;
> 	struct lov_stripe_md *lsm = NULL;
> @@ -939,7 +939,7 @@ struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
> }
> EXPORT_SYMBOL(lov_lsm_get);

You did not compile-tested this, did you?
This symbol is still used in lustre/lclient/lcommon_cl.c but also
leaving EXPORT_SYMBOL intact for a static symbol?

> 
> -void lov_lsm_put(struct cl_object *unused, struct lov_stripe_md *lsm)
> +static void lov_lsm_put(struct cl_object *unused, struct lov_stripe_md *lsm)
> {
> 	if (lsm != NULL)
> 		lov_free_memmd(&lsm);
> -- 
> 1.9.1
> 

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

* Re: [PATCH] staging: lustre: lov: Fix sparse warning
@ 2015-11-21 15:09   ` Drokin, Oleg
  0 siblings, 0 replies; 4+ messages in thread
From: Drokin, Oleg @ 2015-11-21 15:09 UTC (permalink / raw)
  To: Paul Davies C
  Cc: <lustre-devel@lists.lustre.org>,
	<gregkh@linuxfoundation.org>,
	<devel@driverdev.osuosl.org>,
	<linux-kernel@vger.kernel.org>

Hello!

On Nov 21, 2015, at 3:26 AM, Paul Davies C wrote:

> This patch fixes the following warnings:-
> 
> drivers/staging/lustre/lustre/lov/lov_object.c:926:22: warning: symbol 'lov_lsm_get' was not declared. Should it be static?
> drivers/staging/lustre/lustre/lov/lov_object.c:942:6: warning: symbol 'lov_lsm_put' was not declared. Should it be static?
> 
> Signed-off-by: Paul Davies C <pauldaviesc@gmail.com>
> ---
> drivers/staging/lustre/lustre/lov/lov_object.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c
> index c7ff817..a667336 100644
> --- a/drivers/staging/lustre/lustre/lov/lov_object.c
> +++ b/drivers/staging/lustre/lustre/lov/lov_object.c
> @@ -923,7 +923,7 @@ static struct lov_stripe_md *lov_lsm_addref(struct lov_object *lov)
> 	return lsm;
> }
> 
> -struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
> +static struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
> {
> 	struct lu_object *luobj;
> 	struct lov_stripe_md *lsm = NULL;
> @@ -939,7 +939,7 @@ struct lov_stripe_md *lov_lsm_get(struct cl_object *clobj)
> }
> EXPORT_SYMBOL(lov_lsm_get);

You did not compile-tested this, did you?
This symbol is still used in lustre/lclient/lcommon_cl.c but also
leaving EXPORT_SYMBOL intact for a static symbol?

> 
> -void lov_lsm_put(struct cl_object *unused, struct lov_stripe_md *lsm)
> +static void lov_lsm_put(struct cl_object *unused, struct lov_stripe_md *lsm)
> {
> 	if (lsm != NULL)
> 		lov_free_memmd(&lsm);
> -- 
> 1.9.1
> 


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

end of thread, other threads:[~2015-11-21 15:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-21  8:26 [lustre-devel] [PATCH] staging: lustre: lov: Fix sparse warning Paul Davies C
2015-11-21  8:26 ` Paul Davies C
2015-11-21 15:09 ` [lustre-devel] " Drokin, Oleg
2015-11-21 15:09   ` Drokin, Oleg

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.