Re: [git pull] vfs.git part 3
From: Al Viro
Date: Thu Jul 06 2017 - 11:46:09 EST
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..
; cat a.c
#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;
; make a.o C=2 CHECK=~/local/sparse/sparse
arch/x86/purgatory/../boot/string.c:165:6: warning: symbol 'strchr' was not declared. Should it be static?
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
That - on #work.read_write, as in vfs.git at the moment...