* [PATCH] kernel/params.c: remove confusing cast
@ 2015-10-01 18:39 Rasmus Villemoes
2015-10-02 1:17 ` Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Rasmus Villemoes @ 2015-10-01 18:39 UTC (permalink / raw)
To: Rusty Russell, Stephen Rothwell; +Cc: Rasmus Villemoes, linux-kernel
Both sides of the assignment are const char*, so this cast is
unnecessary and confusing.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kernel/params.c: remove confusing cast
2015-10-01 18:39 [PATCH] kernel/params.c: remove confusing cast Rasmus Villemoes
@ 2015-10-02 1:17 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2015-10-02 1:17 UTC (permalink / raw)
To: Rasmus Villemoes, Stephen Rothwell
Cc: Rasmus Villemoes, linux-kernel, Andrew Morton
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-02 1:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01 18:39 [PATCH] kernel/params.c: remove confusing cast Rasmus Villemoes
2015-10-02 1:17 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).