Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751228AbbL0FlZ (ORCPT ); Sun, 27 Dec 2015 00:41:25 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:55413 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750807AbbL0FlY (ORCPT ); Sun, 27 Dec 2015 00:41:24 -0500 Date: Sun, 27 Dec 2015 05:41:17 +0000 From: Al Viro To: Joshua Clayton Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Oleg Drokin , Andreas Dilger , lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org Subject: Re: [PATCH] mm: fix noisy sparse warning in LIBCFS_ALLOC_PRE() Message-ID: <20151227054117.GG20997@ZenIV.linux.org.uk> References: <1451193162-20057-1-git-send-email-stillcompiling@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1451193162-20057-1-git-send-email-stillcompiling@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 704 Lines: 16 On Sat, Dec 26, 2015 at 09:12:42PM -0800, Joshua Clayton wrote: > running sparse on drivers/staging/lustre results in dozens of warnings: > include/linux/gfp.h:281:41: warning: > odd constant _Bool cast (400000 becomes 1) > > Use "!!" to explicitly convert the result to bool range. ... and the cast to bool is left in order to...? > - return (bool __force)(gfp_flags & __GFP_DIRECT_RECLAIM); > + return (bool __force)!!(gfp_flags & __GFP_DIRECT_RECLAIM); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/