public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] page-types: constify read only arrays
@ 2009-10-12 20:51 Tommi Rantala
  2009-10-12 20:51 ` [PATCH] page-types: trivial typo fixes Tommi Rantala
  0 siblings, 1 reply; 3+ messages in thread
From: Tommi Rantala @ 2009-10-12 20:51 UTC (permalink / raw)
  To: Randy Dunlap, Andrew Morton, Wu Fengguang, linux-kernel; +Cc: Tommi Rantala

Constify read only arrays.

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
---
 Documentation/vm/page-types.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
index 3ec4f2a..16fb478 100644
--- a/Documentation/vm/page-types.c
+++ b/Documentation/vm/page-types.c
@@ -100,7 +100,7 @@
 #define BIT(name)		(1ULL << KPF_##name)
 #define BITS_COMPOUND		(BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL))
 
-static char *page_flag_names[] = {
+static const char *page_flag_names[] = {
 	[KPF_LOCKED]		= "L:locked",
 	[KPF_ERROR]		= "E:error",
 	[KPF_REFERENCED]	= "R:referenced",
@@ -173,7 +173,7 @@ static int		kpageflags_fd;
 static int		opt_hwpoison;
 static int		opt_unpoison;
 
-static char		*hwpoison_debug_fs = "/debug/hwpoison";
+static const char	hwpoison_debug_fs[] = "/debug/hwpoison";
 static int		hwpoison_inject_fd;
 static int		hwpoison_forget_fd;
 
@@ -885,7 +885,7 @@ static void parse_bits_mask(const char *optarg)
 }
 
 
-static struct option opts[] = {
+static const struct option opts[] = {
 	{ "raw"       , 0, NULL, 'r' },
 	{ "pid"       , 1, NULL, 'p' },
 	{ "file"      , 1, NULL, 'f' },
-- 
1.5.6.5


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

* [PATCH] page-types: trivial typo fixes
  2009-10-12 20:51 [PATCH] page-types: constify read only arrays Tommi Rantala
@ 2009-10-12 20:51 ` Tommi Rantala
  2009-10-13  1:22   ` Wu Fengguang
  0 siblings, 1 reply; 3+ messages in thread
From: Tommi Rantala @ 2009-10-12 20:51 UTC (permalink / raw)
  To: Randy Dunlap, Andrew Morton, Wu Fengguang, linux-kernel; +Cc: Tommi Rantala

Trivial typo fixes.

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
---
 Documentation/vm/page-types.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
index 16fb478..d6d21c2 100644
--- a/Documentation/vm/page-types.c
+++ b/Documentation/vm/page-types.c
@@ -301,7 +301,7 @@ static char *page_flag_name(uint64_t flags)
 		present = (flags >> i) & 1;
 		if (!page_flag_names[i]) {
 			if (present)
-				fatal("unkown flag bit %d\n", i);
+				fatal("unknown flag bit %d\n", i);
 			continue;
 		}
 		buf[j++] = present ? page_flag_names[i][0] : '_';
@@ -682,7 +682,7 @@ static void usage(void)
 #endif
 "            -l|--list                 Show page details in ranges\n"
 "            -L|--list-each            Show page details one by one\n"
-"            -N|--no-summary           Don't show summay info\n"
+"            -N|--no-summary           Don't show summary info\n"
 "            -X|--hwpoison             hwpoison pages\n"
 "            -x|--unpoison             unpoison pages\n"
 "            -h|--help                 Show this usage message\n"
-- 
1.5.6.5


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

* Re: [PATCH] page-types: trivial typo fixes
  2009-10-12 20:51 ` [PATCH] page-types: trivial typo fixes Tommi Rantala
@ 2009-10-13  1:22   ` Wu Fengguang
  0 siblings, 0 replies; 3+ messages in thread
From: Wu Fengguang @ 2009-10-13  1:22 UTC (permalink / raw)
  To: Tommi Rantala; +Cc: Randy Dunlap, Andrew Morton, linux-kernel@vger.kernel.org

On Tue, Oct 13, 2009 at 04:51:34AM +0800, Tommi Rantala wrote:
> Trivial typo fixes.

Good catch, thanks!

Fengguang

> Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
> ---
>  Documentation/vm/page-types.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
> index 16fb478..d6d21c2 100644
> --- a/Documentation/vm/page-types.c
> +++ b/Documentation/vm/page-types.c
> @@ -301,7 +301,7 @@ static char *page_flag_name(uint64_t flags)
>  		present = (flags >> i) & 1;
>  		if (!page_flag_names[i]) {
>  			if (present)
> -				fatal("unkown flag bit %d\n", i);
> +				fatal("unknown flag bit %d\n", i);
>  			continue;
>  		}
>  		buf[j++] = present ? page_flag_names[i][0] : '_';
> @@ -682,7 +682,7 @@ static void usage(void)
>  #endif
>  "            -l|--list                 Show page details in ranges\n"
>  "            -L|--list-each            Show page details one by one\n"
> -"            -N|--no-summary           Don't show summay info\n"
> +"            -N|--no-summary           Don't show summary info\n"
>  "            -X|--hwpoison             hwpoison pages\n"
>  "            -x|--unpoison             unpoison pages\n"
>  "            -h|--help                 Show this usage message\n"
> -- 
> 1.5.6.5

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

end of thread, other threads:[~2009-10-13  1:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-12 20:51 [PATCH] page-types: constify read only arrays Tommi Rantala
2009-10-12 20:51 ` [PATCH] page-types: trivial typo fixes Tommi Rantala
2009-10-13  1:22   ` Wu Fengguang

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