Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1237650 > unrolled thread
| Started by | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| First post | 2015-10-01 20:50 +0200 |
| Last post | 2015-10-02 03:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] kernel/params.c: remove confusing cast Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-10-01 20:50 +0200
Re: [PATCH] kernel/params.c: remove confusing cast Rusty Russell <rusty@rustcorp.com.au> - 2015-10-02 03:30 +0200
| From | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| Date | 2015-10-01 20:50 +0200 |
| Subject | [PATCH] kernel/params.c: remove confusing cast |
| Message-ID | <qeR5v-4ui-19@gated-at.bofh.it> |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Rusty Russell <rusty@rustcorp.com.au> |
|---|---|
| Date | 2015-10-02 03:30 +0200 |
| Message-ID | <qeXkB-5f4-5@gated-at.bofh.it> |
| In reply to | #1237650 |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web