From patchwork Thu Nov 8 11:36:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10674025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5BC7C13BF for ; Thu, 8 Nov 2018 11:26:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4900B28B57 for ; Thu, 8 Nov 2018 11:26:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D6B62AC2E; Thu, 8 Nov 2018 11:26:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 171F42AC1B for ; Thu, 8 Nov 2018 11:26:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbeKHVBb (ORCPT ); Thu, 8 Nov 2018 16:01:31 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:14636 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726252AbeKHVBb (ORCPT ); Thu, 8 Nov 2018 16:01:31 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 70566B6F6A2D5; Thu, 8 Nov 2018 19:26:23 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.408.0; Thu, 8 Nov 2018 19:26:18 +0800 From: YueHaibing To: Steve French CC: Yue Haibing , , , Subject: [PATCH -next] cifs: remove set but not used variable 'cifsi' Date: Thu, 8 Nov 2018 11:36:02 +0000 Message-ID: <1541676962-125306-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yue Haibing Fixes gcc '-Wunused-but-set-variable' warning: fs/cifs/smb2ops.c: In function 'smb3_punch_hole': fs/cifs/smb2ops.c:2122:24: warning: variable 'cifsi' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 31742c5a3317 ("enable fallocate punch hole ("fallocate -p") for SMB3") Signed-off-by: Yue Haibing --- fs/cifs/smb2ops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 15c7cbd..c9a4a2c 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -2119,7 +2119,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; @@ -2129,7 +2128,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 */