kernel/params.c: remove confusing cast
PATCH 1/1 kernel/params.c: remove confusing cast
Both sides of the assignment are const char*, so this cast is unnecessary and confusing.
Signed-off-by Rasmus Villemoes <[email protected]>
--- kernel/params.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/params.c +1 -1
@@ -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++;
Signature · 1 line
2.1.3
Quoted 4 lines · Rasmus Villemoes
Both sides of the assignment are const char*, so this cast is unnecessary and confusing.
Signed-off-by Rasmus Villemoes <[email protected]>
Acked-by Rusty Russell <[email protected]>
Thanks,
Rusty.
Quoted 18 lines
kernel/params.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/params.c +1
-1@@ -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++;Signature · 1 line
2.1.3