Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5793865ybp; Tue, 15 Oct 2019 05:15:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNwd6cPNoDZqiffikauxz9VJ9k1BDxCNupLSG52FjF+4yM1VxsSVrjXZpBK9FC1Hz0iCBE X-Received: by 2002:a17:906:1690:: with SMTP id s16mr33872607ejd.294.1571141728745; Tue, 15 Oct 2019 05:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571141728; cv=none; d=google.com; s=arc-20160816; b=ex/0ZdHNDh1m9WWNW0UHiiPm85Ak4gTJ8MqntN8tC/r56Ghk2Ht5pyj0Ff3nSwdG3C mZp1BTIy0dCkjM38xHOXqKHBXASxjX7K0lV/zQmNUbVEB2AzVx0FTqp2LX5dPkKRNQPV 4ILvNMWR5WoMURLGLWzt3G4yKVQDcewcggsO4qti5jvwCN3QgTbhFWEiP5lVRVeU7ePz xQRW6JDIczettq1ojiXQiNlmBCE6kUlAp2Q742G5qj/Cq9hmaiM4240zuj9p+iBamK2w TM5Ar+AR87Ba8C2H/U+EqVA+24VTb28N3C2CK5hVwJmVEl85M0WRR1tr7NE9at5kjoPY 2WBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=6LW0xA9W7mSiGy7WT/B1kxeXljLUq+zPAa3kLGxP00w=; b=r1TKq2GI3UWrPWXe+VbVv1KNhxtFg7ZEZczziiQCzg50sUsa4m723HOyyN7LbCMtUK vKa9bKONlfftFkNXtIn04vEVWrlnvmDgzJPZ5Q6RiWnG9xRoO3jHWWk8uFJYKZPGotEW XlRTiSmbyenSqKDcPZ4+T6XVm4iU/DVw1Y9/+oEHxPXuq6pm9jXCYdIr+qnyjba3THvh fqmi9zshH3ZA+Dcwce/1vsPXUgBIMO3ODtifXsWluX7dyRzMfYwoMo0X5A3Wa2BsYmw/ 9CeJWu4ZAHAy/70F8uW7G0sV8Lm41O8Eu7zXi9oTgh4k+GJhFn0VX/j2rCh27J36TabH IQ9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d24si14690013ede.119.2019.10.15.05.15.05; Tue, 15 Oct 2019 05:15:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727469AbfJOL3O (ORCPT + 99 others); Tue, 15 Oct 2019 07:29:14 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:27113 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726430AbfJOL3O (ORCPT ); Tue, 15 Oct 2019 07:29:14 -0400 X-IronPort-AV: E=Sophos;i="5.67,299,1566856800"; d="scan'208";a="322762634" Received: from portablejulia.rsr.lip6.fr ([132.227.76.63]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 13:29:12 +0200 Date: Tue, 15 Oct 2019 13:29:12 +0200 (CEST) From: Julia Lawall X-X-Sender: julia@hadrien To: Wambui Karuga cc: outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [Outreachy kernel] [PATCH] staging: rtl8723bs: remove casts to pointers in kfree In-Reply-To: <20191015112637.20824-1-wambui.karugax@gmail.com> Message-ID: References: <20191015112637.20824-1-wambui.karugax@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 15 Oct 2019, Wambui Karuga wrote: > Remove unnecessary casts in pointer types passed to kfree. > > Signed-off-by: Wambui Karuga Acked-by: Julia Lawall > --- > drivers/staging/rtl8723bs/core/rtw_mlme.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c > index 3030ae5b6b6d..71fcb466019a 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c > +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c > @@ -2155,7 +2155,7 @@ sint rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv) > > psetauthparm = rtw_zmalloc(sizeof(struct setauth_parm)); > if (!psetauthparm) { > - kfree((unsigned char *)pcmd); > + kfree(pcmd); > res = _FAIL; > goto exit; > } > @@ -2238,7 +2238,7 @@ sint rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, s > if (enqueue) { > pcmd = rtw_zmalloc(sizeof(struct cmd_obj)); > if (!pcmd) { > - kfree((unsigned char *)psetkeyparm); > + kfree(psetkeyparm); > res = _FAIL; /* try again */ > goto exit; > } > -- > 2.23.0 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191015112637.20824-1-wambui.karugax%40gmail.com. >