Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp312433ybt; Wed, 8 Jul 2020 00:09:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRhA5TQ0aEWhl8Wra2oioofWcWQ3tmX89BUuSIlYcawAL5aPZfZQYgDPlbldzbAeG4QIYj X-Received: by 2002:a50:ab52:: with SMTP id t18mr66890848edc.195.1594192183663; Wed, 08 Jul 2020 00:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594192183; cv=none; d=google.com; s=arc-20160816; b=0isosMXmljCY7WsYK9deR+O0hf7eCshFg4XLGAKdPXGrlm0dQ0D2iQs/D+bkym6AuB YrjbyjsmMk0SyZ3xXjT/plYBn6p+lD1B099phBippLUw8VFdP23k70MLkX08/gHTpzk8 GbbApXVN69qS7ytY5yVZ7iDNf7GmAi3LOTfU0bOwqPZr5pCYfa9j64jVP/Ylx/dbNcbN vBevOhnhBetkx8Wl6p7BuFoa8kCo+5bam4GafEQGgVWGNjD8ZjI+QofXAhABmv8EeIf0 8Pnxr4yVOR6N2QnYetD+LMPbbB9JgZgX7IVJ2AhKJ1II9CJLeR+/lSw17NEFYYz7nk5b dCbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=xwzgV9xVI76eoSuZ4hqLBEzt7E4iuIm25W1VtI0fMZE=; b=BLTHw2N5AILmZjatqG5GNR5KTVgsNkifwrnSX2OgzJqdAH5AYYknE9kLZfJBRCg0E4 qcIvq8lTzU7ZKpQliyVDa28zCSW98dQk2ckT9tAT68DcwCfVdW8yYfy1U7KYzZvZhevP YjrBKrmstCt9k0QCQRaoKzZr9fs4oHz00/NW6P7h3pEknndkjCAFx59r7ruTiskQ3UsC 78eXAILRaIXZcc3cd58bjFa/7Hmy8+D2sKqf3PjGWWSUyRwJziB6mlRfAOamZCLtCqW0 0okax8E4OypJ8cVKfs4oQY+n0kG+4yCQLC/2gROtBK24dkOCgeVaWYpPSAmE/LtAvkSR jTHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c10si16547484ejs.1.2020.07.08.00.09.20; Wed, 08 Jul 2020 00:09:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730083AbgGHHHg (ORCPT + 99 others); Wed, 8 Jul 2020 03:07:36 -0400 Received: from smtp21.cstnet.cn ([159.226.251.21]:38524 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729761AbgGHHHg (ORCPT ); Wed, 8 Jul 2020 03:07:36 -0400 Received: from localhost (unknown [159.226.5.99]) by APP-01 (Coremail) with SMTP id qwCowAAnCeq_bwVf4majBA--.12311S2; Wed, 08 Jul 2020 15:03:28 +0800 (CST) From: Xu Wang To: jlayton@kernel.org, idryomov@gmail.com, ceph-devel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Xu Wang Subject: [PATCH] fs: ceph: Remove unnecessary cast in kfree() Date: Wed, 8 Jul 2020 07:03:22 +0000 Message-Id: <20200708070322.30695-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: qwCowAAnCeq_bwVf4majBA--.12311S2 X-Coremail-Antispam: 1UD129KBjvJXoW7Aw48urykXFyrCFWfAw1fWFg_yoW8GrWxpF 12kw48JwsxJF48Wr98J3WrZ34akayktFyDur9Fkws7uF15WryxJry8ZFyUury3Zry8Arn8 Ja1Dtw1rJF1av3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkG14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j 6F4UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUtVWrXwAv7VC2z280aVAFwI0_Gr1j6F4UJwAm72CE4IkC6x0Yz7v_Jr 0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkIecxEwVAFwVW8 CwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r 1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij 64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr 0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6rWUJVWrZr1UMIIF0xvEx4A2jsIE14v26r1j6r4U MIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUD8n5UUU UU= X-Originating-IP: [159.226.5.99] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiCAELA102YQ+JuwAAs2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unnecassary casts in the argument to kfree. Signed-off-by: Xu Wang --- fs/ceph/xattr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 71ee34d160c3..3a733ac33d9b 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -497,10 +497,10 @@ static int __set_xattr(struct ceph_inode_info *ci, kfree(*newxattr); *newxattr = NULL; if (xattr->should_free_val) - kfree((void *)xattr->val); + kfree(xattr->val); if (update_xattr) { - kfree((void *)name); + kfree(name); name = xattr->name; } ci->i_xattrs.names_size -= xattr->name_len; @@ -566,9 +566,9 @@ static void __free_xattr(struct ceph_inode_xattr *xattr) BUG_ON(!xattr); if (xattr->should_free_name) - kfree((void *)xattr->name); + kfree(xattr->name); if (xattr->should_free_val) - kfree((void *)xattr->val); + kfree(xattr->val); kfree(xattr); } @@ -582,9 +582,9 @@ static int __remove_xattr(struct ceph_inode_info *ci, rb_erase(&xattr->node, &ci->i_xattrs.index); if (xattr->should_free_name) - kfree((void *)xattr->name); + kfree(xattr->name); if (xattr->should_free_val) - kfree((void *)xattr->val); + kfree(xattr->val); ci->i_xattrs.names_size -= xattr->name_len; ci->i_xattrs.vals_size -= xattr->val_len; -- 2.17.1