Re: [PATCH] Staging: android: binder.c const char* smth TO constchar * const smth

From: Greg KH
Date: Wed Apr 18 2012 - 19:49:04 EST


On Mon, Apr 16, 2012 at 05:31:34AM +0300, Valentin Ilie wrote:
> Replaced static const char* var with static const char * var const smth because
> smth doesn't need to be reassigned at any point else at runtime.

"smth"? What is that?

>
> Signed-off-by: Valentin Ilie <valentin.ilie@xxxxxxxxx>
> ---
> drivers/staging/android/binder.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
> index c283212..221bd3f 100644
> --- a/drivers/staging/android/binder.c
> +++ b/drivers/staging/android/binder.c
> @@ -3303,7 +3303,7 @@ static void print_binder_proc(struct seq_file *m,
> m->count = start_pos;
> }
>
> -static const char *binder_return_strings[] = {
> +static const char * const binder_return_strings[] = {

I don't understand, what's the advantage here? Why is this needed?
Does it save space? Speed? Compiler warnings?

I need a better reason to apply it other than a word with no vowels...

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/