Re: [git pull] vfs.git part 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux