public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] mm: change "char *bdi_unknown_name" to "char bdi_unknown_name[]"
@ 2022-05-12  8:26 liqiong
  2022-05-12 14:48 ` liqiong
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: liqiong @ 2022-05-12  8:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel, liqiong

"char bdi_unknown_nam[]" string form declares a single variable.
It is better then "char *bdi_unknown_name" which creates two
variables.

Signed-off-by: liqiong <[email protected]>
---
 mm/backing-dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 7176af65b103..4982ccc63536 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -20,7 +20,7 @@ struct backing_dev_info noop_backing_dev_info;
 EXPORT_SYMBOL_GPL(noop_backing_dev_info);
 
 static struct class *bdi_class;
-static const char *bdi_unknown_name = "(unknown)";
+static const char bdi_unknown_name[] = "(unknown)";
 
 /*
  * bdi_lock protects bdi_tree and updates to bdi_list. bdi_list has RCU
-- 
2.11.0




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

end of thread, other threads:[~2022-05-12 20:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-12  8:26 [PATCH] mm: change "char *bdi_unknown_name" to "char bdi_unknown_name[]" liqiong
2022-05-12 14:48 ` liqiong
2022-05-12 15:29 ` Muchun Song
2022-05-12 17:10   ` liqiong
2022-05-12 20:00 ` Andrew Morton

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