[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2704405.1674084290@warthog.procyon.org.uk>
Date: Wed, 18 Jan 2023 23:24:50 +0000
From: David Howells <dhowells@...hat.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: dhowells@...hat.com, Christoph Hellwig <hch@...radead.org>,
Matthew Wilcox <willy@...radead.org>,
Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.cz>,
Jeff Layton <jlayton@...nel.org>,
Logan Gunthorpe <logang@...tatee.com>,
linux-fsdevel@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 05/34] iov_iter: Change the direction macros into an enum
Al Viro <viro@...iv.linux.org.uk> wrote:
> > Compile time type checking.
>
> Huh? int-to-enum conversion is quiet; it would catch explicit
> huge constants, but that's it...
*shrug*.
But can we at least get rid of the:
iov_iter_foo(&iter, ITER_SOURCE, ...);
WARN_ON(direction & ~(READ | WRITE));
mismatch? Either use ITER_SOURCE/DEST or use READ/WRITE but not mix them.
David
Powered by blists - more mailing lists