From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751345AbbJBBXq (ORCPT ); Thu, 1 Oct 2015 21:23:46 -0400 Received: from ozlabs.org ([103.22.144.67]:37075 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750868AbbJBBXp (ORCPT ); Thu, 1 Oct 2015 21:23:45 -0400 From: Rusty Russell To: Rasmus Villemoes , Stephen Rothwell Cc: Rasmus Villemoes , linux-kernel@vger.kernel.org, "Andrew Morton" Subject: Re: [PATCH] kernel/params.c: remove confusing cast In-Reply-To: <1443724791-4240-1-git-send-email-linux@rasmusvillemoes.dk> References: <1443724791-4240-1-git-send-email-linux@rasmusvillemoes.dk> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Fri, 02 Oct 2015 10:47:32 +0930 Message-ID: <87fv1unk5v.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rasmus Villemoes writes: > Both sides of the assignment are const char*, so this cast is > unnecessary and confusing. > > Signed-off-by: Rasmus Villemoes Acked-by: Rusty Russell 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