From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753613AbcESIZs (ORCPT ); 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 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 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(+) 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; -- 2.7.0