From patchwork Thu Nov 2 11:11:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10038479 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3993A60291 for ; Thu, 2 Nov 2017 11:12:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F2D828F01 for ; Thu, 2 Nov 2017 11:12:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 228EB28F05; Thu, 2 Nov 2017 11:12:19 +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=-6.9 required=2.0 tests=BAYES_00,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 C29F028F01 for ; Thu, 2 Nov 2017 11:12:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755802AbdKBLMD (ORCPT ); Thu, 2 Nov 2017 07:12:03 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:58469 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755772AbdKBLL7 (ORCPT ); Thu, 2 Nov 2017 07:11:59 -0400 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0Li6Ex-1dNM7Y2279-00nRpa; Thu, 02 Nov 2017 12:11:51 +0100 From: Arnd Bergmann To: "Darrick J. Wong" Cc: Arnd Bergmann , linux-xfs@vger.kernel.org, Brian Foster , Dave Chinner , Eric Sandeen , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] xfs: fix unused variable warnings Date: Thu, 2 Nov 2017 12:11:13 +0100 Message-Id: <20171102111137.3062126-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20171102111137.3062126-1-arnd@arndb.de> References: <20171102111137.3062126-1-arnd@arndb.de> X-Provags-ID: V03:K0:4TwVaRbn9b2zISKIa75ikUdrc8+JS2hIE/LJJja/NPEnuH5yPfP WLYtRCz3GjrG3zOEQh2zgnZOslkzmeIty4g7USJSQ6xjVpNqlywECSchJw8P3zzcfRSHhak v5+7DbqksdkARo3SvW0SGa4vhV/h7Xrj+uAefUP3ucMBjfNuzKRCwYVLFcBmYj3JZUt6MKj sMl5yymqUfqYdfixr9KuQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:KBRcH3K/SQc=:O38Kcud87NGuvK1zoqV2nH LyFQI9iK7gUFD1elAIK1ZwfGrZWsDAop10wHCZYDXc8ShpAgQTB6fgAgIs2cHELUl7x+t0cCY bHhSHpRANM3XkYQN/etW4Y8KL6WGGw5vDMaEY6Je4RaEZAcpjr6yYBGE/bT8FWwIUdFn8lNhh zgyRLNQ9T3QivSmpBMiAzZFS+JU6lHXOXksyRLPkiswVz5VP441eQK+5PIcArjb240Ks8rNzU 5BlBBsgg5GHz/x34kV5VtJ3c0TSN6Tq/6yQ2r1HGalW1HA9VNw6aNDPF4MgNATCcAjLf9Ab8x CM1vLVKy4S4ihSk2YRoKkpy4vbgKNhsfpbBmakpK++pBe4w3SF0UrC6lse+up7Vx1NvtIvNLJ ONxFrZMkro0omu1ZHgaXjBxG3QNm36LAK6zwOKA1xTkFsv2QUT/2uBsYjxOYpvzfTFibFVEOl inD68vpQSTz0qPwOeYaY8gi8yBGvuoeWlzL11YTqxw1sD+bLb0Xsx6JfqhJsnLJ7bWNtW7yFI HDFuuKiHzAVSm8wsMOGy/zoPgY489AMg2mlKsQAj3HU1ZW84G65oyJntebQeDT9M0dZ1SJIoX Dct3sUhhByl1aUBYY4P9WreJ6s/MJ75Gsh4BlTrwru0Hp6+3ia74xduUMbaFO7k7p+npKAQa2 bOr6W8/NkU5LL8HtpSjUWL1HobqDyblECLdzgw1874fU7k9qHWeKhiAgdO2BNRypNgxk/PY3Z Q4PoHJ3j8A+5Bfvuwu/+KhhliPy1JDoNqKKNtw== Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP fs/xfs/libxfs/xfs_bmap.c: In function 'xfs_bmap_del_extent_delay': fs/xfs/libxfs/xfs_bmap.c:4648:20: error: unused variable 'ifp' [-Werror=unused-variable] struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, whichfork); ^~~ fs/xfs/libxfs/xfs_bmap.c: In function 'xfs_bmap_del_extent_cow': fs/xfs/libxfs/xfs_bmap.c:4776:20: error: unused variable 'ifp' [-Werror=unused-variable] Fixes: ca5d8e5b7b90 ("xfs: move pre/post-bmap tracing into xfs_iext_update_extent") Signed-off-by: Arnd Bergmann Reviewed-by: Brian Foster --- fs/xfs/libxfs/xfs_bmap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index f45f05c45e15..fa85b08b8fe2 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -4645,7 +4645,6 @@ xfs_bmap_del_extent_delay( struct xfs_bmbt_irec *del) { struct xfs_mount *mp = ip->i_mount; - struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, whichfork); struct xfs_bmbt_irec new; int64_t da_old, da_new, da_diff = 0; xfs_fileoff_t del_endoff, got_endoff; @@ -4663,7 +4662,7 @@ xfs_bmap_del_extent_delay( da_new = 0; ASSERT(*idx >= 0); - ASSERT(*idx <= xfs_iext_count(ifp)); + ASSERT(*idx <= xfs_iext_count(XFS_IFORK_PTR(ip, whichfork))); ASSERT(del->br_blockcount > 0); ASSERT(got->br_startoff <= del->br_startoff); ASSERT(got_endoff >= del_endoff); @@ -4773,7 +4772,6 @@ xfs_bmap_del_extent_cow( struct xfs_bmbt_irec *del) { struct xfs_mount *mp = ip->i_mount; - struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, XFS_COW_FORK); struct xfs_bmbt_irec new; xfs_fileoff_t del_endoff, got_endoff; int state = BMAP_COWFORK; @@ -4784,7 +4782,7 @@ xfs_bmap_del_extent_cow( got_endoff = got->br_startoff + got->br_blockcount; ASSERT(*idx >= 0); - ASSERT(*idx <= xfs_iext_count(ifp)); + ASSERT(*idx <= xfs_iext_count(XFS_IFORK_PTR(ip, XFS_COW_FORK))); ASSERT(del->br_blockcount > 0); ASSERT(got->br_startoff <= del->br_startoff); ASSERT(got_endoff >= del_endoff);