Re: [PATCH v2 12/12] use less confusing names for iov_iter direction initializers

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

 



On Fri, Oct 28, 2022 at 12:30 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> Went through the callers, replaced each with the right ITER_... (there's
> not that many of them and they are fairly easy to review), then went
> through mismatches and split their fixups into the beginning of the
> series (READ -> ITER_SOURCE becoming READ -> WRITE -> ITER_SOURCE, that
> is).

Oh, ok. So if you've actually reviewed each and every one of them,
then I'm ok with the "abort".

I still want it to be a WARN_ON_ONCE(), because of any future addition
that gets things wrong.

Rationale: either the WARN_ON() can happen, or it cannot. If it
cannot, it shouldn't exist in the first place. If it can, warning
multiple times will just make things harder to read and possibly cause
endless streams of scrolling errors.

So either the WARN_ON() shouldn't exist, or it should be a WARN_ON_ONCE().

Generally the only valid use of WARN_ON() (and BUG_ON()) is for things
like errors in the boot/setup code, where the operation basically is
only done once anyway.

                 Linus



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux