linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] cifs: remove set but not used variable 'ioctl_buf' and 'cifsi'
@ 2019-06-11 13:53 YueHaibing
  0 siblings, 0 replies; only message in thread
From: YueHaibing @ 2019-06-11 13:53 UTC (permalink / raw)
  To: sfrench, lsahlber; +Cc: linux-kernel, samba-technical, linux-cifs, YueHaibing

Fixes gcc '-Wunused-but-set-variable' warnings:

fs/cifs/smb2ops.c: In function smb2_query_symlink:
fs/cifs/smb2ops.c:2417:8: warning: variable ioctl_buf set but not used [-Wunused-but-set-variable]
fs/cifs/smb2ops.c: In function smb3_punch_hole:
fs/cifs/smb2ops.c:2799:24: warning: variable cifsi set but not used [-Wunused-but-set-variable]

'ioctl_buf' is never used since introduction in commit ebaf546a5584 ("SMB3:
Clean up query symlink when reparse point")

'cifsi' is never used since introduction in commit 31742c5a3317 ("enable
fallocate punch hole ("fallocate -p") for SMB3")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/cifs/smb2ops.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index e921e65..e8dfa34 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -2414,7 +2414,6 @@ smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon,
 	struct kvec close_iov[1];
 	struct smb2_create_rsp *create_rsp;
 	struct smb2_ioctl_rsp *ioctl_rsp;
-	char *ioctl_buf;
 	u32 plen;
 
 	cifs_dbg(FYI, "%s: path: %s\n", __func__, full_path);
@@ -2496,7 +2495,6 @@ smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon,
 	if ((rc == 0) && (is_reparse_point)) {
 		/* See MS-FSCC 2.3.23 */
 
-		ioctl_buf = (char *)ioctl_rsp + le32_to_cpu(ioctl_rsp->OutputOffset);
 		plen = le32_to_cpu(ioctl_rsp->OutputCount);
 
 		if (plen + le32_to_cpu(ioctl_rsp->OutputOffset) >
@@ -2796,7 +2794,6 @@ static long smb3_punch_hole(struct file *file, struct cifs_tcon *tcon,
 			    loff_t offset, loff_t len)
 {
 	struct inode *inode;
-	struct cifsInodeInfo *cifsi;
 	struct cifsFileInfo *cfile = file->private_data;
 	struct file_zero_data_information fsctl_buf;
 	long rc;
@@ -2806,7 +2803,6 @@ static long smb3_punch_hole(struct file *file, struct cifs_tcon *tcon,
 	xid = get_xid();
 
 	inode = d_inode(cfile->dentry);
-	cifsi = CIFS_I(inode);
 
 	/* Need to make file sparse, if not already, before freeing range. */
 	/* Consider adding equivalent for compressed since it could also work */
-- 
2.7.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-11 13:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 13:53 [PATCH -next] cifs: remove set but not used variable 'ioctl_buf' and 'cifsi' YueHaibing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).