Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1274613 > unrolled thread
| Started by | Paul Davies C <pauldaviesc@gmail.com> |
|---|---|
| First post | 2015-11-21 09:30 +0100 |
| Last post | 2015-11-21 16:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: lustre: lov: Fix sparse warning Paul Davies C <pauldaviesc@gmail.com> - 2015-11-21 09:30 +0100
Re: [PATCH] staging: lustre: lov: Fix sparse warning "Drokin, Oleg" <oleg.drokin@intel.com> - 2015-11-21 16:20 +0100
| From | Paul Davies C <pauldaviesc@gmail.com> |
|---|---|
| Date | 2015-11-21 09:30 +0100 |
| Subject | [PATCH] staging: lustre: lov: Fix sparse warning |
| Message-ID | <qxbIt-2JJ-1@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | "Drokin, Oleg" <oleg.drokin@intel.com> |
|---|---|
| Date | 2015-11-21 16:20 +0100 |
| Message-ID | <qxi7f-71M-13@gated-at.bofh.it> |
| In reply to | #1274613 |
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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web