From patchwork Thu May 19 08:25:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102315 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp3065616qge; Thu, 19 May 2016 01:25:52 -0700 (PDT) X-Received: by 10.98.66.80 with SMTP id p77mr17733109pfa.75.1463646352640; Thu, 19 May 2016 01:25:52 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uy8si18479364pab.145.2016.05.19.01.25.50; Thu, 19 May 2016 01:25:52 -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 S1753659AbcESIZs (ORCPT + 29 others); Thu, 19 May 2016 04:25:48 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:53845 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751948AbcESIZp (ORCPT ); Thu, 19 May 2016 04:25:45 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0Lxbn5-1bezhu48fD-017H4e; Thu, 19 May 2016 10:25:34 +0200 From: Arnd Bergmann To: Dave Chinner , xfs@oss.sgi.com Cc: Arnd Bergmann , Brian Foster , linux-kernel@vger.kernel.org Subject: [PATCH v2] xfs: hide unused variable Date: Thu, 19 May 2016 10:25:15 +0200 Message-Id: <1463646331-933024-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:s1M0IR57rSyWam0mLY6aUiGkXPRa/Dq4Xg5Bd77jwOuL6465OF1 hGij+amLA8DmPwqqkDUEgnZyH89Gbi5zip+8PTFWKFKD0XJTifSPRfYigA2/01/+4opTIqW 0AaKBZkZxqKYIxsQsi53kt04DjRD2pUxNOoMmvUr5zkhiHjPbJsgWbBiyQbFC0fbgiNly+9 SuGT+gcQN0r4rN35BwcvA== X-UI-Out-Filterresults: notjunk:1; V01:K0:pHn7IHce99U=:pj7G2+k+ahKOgxJ/ZbDI3y /uYLjvuLbio5DPWUNQk6U3Yl1Za9fVIqIFBk5l385dckB1hJeKgMjQOUDLGlkJQPsbJQEhs9d Jvn3vb7Iu9U2I4mXWmmEohTnbd4uiOXO759LMNgEhHRkOAk3fSZcKK13R2XNRJCsxPZ6nMwpo WI5WzY57kcf6kZqc7gQslGvav74UbtI9eHCJWmuLRymprPYhVUdBqcE7U6Sk/wfYJt6nVPzJC QQQ/gh0VUgM7V6bn4f+HgWcMChkBlIs/QVBTXooK+KOX78pyDfsTNv5D1mtWpRYRieZBTh1na qZnDrJM7pEyNX1jlIs7EKSBkabz4LQdj4U5YV02RLYFA8vzxKI2yMutUMLMMJwtbJ65E46PtX J8Pph6yLv0G87bVxNC5+35EGS/00SyPG5C+yHEjzFEz0y8FWqCPrhXEJ5nt8MvBYtjVPWybeu sdAnPy5Xmpn/7EJrIjNeBf6++0ZkyTArjyL+yzP75tA0Lp9RDGrxeRGyMJqM4fo1L8qrXtjNA wyLNK0zuiTWhBpPAVwRHxbnCqor4CHt5GsD1IWAvKQ/u5Y5YKA2tGLGsuMmOJJSvJzU9k6tz0 pO93hGT4rIu3wEgcStJBlas0c49WOMOzSwb2FEtOtVbTskvvIIHqUEOesfge1vRr98gwkW4D3 kEt5X758t1++MOFAjDzIebftd6lQs/8luHO+5v4lgnDtkz7jUvCykBcMSEc9DfxbVWEI= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The newly added xfs_finish_page_writeback() function causes a harmless gcc warning when debugging is disabled: fs/xfs/xfs_aops.c: In function 'xfs_finish_page_writeback': fs/xfs/xfs_aops.c:97:16: error: unused variable 'blockmask' [-Werror=unused-variable] unsigned int blockmask = (1 << inode->i_blkbits) - 1; ^~~~~~~~~ This adds an #ifdef around the variable declaration to hide it whenever the ASSERT macro is defined as a stub, following the same style as used elsewhere in xfs. Signed-off-by: Arnd Bergmann Fixes: 37992c18bba3 ("xfs: don't release bios on completion immediately") --- I originally sent this on April 16 when the warning first showed up but got no reply. Sending it again now as the warning is still present in linux-next. fs/xfs/xfs_aops.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.0 diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 8a5244e4c2e9..62d938c46f31 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -94,7 +94,9 @@ xfs_finish_page_writeback( struct bio_vec *bvec, int error) { +#if defined(DEBUG) || defined(XFS_WARN) unsigned int blockmask = (1 << inode->i_blkbits) - 1; +#endif unsigned int end = bvec->bv_offset + bvec->bv_len - 1; struct buffer_head *head, *bh; unsigned int off = 0;