From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752210AbdKVV3b (ORCPT ); Wed, 22 Nov 2017 16:29:31 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:38195 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752544AbdKVV2w (ORCPT ); Wed, 22 Nov 2017 16:28:52 -0500 X-Google-Smtp-Source: AGs4zMaW+DItgU9Pf4iVT7usq45qT45IL96/L5AOH4h0zf1PRKSglxWZFIkN3ep6rYh5eUaKcHepFA== Date: Wed, 22 Nov 2017 22:28:48 +0100 From: Luc Van Oostenryck To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Matthew Wilcox Subject: Re: [PATCH 05/62] radix tree: Add a missing cast to gfp_t Message-ID: <20171122212847.axib6ito23sldlbe@ltop.local> References: <20171122210739.29916-1-willy@infradead.org> <20171122210739.29916-6-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171122210739.29916-6-willy@infradead.org> User-Agent: NeoMutt/20171027 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 22, 2017 at 01:06:42PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > sparse complains about an invalid type assignment. > > Signed-off-by: Matthew Wilcox > --- > lib/radix-tree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/radix-tree.c b/lib/radix-tree.c > index c8d55565fafa..f00303e0b216 100644 > --- a/lib/radix-tree.c > +++ b/lib/radix-tree.c > @@ -178,7 +178,7 @@ static inline void root_tag_clear(struct radix_tree_root *root, unsigned tag) > > static inline void root_tag_clear_all(struct radix_tree_root *root) > { > - root->gfp_mask &= (1 << ROOT_TAG_SHIFT) - 1; > + root->gfp_mask &= (__force gfp_t)((1 << ROOT_TAG_SHIFT) - 1); > } > > static inline int root_tag_get(const struct radix_tree_root *root, unsigned tag) > -- IMO, it would be better to define something for that in radix-tree.h, like it has been done for ROOT_IS_IDR. Regards, -- Luc From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 22 Nov 2017 22:28:48 +0100 From: Luc Van Oostenryck To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Matthew Wilcox Subject: Re: [PATCH 05/62] radix tree: Add a missing cast to gfp_t Message-ID: <20171122212847.axib6ito23sldlbe@ltop.local> References: <20171122210739.29916-1-willy@infradead.org> <20171122210739.29916-6-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171122210739.29916-6-willy@infradead.org> Sender: owner-linux-mm@kvack.org List-ID: On Wed, Nov 22, 2017 at 01:06:42PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > sparse complains about an invalid type assignment. > > Signed-off-by: Matthew Wilcox > --- > lib/radix-tree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/radix-tree.c b/lib/radix-tree.c > index c8d55565fafa..f00303e0b216 100644 > --- a/lib/radix-tree.c > +++ b/lib/radix-tree.c > @@ -178,7 +178,7 @@ static inline void root_tag_clear(struct radix_tree_root *root, unsigned tag) > > static inline void root_tag_clear_all(struct radix_tree_root *root) > { > - root->gfp_mask &= (1 << ROOT_TAG_SHIFT) - 1; > + root->gfp_mask &= (__force gfp_t)((1 << ROOT_TAG_SHIFT) - 1); > } > > static inline int root_tag_get(const struct radix_tree_root *root, unsigned tag) > -- IMO, it would be better to define something for that in radix-tree.h, like it has been done for ROOT_IS_IDR. Regards, -- Luc -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org