All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	linux-kernel@vger.kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [PATCH] kernel/params.c: remove confusing cast
Date: Fri, 02 Oct 2015 10:47:32 +0930	[thread overview]
Message-ID: <87fv1unk5v.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1443724791-4240-1-git-send-email-linux@rasmusvillemoes.dk>

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

      reply	other threads:[~2015-10-02  1:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 18:39 [PATCH] kernel/params.c: remove confusing cast Rasmus Villemoes
2015-10-02  1:17 ` Rusty Russell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fv1unk5v.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.