All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christoph Hellwig <hch@lst.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [git pull] vfs.git part 3
Date: Thu, 6 Jul 2017 16:46:02 +0100	[thread overview]
Message-ID: <20170706154602.GR10672@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20170706151033.GA1871@lst.de>

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 <linux/syscalls.h>
#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...

  reply	other threads:[~2017-07-06 15:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05  7:14 [git pull] vfs.git part 3 Al Viro
2017-07-05 21:51 ` Linus Torvalds
2017-07-05 22:38   ` Al Viro
2017-07-05 22:52     ` Christoph Hellwig
2017-07-05 23:29       ` Al Viro
2017-07-06 14:48         ` Christoph Hellwig
2017-07-06 15:03           ` Al Viro
2017-07-06 15:06             ` Christoph Hellwig
2017-07-06 15:10             ` Christoph Hellwig
2017-07-06 15:46               ` Al Viro [this message]
2017-07-06 15:51                 ` Al Viro
2017-07-06 16:58                   ` Christoph Hellwig
2017-07-06 19:11                     ` Al Viro
2017-07-06 21:44                       ` Christoph Hellwig
2017-07-06 23:27                         ` Al Viro
2017-07-07 14:00                           ` Christoph Hellwig
2017-07-07 15:48                             ` Linus Torvalds
2017-07-07 19:42                               ` Christopher Li
2017-07-08 16:24                             ` Al Viro
2017-07-18  1:36     ` [RFC] ->poll() sparse annotations Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2013-07-08 10:07 [git pull] vfs.git, part 3 Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170706154602.GR10672@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.