cifs: clean up some compiler warnings
New compiler warnings that I noticed when building a patchset based on recent Fedora kernel: fs/cifs/cifssmb.c: In function 'CIFSSMBSetFileSize': fs/cifs/cifssmb.c:4813:8: warning: variable 'data_offset' set but not used [-Wunused-but-set-variable] fs/cifs/file.c: In function 'cifs_open': fs/cifs/file.c:349:24: warning: variable 'pCifsInode' set but not used [-Wunused-but-set-variable] fs/cifs/file.c: In function 'cifs_partialpagewrite': fs/cifs/file.c:1149:23: warning: variable 'cifs_sb' set but not used [-Wunused-but-set-variable] fs/cifs/file.c: In function 'cifs_iovec_write': fs/cifs/file.c:1740:9: warning: passing argument 6 of 'CIFSSMBWrite2' from incompatible pointer type [enabled by default] fs/cifs/cifsproto.h:337:12: note: expected 'unsigned int *' but argument is of type 'size_t *' fs/cifs/readdir.c: In function 'cifs_readdir': fs/cifs/readdir.c:767:23: warning: variable 'cifs_sb' set but not used [-Wunused-but-set-variable] fs/cifs/cifs_dfs_ref.c: In function 'cifs_dfs_d_automount': fs/cifs/cifs_dfs_ref.c:342:2: warning: 'rc' may be used uninitialized in this function [-Wuninitialized] fs/cifs/cifs_dfs_ref.c:278:6: note: 'rc' was declared here Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:

committed by
Steve French

parent
f855f6cbeb
commit
31c2659d78
@@ -346,7 +346,6 @@ int cifs_open(struct inode *inode, struct file *file)
|
||||
struct cifsTconInfo *tcon;
|
||||
struct tcon_link *tlink;
|
||||
struct cifsFileInfo *pCifsFile = NULL;
|
||||
struct cifsInodeInfo *pCifsInode;
|
||||
char *full_path = NULL;
|
||||
bool posix_open_ok = false;
|
||||
__u16 netfid;
|
||||
@@ -361,8 +360,6 @@ int cifs_open(struct inode *inode, struct file *file)
|
||||
}
|
||||
tcon = tlink_tcon(tlink);
|
||||
|
||||
pCifsInode = CIFS_I(file->f_path.dentry->d_inode);
|
||||
|
||||
full_path = build_path_from_dentry(file->f_path.dentry);
|
||||
if (full_path == NULL) {
|
||||
rc = -ENOMEM;
|
||||
@@ -1146,7 +1143,6 @@ static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to)
|
||||
char *write_data;
|
||||
int rc = -EFAULT;
|
||||
int bytes_written = 0;
|
||||
struct cifs_sb_info *cifs_sb;
|
||||
struct inode *inode;
|
||||
struct cifsFileInfo *open_file;
|
||||
|
||||
@@ -1154,7 +1150,6 @@ static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to)
|
||||
return -EFAULT;
|
||||
|
||||
inode = page->mapping->host;
|
||||
cifs_sb = CIFS_SB(inode->i_sb);
|
||||
|
||||
offset += (loff_t)from;
|
||||
write_data = kmap(page);
|
||||
@@ -1667,7 +1662,8 @@ static ssize_t
|
||||
cifs_iovec_write(struct file *file, const struct iovec *iov,
|
||||
unsigned long nr_segs, loff_t *poffset)
|
||||
{
|
||||
size_t total_written = 0, written = 0;
|
||||
size_t total_written = 0;
|
||||
unsigned int written = 0;
|
||||
unsigned long num_pages, npages;
|
||||
size_t copied, len, cur_len, i;
|
||||
struct kvec *to_send;
|
||||
|
Reference in New Issue
Block a user