From patchwork Sat Apr 16 20:30:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102505 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp570912qge; Sat, 16 Apr 2016 13:31:36 -0700 (PDT) X-Received: by 10.66.43.167 with SMTP id x7mr19476808pal.110.1460838695998; Sat, 16 Apr 2016 13:31:35 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ah8si598131pad.148.2016.04.16.13.31.35; Sat, 16 Apr 2016 13:31:35 -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 S1752103AbcDPUbd (ORCPT + 29 others); Sat, 16 Apr 2016 16:31:33 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:59453 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbcDPUbc (ORCPT ); Sat, 16 Apr 2016 16:31:32 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0LvhpU-1bpx9k2BvI-017YRB; Sat, 16 Apr 2016 22:31:24 +0200 From: Arnd Bergmann To: Dave Chinner Cc: Arnd Bergmann , xfs@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [PATCH] xfs: hide unused variable Date: Sat, 16 Apr 2016 22:30:36 +0200 Message-Id: <1460838665-1249242-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:HYRxgYIQfgsBhXmNJH6EyJj55iecg0ofmYxH3J5BuwpST9eIMIw +6v8lm3e0TrMcwuAnxRAKTCyqokt3qVCuNSE4XA3XeuvKaVGC8bwJgxsWDZeVlqPMaMWzL/ ZSSFqJcaAwpe8G1Bk/sxCoibaHKziewpROseSmkdupgV0lhoOziGIxeXsDsxcnNvMXe9m0w yZUmQmElSBXkeoeXuE1IQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:5HtmmwXh+DE=:NTWvZFoNdramUBOy2cUqQ8 U5cxl9Brp37c2AraYQK7No/KuDQ5/xJrOKsKhaq89h+1b2slAC5AZp/lnbJxy9ZhLWaA2c+Uq MoVCbXPIndhOkYNwyj4z4gN6HyyOkE4kgf+sCGr5w8xGyu7ahFnNMQNkXF7o1pFZ0ZgNIcSQl ZZ7R9ebBFfrWkR0wjbMeWIqRZ7y5ntXTi4VMbsrP8xpt0Q/b27kCr+wAXm8QplJaxZeL79tu3 6b/6BZgF2wNaqADhLVqYysPZaTeJ55zKUxRJzCrVnJWUOZwWvfDBB0v6NCHQ8Ipvq1xugCIik sR/7oa8c4Syye/PzQr/SBfnpJjT07EaH4sgOevWwOcaTlK1nSfmpefiHBAto/s5Jyk88KLa9Y 8yY1uryE+Rp3fd3iItdvuI8X/5B65vmQOESOHSf8vEQWkGhvAvR12fejFo+RFNB3xWPnBRwqY XOP41WyjeR+TZUFLb8FY5d+aWimHB02XsWg2QeL8W623fpiNif2M/jDrivCESbL4IOq05ysx1 ARay+uazGJJ7hLBnesquu08vunOe50bRBtPrjyw/AwofBXreNRh6J+enFmEt0nXW7ERzet5By gLlHr7mOae6EVrKrckxxpxe71IL07yyoSrUY/34P/EukMwGjXN9iZrV1fyQnKGO6kVYrUvdf0 Lwyi1B8VD2A2iYqke9ThN0L3CPXICMyzHCBx8pDoZvTnHpHFZdPUr81dfl8IWietC/Z8= 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") --- 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 e5c3a457c191..737d028914a2 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;