Re: [PATCH net v3] net: lan743x: Don't sleep in atomic context

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

 



Hi Andrew,

On Tue, Jun 27, 2023 at 4:51 PM Andrew Lunn <andrew@xxxxxxx> wrote:
>
> > Side note would be that I don't see much value in iopoll.h's macros
> > returning
> >
> >       (cond) ? 0 : -ETIMEDOUT; \
> >
> > this could be just !!cond but given the count of the callsites...probably
> > better to leave it as is.
>
> The general pattern everywhere in linux is:
>
>     err = foo(bar);
>     if (err)
>         return err;
>
> We want functions to return meaningful error codes, otherwise the
> caller needs to figure out an error code and return it. Having iopoll
> return an error code means we have consistency. Otherwise i would
> expect some developers to decide on EIO, ETIMEDOUT, EINVAL, maybe
> ENXIO?

Can you clarify if you suggest to leave this alone as-is in patch, or
replace with something returning one of the errors above?

If the former, anything else missing in the patch?

Thanks,
Moritz




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux