Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752261AbdGFPqG (ORCPT ); Thu, 6 Jul 2017 11:46:06 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:54340 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751654AbdGFPqE (ORCPT ); Thu, 6 Jul 2017 11:46:04 -0400 Date: Thu, 6 Jul 2017 16:46:02 +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: <20170706154602.GR10672@ZenIV.linux.org.uk> References: <20170705071446.GA10672@ZenIV.linux.org.uk> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170706151033.GA1871@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: 1847 Lines: 55 On Thu, Jul 06, 2017 at 05:10:33PM +0200, Christoph Hellwig wrote: > On Thu, Jul 06, 2017 at 04:03:30PM +0100, Al Viro wrote: > > On Thu, Jul 06, 2017 at 04:48:40PM +0200, Christoph Hellwig wrote: > > > > > Just did the whole batch (patch below), but it seems like using a > > > __bitwise type in SYSCALL_DEFINE* will always give warnings like: > > > > > > fs/read_write.c:1095:1: warning: cast to restricted __kernel_rwf_t > > > > > > which I'm not sure to deal with.. > > > > #define __SC_CAST(t, a) (__force t) a > > doesn't seem to make a difference.. Works here... ; cat a.c #include #undef __SC_CAST #define __SC_CAST(t, a) (__force t)a typedef int __bitwise __foo_t; static __foo_t is_OK; static int will_warn; SYSCALL_DEFINE1(foo, __foo_t, arg) { is_OK = arg; will_warn = arg; return 0; } ; make a.o C=2 CHECK=~/local/sparse/sparse CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CHECK arch/x86/purgatory/purgatory.c CHECK arch/x86/purgatory/sha256.c CHECK arch/x86/purgatory/string.c arch/x86/purgatory/../boot/string.c:165:6: warning: symbol 'strchr' was not declared. Should it be static? CHK include/generated/bounds.h CHK include/generated/timeconst.h CHK include/generated/asm-offsets.h CALL scripts/checksyscalls.sh DESCEND objtool CHECK scripts/mod/empty.c CHK scripts/mod/devicetable-offsets.h CHK include/generated/timeconst.h CHK include/generated/bounds.h CHECK a.c a.c:10:19: warning: incorrect type in assignment (different base types) a.c:10:19: expected int static [signed] [toplevel] will_warn a.c:10:19: got restricted __foo_t [usertype] arg CC a.o ; That - on #work.read_write, as in vfs.git at the moment...