Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752219AbdGFTLs (ORCPT ); Thu, 6 Jul 2017 15:11:48 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:59598 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751817AbdGFTLr (ORCPT ); Thu, 6 Jul 2017 15:11:47 -0400 Date: Thu, 6 Jul 2017 20:11:44 +0100 From: Al Viro To: Christoph Hellwig Cc: Linus Torvalds , Linux Kernel Mailing List , linux-fsdevel Subject: Re: [git pull] vfs.git part 3 Message-ID: <20170706191144.GT10672@ZenIV.linux.org.uk> References: <20170705223821.GF10672@ZenIV.linux.org.uk> <20170705225235.GA11849@lst.de> <20170705232912.GG10672@ZenIV.linux.org.uk> <20170706144840.GA1400@lst.de> <20170706150330.GQ10672@ZenIV.linux.org.uk> <20170706151033.GA1871@lst.de> <20170706154602.GR10672@ZenIV.linux.org.uk> <20170706155113.GS10672@ZenIV.linux.org.uk> <20170706165837.GA4106@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170706165837.GA4106@lst.de> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1545 Lines: 35 On Thu, Jul 06, 2017 at 06:58:37PM +0200, Christoph Hellwig wrote: > On Thu, Jul 06, 2017 at 04:51:13PM +0100, Al Viro wrote: > > On Thu, Jul 06, 2017 at 04:46:02PM +0100, Al Viro wrote: > > > > > That - on #work.read_write, as in vfs.git at the moment... > > > > ... and for COMPAT_SYSCALL you need > > #define __SC_DELOUSE(t,v) ((__force t)(unsigned long)(v)) > > in linux/compat.h > > I'm still getting warnings with both these force casts. This is > the current stack: That + Linus' tree as of the end of yesterday => CHECK fs/read_write.c fs/read_write.c:38:29: warning: incorrect type in return expression (different base types) fs/read_write.c:38:29: expected int fs/read_write.c:38:29: got restricted fmode_t fs/read_write.c:38:29: warning: incorrect type in return expression (different base types) fs/read_write.c:38:29: expected int fs/read_write.c:38:29: got restricted fmode_t fs/read_write.c:38:29: warning: incorrect type in return expression (different base types) fs/read_write.c:38:29: expected int fs/read_write.c:38:29: got restricted fmode_t fs/read_write.c:38:29: warning: incorrect type in return expression (different base types) fs/read_write.c:38:29: expected int fs/read_write.c:38:29: got restricted fmode_t All of which are from unsigned_offsets() and that's one case where bool would be better than int. Switching the return type to bool yields CHECK fs/read_write.c CC fs/read_write.o - no warnings at all. Which sparse version are you using and what's your .config?