Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1214112 > unrolled thread

[PATCH 1/2] module: export param_free_charp()

Started byDan Streetman <ddstreet@ieee.org>
First post2015-08-26 20:40 +0200
Last post2015-08-28 02:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/2] module: export param_free_charp() Dan Streetman <ddstreet@ieee.org> - 2015-08-26 20:40 +0200
    Re: [PATCH 1/2] module: export param_free_charp() Rusty Russell <rusty@rustcorp.com.au> - 2015-08-28 02:50 +0200

#1214112 — [PATCH 1/2] module: export param_free_charp()

FromDan Streetman <ddstreet@ieee.org>
Date2015-08-26 20:40 +0200
Subject[PATCH 1/2] module: export param_free_charp()
Message-ID<q1NM5-5sE-7@gated-at.bofh.it>
Change the param_free_charp() function from static to exported.

It is used by zswap in the next patch.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
---
 include/linux/moduleparam.h | 1 +
 kernel/params.c             | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index c12f214..52666d9 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -386,6 +386,7 @@ extern int param_get_ullong(char *buffer, const struct kernel_param *kp);
 extern const struct kernel_param_ops param_ops_charp;
 extern int param_set_charp(const char *val, const struct kernel_param *kp);
 extern int param_get_charp(char *buffer, const struct kernel_param *kp);
+extern void param_free_charp(void *arg);
 #define param_check_charp(name, p) __param_check(name, p, char *)
 
 /* We used to allow int as well as bool.  We're taking that away! */
diff --git a/kernel/params.c b/kernel/params.c
index b6554aa..93a380a 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -325,10 +325,11 @@ int param_get_charp(char *buffer, const struct kernel_param *kp)
 }
 EXPORT_SYMBOL(param_get_charp);
 
-static void param_free_charp(void *arg)
+void param_free_charp(void *arg)
 {
 	maybe_kfree_parameter(*((char **)arg));
 }
+EXPORT_SYMBOL(param_free_charp);
 
 const struct kernel_param_ops param_ops_charp = {
 	.set = param_set_charp,
-- 
2.1.0

--
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]


#1215033

FromRusty Russell <rusty@rustcorp.com.au>
Date2015-08-28 02:50 +0200
Message-ID<q2g1H-42u-1@gated-at.bofh.it>
In reply to#1214112
Dan Streetman <ddstreet@ieee.org> writes:
> Change the param_free_charp() function from static to exported.
>
> It is used by zswap in the next patch.
>
> Signed-off-by: Dan Streetman <ddstreet@ieee.org>

Acked-by: Rusty Russell <rusty@rustcorp.com.au>

Thanks!
Rusty.

> ---
>  include/linux/moduleparam.h | 1 +
>  kernel/params.c             | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
> index c12f214..52666d9 100644
> --- a/include/linux/moduleparam.h
> +++ b/include/linux/moduleparam.h
> @@ -386,6 +386,7 @@ extern int param_get_ullong(char *buffer, const struct kernel_param *kp);
>  extern const struct kernel_param_ops param_ops_charp;
>  extern int param_set_charp(const char *val, const struct kernel_param *kp);
>  extern int param_get_charp(char *buffer, const struct kernel_param *kp);
> +extern void param_free_charp(void *arg);
>  #define param_check_charp(name, p) __param_check(name, p, char *)
>  
>  /* We used to allow int as well as bool.  We're taking that away! */
> diff --git a/kernel/params.c b/kernel/params.c
> index b6554aa..93a380a 100644
> --- a/kernel/params.c
> +++ b/kernel/params.c
> @@ -325,10 +325,11 @@ int param_get_charp(char *buffer, const struct kernel_param *kp)
>  }
>  EXPORT_SYMBOL(param_get_charp);
>  
> -static void param_free_charp(void *arg)
> +void param_free_charp(void *arg)
>  {
>  	maybe_kfree_parameter(*((char **)arg));
>  }
> +EXPORT_SYMBOL(param_free_charp);
>  
>  const struct kernel_param_ops param_ops_charp = {
>  	.set = param_set_charp,
> -- 
> 2.1.0
--
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