Re: [PATCH net-next 0/4] net: ipa: kill IPA_VALIDATION

From: Alex Elder
Date: Tue Jul 27 2021 - 09:40:50 EST


On 7/27/21 7:56 AM, Leon Romanovsky wrote:
In any case I take your point. I will now add to my task list
a review of these spots. I'd like to be sure an error message
*is* reported at an appropriate level up the chain of callers so
I can always identify the culprit in the a WARN_ON() fires (even
though it should never
happen). And in each case I'll evaluate
whether returning is better than not.
You can, but users don't :). So if it is valid but error flow, that
needs user awareness, simply print something to the dmesg with *_err()
prints.

For some reason you seem to care about users.

I guess the WARN stack trace tells me where it comes from.
This would be an invalid error flow, and should never happen.

I'll still plan to review each of these again.

BTW, I'm trying to untangle some of the flows in net/core/devlink.c
and such if(WARN()) pattern is even harmful, because it is very hard to
understand when that error is rare/non-exist/real.

That's what assert() is for, but we've already had that
discussion :)

-Alex