lkml.org 
[lkml]   [2017]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git pull] vfs.git part 3
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?

\
 
 \ /
  Last update: 2017-07-06 21:12    [W:0.068 / U:19.868 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site