Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp413210iog; Thu, 30 Jun 2022 03:18:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uCQ4a1h9XeTFlqWXj/r/L3MqwI/Urc7ancVBrXgmhLhYJUReOAfmDBbyUggY+R8hKlqg0d X-Received: by 2002:a17:907:2cf6:b0:72a:5268:c05e with SMTP id hz22-20020a1709072cf600b0072a5268c05emr3809320ejc.38.1656584281341; Thu, 30 Jun 2022 03:18:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656584281; cv=none; d=google.com; s=arc-20160816; b=A4weH00XdQFiY6upj3ly8uQ8qCYyeeWN94NNHon9/MxyPQj5uU0ehqrrGAgnnrL/LL RzDyHnovU/4GlncFyfStnaApdgbJzTq35mWhi5i5GI4gDvrKZiJU2grkPrc2LtUaatuL 2wbcD7Fe+dfv/r9+eqberg0JT91P1ZFfrFSemIeJQ2KQkmQDXHBxocwi+GrTLkEvq9eQ iqbRBtUlQh+g4Sp+KaRs4gAEC5lxmYbAUIPFECeU+tzKRg9XWlK3OIyCEdaEJMiMksd8 5DzacKxSSvRV5AwThgS9axmefl4LhhqtqS1zAhVI4LnW2dvj48oZD9AX0pRUP0SEI/Hl Zf+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=VCR0hSoE3guFYwYt1yabs3qliABkpkwyEIJ8Ys+PMYw=; b=E7xv+eAvnfDwuBxQPEJP4q+OmC4qCCz5Dx8bZ0EmxXyw0hEDboEPBSwBKQ0mkbfeIH tvxlBI1WPTXGnN28/E5jpuwQXnfyzISbyvjSqeLso9oUd/pQTnWKcjOl//P+G2pKRrVy LVBx+ngp+wXrjQOIW0J+AZ1MZ/KcJRsuuqEZ+pR5oTTGcNZ3xzFCLQct54z9+DXe/8EV TQgvfnUtyJm0G4zCtmfurNuKWn42ZyVPQydhQb1B+iS1FJ2jfEfU6Z7ZLlJvtQTL7wyX nOZeed6U58K8zYw+uMmcD4FSQF2WeuFCMvOSZcTGgBgg7qkSdY4S5jnuKfW29drd7P++ C2Bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h20-20020a170906111400b0070fe457d158si12029051eja.71.2022.06.30.03.17.35; Thu, 30 Jun 2022 03:18:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233938AbiF3Jb0 (ORCPT + 99 others); Thu, 30 Jun 2022 05:31:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233020AbiF3JbY (ORCPT ); Thu, 30 Jun 2022 05:31:24 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 47FC442A33; Thu, 30 Jun 2022 02:31:22 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 7339D1E80D11; Thu, 30 Jun 2022 17:30:01 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tcSNZRmyGWA2; Thu, 30 Jun 2022 17:29:58 +0800 (CST) Received: from localhost.localdomain (unknown [180.167.10.98]) (Authenticated sender: yuzhe@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 53F231E80CB6; Thu, 30 Jun 2022 17:29:58 +0800 (CST) From: Yu Zhe To: sfrench@samba.org Cc: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, liqiong@nfschina.com, Yu Zhe Subject: [PATCH] cifs: remove unnecessary type castings Date: Thu, 30 Jun 2022 17:30:27 +0800 Message-Id: <20220630093027.26200-1-yuzhe@nfschina.com> X-Mailer: git-send-email 2.11.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org remove unnecessary void* type castings. Signed-off-by: Yu Zhe --- fs/cifs/connect.c | 2 +- fs/cifs/inode.c | 4 ++-- fs/cifs/netmisc.c | 2 +- fs/cifs/smb2misc.c | 2 +- fs/cifs/smb2pdu.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index fa29c9aae24b..90863b3b5204 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2646,7 +2646,7 @@ match_prepath(struct super_block *sb, struct cifs_mnt_data *mnt_data) int cifs_match_super(struct super_block *sb, void *data) { - struct cifs_mnt_data *mnt_data = (struct cifs_mnt_data *)data; + struct cifs_mnt_data *mnt_data = data; struct smb3_fs_context *ctx; struct cifs_sb_info *cifs_sb; struct TCP_Server_Info *tcp_srv; diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 81da81e18553..3ad303dd5e5a 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1223,7 +1223,7 @@ static const struct inode_operations cifs_ipc_inode_ops = { static int cifs_find_inode(struct inode *inode, void *opaque) { - struct cifs_fattr *fattr = (struct cifs_fattr *) opaque; + struct cifs_fattr *fattr = opaque; /* don't match inode with different uniqueid */ if (CIFS_I(inode)->uniqueid != fattr->cf_uniqueid) @@ -1247,7 +1247,7 @@ cifs_find_inode(struct inode *inode, void *opaque) static int cifs_init_inode(struct inode *inode, void *opaque) { - struct cifs_fattr *fattr = (struct cifs_fattr *) opaque; + struct cifs_fattr *fattr = opaque; CIFS_I(inode)->uniqueid = fattr->cf_uniqueid; CIFS_I(inode)->createtime = fattr->cf_createtime; diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index 235aa1b395eb..28caae7aed1b 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c @@ -911,7 +911,7 @@ map_and_check_smb_error(struct mid_q_entry *mid, bool logErr) unsigned int smbCalcSize(void *buf, struct TCP_Server_Info *server) { - struct smb_hdr *ptr = (struct smb_hdr *)buf; + struct smb_hdr *ptr = buf; return (sizeof(struct smb_hdr) + (2 * ptr->WordCount) + 2 /* size of the bcc field */ + get_bcc(ptr)); } diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c index 17813c3d0c6e..db0f27fd373b 100644 --- a/fs/cifs/smb2misc.c +++ b/fs/cifs/smb2misc.c @@ -402,7 +402,7 @@ smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *shdr) unsigned int smb2_calc_size(void *buf, struct TCP_Server_Info *srvr) { - struct smb2_pdu *pdu = (struct smb2_pdu *)buf; + struct smb2_pdu *pdu = buf; struct smb2_hdr *shdr = &pdu->hdr; int offset; /* the offset from the beginning of SMB to data area */ int data_length; /* the length of the variable length data area */ diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 12b4dddaedb0..92fb513e5478 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -354,7 +354,7 @@ fill_small_buf(__le16 smb2_command, struct cifs_tcon *tcon, void *buf, unsigned int *total_len) { - struct smb2_pdu *spdu = (struct smb2_pdu *)buf; + struct smb2_pdu *spdu = buf; /* lookup word count ie StructureSize from table */ __u16 parmsize = smb2_req_struct_sizes[le16_to_cpu(smb2_command)]; -- 2.11.0