From patchwork Thu May 11 12:49:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 99645 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp713159qge; Thu, 11 May 2017 05:49:54 -0700 (PDT) X-Received: by 10.84.175.129 with SMTP id t1mr207048plb.190.1494506994376; Thu, 11 May 2017 05:49:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494506994; cv=none; d=google.com; s=arc-20160816; b=xVLgbuGy6SJ14XjW+ss54AxJH7sHSY/GOIl7v02AWv1BjcAATPJ6t02bv5HAUe8/R+ ZluUWsOkkPu+Is3uGcjkZNoKFrqnpoibP29NroFewppjLSi1IwUZ4h3I5EK+mN1O/hba FaQ/0hxdhY6zCbo2SXpTjohsMtIy5Alt0KNwrTAdO2roW3KGVrdtGBcb+Ud14hljhfV2 w2+fMHDbribhgNSWinDEbJCo7x1vJFrZn+2o9SxFEtCfTAj7tn/zHTZsYE7Ko6tUaB8e E8BOh1bEIOht18trDWATYvD5mlar4Xex2W6d+laAdpWuXM1N190Y9ci3X8ZClCS0asa1 ACKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=rXbYq7OgQ2N5xGylRHh2QknGc+vBwM05bmE7PBPEvVs=; b=Xmuw/hU6MWn8z/bXFMYpnXItCWMXNTy5PkkJPzMtwzzTC/KbrbpPndq3HIZhA+7ykS betIsve1t/yj0joJDMjadAOX4X7AO/WQcNyEG0FRkiid+xmzhOBS6fyAsqgyD19MWDjv t0zPCKdUSWc9sCK+B859tvyEw1HUGRkoeOq2VJZxKSpH9czZyrowZrFo5YnfcirTAqoV j6BwVkLjTP89UNeOJLISt5PCD0QJk4RHCJ95Niji/+kvBaMZ4POOS1yDggEHYmmAZ1sV GPor7pDcELoVJ3GRICNZywdxg7WDAjl9sau0RR3hOVMzUIbl2laV5GXtWNoO8Tqy2Ptc oq3Q== 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 x6si49707plm.296.2017.05.11.05.49.53; Thu, 11 May 2017 05:49:54 -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 S932834AbdEKMtv (ORCPT + 25 others); Thu, 11 May 2017 08:49:51 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:60666 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932212AbdEKMtt (ORCPT ); Thu, 11 May 2017 08:49:49 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0Ldqqt-1drnCf1Mot-00j3Y7; Thu, 11 May 2017 14:49:34 +0200 From: Arnd Bergmann To: "Darrick J. Wong" , linux-xfs@vger.kernel.org Cc: Arnd Bergmann , Dave Chinner , Brian Foster , Eric Sandeen , Calvin Owens , linux-kernel@vger.kernel.org Subject: [PATCH] xfs: avoid harmless gcc-7 warnings Date: Thu, 11 May 2017 14:49:21 +0200 Message-Id: <20170511124932.226016-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:vBNqgu7Dwq4nsUyGgjca8+9/7RlbltmFdZKnUlD4CLw+7QGReU5 EYpXKTUMNw8ZSaXmYy5IarscHsq3s7yWBvD5W9NDtqs3WNxm7n/GuCPUwTIsSiisbtAN/gO e+sf44BdWvxTYbkjjzA+b1ypzsD9OHf7ImbwQlxqePu5iHk1YYp10UfULeKyy7DxvJW+a3Q QPe0szTA6QDRUmsXcqT1A== X-UI-Out-Filterresults: notjunk:1; V01:K0:IMl8BdeTDhY=:WxLGwaMXwY4yB5RGU/wVxT caU1kuJpp7dm9YQcjEI2VW2iyX1ExEyaEys4W0jI+yN5UoTLBR/O/oHruIDwnhF5HsH8ldBlo WocU3RosDix2gOwpx0njE9ErVBljtqeaN1jPzb9Zc3sZwH6xaxZ3Q3/mApiavHMGa9rUbhr9s yn0FmZgBGoakSaxyFpGjQD6In+cExCojBYAxsBN6UBV0p/xzMtiuqi7r9z8ewv/wYHdHy19wk hAkGWHh4BJMBQlopm6etZIpy0NnGsh7PBvIoMFqf3y9FD1dMzSi1bb5ftVH0nooIsxQBNEspy 1G62nMlWbG67HH4QQer5TyYHniwVFGolKbbD14OjbAe+z0DaYRvAczqnZXgX2jtYpipO/mzcp tSvHlNBSwgkNIoYu+Bq4wxgkaqamZ7G9bu7VMHX3T1UPiB9Frh+oIew958G6WmaatpZPli7lL roPuixwqOhZ5ZCoWEfprzqVteNoQ5vlzsquk82M11z/s48iJmSeZ8+PFUogYxqOUkPmJtBg8+ zrBAsMjsi+U5DmCW3kchhZQIO1DWZr4qr/C4qRP0meosyUrnBQS5B+RfLfUQeSyiigpvS3FAE CPAH8mKOzPvpXSpWf72jBTAvtGsXcYIhz/xg2GXbSD2MZezSPsd/JyfgX/U9D+/NVSgUx+6l4 9Hmd37rEc9bnTkztv2fuvIggmUEkZ/qOhu0L1DeN/LH71CcbgxFNqdvTmmdGc8RgXa88= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc-7 flags the use of integer math inside of a condition as a potential bug: fs/xfs/xfs_bmap_util.c: In function 'xfs_swap_extents_check_format': fs/xfs/xfs_bmap_util.c:1619:8: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] fs/xfs/xfs_bmap_util.c:1629:8: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] This one is clearly fine, and we can add a comparison to zero to shut up the warning. Signed-off-by: Arnd Bergmann --- fs/xfs/xfs_bmap_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 Reviewed-by: Eric Sandeen diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 2b954308a1d6..cbd3ffe42f39 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c @@ -1613,7 +1613,7 @@ xfs_swap_extents_check_format( * extent format... */ if (tip->i_d.di_format == XFS_DINODE_FMT_BTREE) { - if (XFS_IFORK_BOFF(ip) && + if ((XFS_IFORK_BOFF(ip) != 0) && XFS_BMAP_BMDR_SPACE(tip->i_df.if_broot) > XFS_IFORK_BOFF(ip)) return -EINVAL; if (XFS_IFORK_NEXTENTS(tip, XFS_DATA_FORK) <= @@ -1623,7 +1623,7 @@ xfs_swap_extents_check_format( /* Reciprocal target->temp btree format checks */ if (ip->i_d.di_format == XFS_DINODE_FMT_BTREE) { - if (XFS_IFORK_BOFF(tip) && + if ((XFS_IFORK_BOFF(tip) != 0) && XFS_BMAP_BMDR_SPACE(ip->i_df.if_broot) > XFS_IFORK_BOFF(tip)) return -EINVAL; if (XFS_IFORK_NEXTENTS(ip, XFS_DATA_FORK) <=