lkml.org 
[lkml]   [2015]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] kernel/params.c: remove confusing cast
Date
Rasmus Villemoes <linux@rasmusvillemoes.dk> writes:
> Both sides of the assignment are const char*, so this cast is
> unnecessary and confusing.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

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

Thanks,
Rusty.

> kernel/params.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/params.c b/kernel/params.c
> index b6554aa71094..0b433fdb45eb 100644
> --- a/kernel/params.c
> +++ b/kernel/params.c
> @@ -709,7 +709,7 @@ static __modinit int add_sysfs_param(struct module_kobject *mk,
> mk->mp->attrs[mk->mp->num].mattr.store = param_attr_store;
> else
> mk->mp->attrs[mk->mp->num].mattr.store = NULL;
> - mk->mp->attrs[mk->mp->num].mattr.attr.name = (char *)name;
> + mk->mp->attrs[mk->mp->num].mattr.attr.name = name;
> mk->mp->attrs[mk->mp->num].mattr.attr.mode = kp->perm;
> mk->mp->num++;
>
> --
> 2.1.3


\
 
 \ /
  Last update: 2015-10-02 03:41    [W:0.039 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site