lkml.org 
[lkml]   [2023]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v6 05/34] iov_iter: Change the direction macros into an enum
Date
Al Viro <viro@zeniv.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

\
 
 \ /
  Last update: 2023-03-26 23:46    [W:1.377 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site