Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1682663

Re: [git pull] vfs.git part 3

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject Re: [git pull] vfs.git part 3
Date 2017-07-06 21:20 +0200
Message-ID <u0ktH-1dP-1@gated-at.bofh.it> (permalink)
References (5 earlier) <u0gzM-6G5-7@gated-at.bofh.it> <u0gJr-6NU-1@gated-at.bofh.it> <u0hct-7dv-17@gated-at.bofh.it> <u0hm9-7mU-15@gated-at.bofh.it> <u0iid-87X-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[git pull] vfs.git part 3 Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-05 09:20 +0200
  Re: [git pull] vfs.git part 3 Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-06 00:00 +0200
    Re: [git pull] vfs.git part 3 Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-06 00:40 +0200
      Re: [git pull] vfs.git part 3 Christoph Hellwig <hch@lst.de> - 2017-07-06 01:00 +0200
        Re: [git pull] vfs.git part 3 Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-06 01:30 +0200
          Re: [git pull] vfs.git part 3 Christoph Hellwig <hch@lst.de> - 2017-07-06 16:50 +0200
            Re: [git pull] vfs.git part 3 Christoph Hellwig <hch@lst.de> - 2017-07-06 17:10 +0200
            Re: [git pull] vfs.git part 3 Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-06 17:10 +0200
              Re: [git pull] vfs.git part 3 Christoph Hellwig <hch@lst.de> - 2017-07-06 17:20 +0200
                Re: [git pull] vfs.git part 3 Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-06 17:50 +0200
                Re: [git pull] vfs.git part 3 Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-06 18:00 +0200
                Re: [git pull] vfs.git part 3 Christoph Hellwig <hch@lst.de> - 2017-07-06 19:00 +0200
                Re: [git pull] vfs.git part 3 Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-06 21:20 +0200
                Re: [git pull] vfs.git part 3 Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-07 01:30 +0200
                Re: [git pull] vfs.git part 3 Christoph Hellwig <hch@lst.de> - 2017-07-07 16:10 +0200
                Re: [git pull] vfs.git part 3 Linus Torvalds <torvalds@linux-foundation.org> - 2017-07-07 17:50 +0200
                Re: [git pull] vfs.git part 3 Christopher Li <sparse@chrisli.org> - 2017-07-07 21:50 +0200
                Re: [git pull] vfs.git part 3 Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-08 18:30 +0200
      [RFC] ->poll() sparse annotations Al Viro <viro@ZenIV.linux.org.uk> - 2017-07-18 03:40 +0200

csiph-web