Commit 0f46608a authored by Yu Zhe's avatar Yu Zhe Committed by Steve French

cifs: remove unnecessary type castings

remove unnecessary void* type castings.
Signed-off-by: default avatarYu Zhe <yuzhe@nfschina.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 4da2cd05
...@@ -2644,7 +2644,7 @@ match_prepath(struct super_block *sb, struct cifs_mnt_data *mnt_data) ...@@ -2644,7 +2644,7 @@ match_prepath(struct super_block *sb, struct cifs_mnt_data *mnt_data)
int int
cifs_match_super(struct super_block *sb, void *data) 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 smb3_fs_context *ctx;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct TCP_Server_Info *tcp_srv; struct TCP_Server_Info *tcp_srv;
......
...@@ -1223,7 +1223,7 @@ static const struct inode_operations cifs_ipc_inode_ops = { ...@@ -1223,7 +1223,7 @@ static const struct inode_operations cifs_ipc_inode_ops = {
static int static int
cifs_find_inode(struct inode *inode, void *opaque) 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 */ /* don't match inode with different uniqueid */
if (CIFS_I(inode)->uniqueid != fattr->cf_uniqueid) if (CIFS_I(inode)->uniqueid != fattr->cf_uniqueid)
...@@ -1247,7 +1247,7 @@ cifs_find_inode(struct inode *inode, void *opaque) ...@@ -1247,7 +1247,7 @@ cifs_find_inode(struct inode *inode, void *opaque)
static int static int
cifs_init_inode(struct inode *inode, void *opaque) 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)->uniqueid = fattr->cf_uniqueid;
CIFS_I(inode)->createtime = fattr->cf_createtime; CIFS_I(inode)->createtime = fattr->cf_createtime;
......
...@@ -911,7 +911,7 @@ map_and_check_smb_error(struct mid_q_entry *mid, bool logErr) ...@@ -911,7 +911,7 @@ map_and_check_smb_error(struct mid_q_entry *mid, bool logErr)
unsigned int unsigned int
smbCalcSize(void *buf, struct TCP_Server_Info *server) 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) + return (sizeof(struct smb_hdr) + (2 * ptr->WordCount) +
2 /* size of the bcc field */ + get_bcc(ptr)); 2 /* size of the bcc field */ + get_bcc(ptr));
} }
......
...@@ -402,7 +402,7 @@ smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *shdr) ...@@ -402,7 +402,7 @@ smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *shdr)
unsigned int unsigned int
smb2_calc_size(void *buf, struct TCP_Server_Info *srvr) 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; struct smb2_hdr *shdr = &pdu->hdr;
int offset; /* the offset from the beginning of SMB to data area */ int offset; /* the offset from the beginning of SMB to data area */
int data_length; /* the length of the variable length data area */ int data_length; /* the length of the variable length data area */
......
...@@ -354,7 +354,7 @@ fill_small_buf(__le16 smb2_command, struct cifs_tcon *tcon, ...@@ -354,7 +354,7 @@ fill_small_buf(__le16 smb2_command, struct cifs_tcon *tcon,
void *buf, void *buf,
unsigned int *total_len) unsigned int *total_len)
{ {
struct smb2_pdu *spdu = (struct smb2_pdu *)buf; struct smb2_pdu *spdu = buf;
/* lookup word count ie StructureSize from table */ /* lookup word count ie StructureSize from table */
__u16 parmsize = smb2_req_struct_sizes[le16_to_cpu(smb2_command)]; __u16 parmsize = smb2_req_struct_sizes[le16_to_cpu(smb2_command)];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment