Re: [PATCH 2/3] cleanup: Introduce cond_no_free_ptr()

From: Linus Torvalds
Date: Tue Feb 27 2024 - 15:41:17 EST


On Tue, 27 Feb 2024 at 08:49, Dan Williams <dan.j.williams@xxxxxxxxx> wrote:
>
> 5/ cond_no_free_ptr(rc == 0, return rc, res, name);

Ugh. Honestly, this is all too ugly for words.

The whole - and only - point for the cond_guard() is to make mistakes
less likely.

This is not it. This makes mistakes unreadable and undebuggable.

Linus