diff mbox series

[-next] cifs: remove set but not used variable 'cifs_sb'

Message ID 1536198643-6123-1-git-send-email-yuehaibing@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] cifs: remove set but not used variable 'cifs_sb' | expand

Commit Message

Yue Haibing Sept. 6, 2018, 1:50 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

fs/cifs/ioctl.c: In function 'cifs_ioctl':
fs/cifs/ioctl.c:164:23: warning:
 variable 'cifs_sb' set but not used [-Wunused-but-set-variable]

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

Comments

Steve French Sept. 6, 2018, 5:57 p.m. UTC | #1
merged into cifs-2.6.git for-next
On Wed, Sep 5, 2018 at 8:41 PM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> fs/cifs/ioctl.c: In function 'cifs_ioctl':
> fs/cifs/ioctl.c:164:23: warning:
>  variable 'cifs_sb' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  fs/cifs/ioctl.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
> index 91f87ea..6a51ec6e 100644
> --- a/fs/cifs/ioctl.c
> +++ b/fs/cifs/ioctl.c
> @@ -161,7 +161,6 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
>         struct inode *inode = file_inode(filep);
>         int rc = -ENOTTY; /* strange error - but the precedent */
>         unsigned int xid;
> -       struct cifs_sb_info *cifs_sb;
>         struct cifsFileInfo *pSMBFile = filep->private_data;
>         struct cifs_tcon *tcon;
>         __u64   ExtAttrBits = 0;
> @@ -169,7 +168,6 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
>
>         xid = get_xid();
>
> -       cifs_sb = CIFS_SB(inode->i_sb);
>         cifs_dbg(FYI, "cifs ioctl 0x%x\n", command);
>         switch (command) {
>                 case FS_IOC_GETFLAGS:
>
diff mbox series

Patch

diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
index 91f87ea..6a51ec6e 100644
--- a/fs/cifs/ioctl.c
+++ b/fs/cifs/ioctl.c
@@ -161,7 +161,6 @@  long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
 	struct inode *inode = file_inode(filep);
 	int rc = -ENOTTY; /* strange error - but the precedent */
 	unsigned int xid;
-	struct cifs_sb_info *cifs_sb;
 	struct cifsFileInfo *pSMBFile = filep->private_data;
 	struct cifs_tcon *tcon;
 	__u64	ExtAttrBits = 0;
@@ -169,7 +168,6 @@  long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
 
 	xid = get_xid();
 
-	cifs_sb = CIFS_SB(inode->i_sb);
 	cifs_dbg(FYI, "cifs ioctl 0x%x\n", command);
 	switch (command) {
 		case FS_IOC_GETFLAGS: