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: 117786 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp1922326edm; Thu, 2 Nov 2017 04:12:05 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RAvu2LNNuwfob4G6FERNWiIwwi59ka0EJZAnQKiqk6SUkT1/AzW0akh1R7I5mAFj1rVPbn X-Received: by 10.98.74.149 with SMTP id c21mr3396890pfj.200.1509621125059; Thu, 02 Nov 2017 04:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509621125; cv=none; d=google.com; s=arc-20160816; b=tV1KnhXLb7AuAos4JaM3fyBdnAalJQ+rpzXjyP1w8sF4/ucatWZTgdhZQLsmkvDarK 847QOhZTFDvYDsBndQOjPRXCD+jm7BbVEm/35fF3yfiU0T98sM3lAFBJ9sv2fypAUO39 MsG6Wv11skE/UMPbn5nqtoKzMEHlfrCIkKYSuxldmIaecy58EF9JFBZnXAvpSzYVGvkM vSovSOTRQ3gR/bv75SG0MJFYt0lzRigciSyjbD48BAQZ3NFt964yfg8mJgwrNtaATN9W L+yiYbsO46isM1PnAj7jn7A6/tIEpuHr9E/aa53J0FYapsu433GbV7VovQYiEVmBEYZj vqpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=V3b6tgo9Vc2DO5Y/qKgDEKghJDyti+oPxXg9MvhqmAQ=; b=EvSngwvsdp8EREXqsTMhKGHiuPX1f8ATFvlnM6xKvYr0k4vjjZTJI5Foo/XRUwwpbE FoLSOQWCSphI2vZfS4eQrthBYNtIbC/L1Cz7XtU4OqulEfbpm+SZgxiDh+2+6utrIzPD WU4KJlRB6KDdVwb+K9bx5i97gT3Cj/HEKvi2qoKWIi4Bo1sYxBGg3FAR0Z3TJ/QgL3ad 7qd0VNEmX1/IV49XTt3lF6XwsBQWIR2KcsShCE8+80oa32uXnpz1zkt9DnyngSUOuG71 0rIo5dbM40M45bX/yxYxAt1DIALkPwlAhMLffa21LnAi144fgBl9No9lMxge7E4nOVQp KGPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7si3195248pgp.592.2017.11.02.04.12.04; Thu, 02 Nov 2017 04:12:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755823AbdKBLMD (ORCPT + 26 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- fs/xfs/libxfs/xfs_bmap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.9.0 Reviewed-by: Brian Foster 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);