linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] kernel/rcu/tree.c: make rcu node arrays static const char * const
@ 2014-05-06 17:21 Fabian Frederick
  2014-05-06 22:34 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-05-06 17:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dipankar Sarma, akpm

Those 2 arrays are being passed to lockdep_init_map with const char *
and stored in lockdep_map the same way

Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 kernel/rcu/tree.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 0c47e30..90ebc83 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3357,14 +3357,16 @@ static void __init rcu_init_levelspread(struct rcu_state *rsp)
 static void __init rcu_init_one(struct rcu_state *rsp,
 		struct rcu_data __percpu *rda)
 {
-	static char *buf[] = { "rcu_node_0",
-			       "rcu_node_1",
-			       "rcu_node_2",
-			       "rcu_node_3" };  /* Match MAX_RCU_LVLS */
-	static char *fqs[] = { "rcu_node_fqs_0",
-			       "rcu_node_fqs_1",
-			       "rcu_node_fqs_2",
-			       "rcu_node_fqs_3" };  /* Match MAX_RCU_LVLS */
+	static const char * const buf[] = {
+		"rcu_node_0",
+		"rcu_node_1",
+		"rcu_node_2",
+		"rcu_node_3" };  /* Match MAX_RCU_LVLS */
+	static const char * const fqs[] = {
+		"rcu_node_fqs_0",
+		"rcu_node_fqs_1",
+		"rcu_node_fqs_2",
+		"rcu_node_fqs_3" };  /* Match MAX_RCU_LVLS */
 	int cpustride = 1;
 	int i;
 	int j;
-- 
1.8.4.5


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

* Re: [PATCH 1/1] kernel/rcu/tree.c: make rcu node arrays static const char * const
  2014-05-06 17:21 [PATCH 1/1] kernel/rcu/tree.c: make rcu node arrays static const char * const Fabian Frederick
@ 2014-05-06 22:34 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2014-05-06 22:34 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: linux-kernel, Dipankar Sarma, akpm

On Tue, May 06, 2014 at 07:21:14PM +0200, Fabian Frederick wrote:
> Those 2 arrays are being passed to lockdep_init_map with const char *
> and stored in lockdep_map the same way
> 
> Cc: Dipankar Sarma <dipankar@in.ibm.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>

Queued for 3.17, thank you Fabian!

							Thanx, Paul

> ---
>  kernel/rcu/tree.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 0c47e30..90ebc83 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -3357,14 +3357,16 @@ static void __init rcu_init_levelspread(struct rcu_state *rsp)
>  static void __init rcu_init_one(struct rcu_state *rsp,
>  		struct rcu_data __percpu *rda)
>  {
> -	static char *buf[] = { "rcu_node_0",
> -			       "rcu_node_1",
> -			       "rcu_node_2",
> -			       "rcu_node_3" };  /* Match MAX_RCU_LVLS */
> -	static char *fqs[] = { "rcu_node_fqs_0",
> -			       "rcu_node_fqs_1",
> -			       "rcu_node_fqs_2",
> -			       "rcu_node_fqs_3" };  /* Match MAX_RCU_LVLS */
> +	static const char * const buf[] = {
> +		"rcu_node_0",
> +		"rcu_node_1",
> +		"rcu_node_2",
> +		"rcu_node_3" };  /* Match MAX_RCU_LVLS */
> +	static const char * const fqs[] = {
> +		"rcu_node_fqs_0",
> +		"rcu_node_fqs_1",
> +		"rcu_node_fqs_2",
> +		"rcu_node_fqs_3" };  /* Match MAX_RCU_LVLS */
>  	int cpustride = 1;
>  	int i;
>  	int j;
> -- 
> 1.8.4.5
> 
> --
> 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/
> 


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

end of thread, other threads:[~2014-05-06 22:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-06 17:21 [PATCH 1/1] kernel/rcu/tree.c: make rcu node arrays static const char * const Fabian Frederick
2014-05-06 22:34 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).