Re: [PATCH v1] sfc: Convert to use ERR_CAST()

From: Alejandro Lucero Palau
Date: Mon Sep 02 2024 - 04:01:02 EST



On 8/29/24 16:09, Jakub Kicinski wrote:
On Thu, 29 Aug 2024 07:47:34 +0100 Alejandro Lucero Palau wrote:
On 8/29/24 00:01, Jakub Kicinski wrote:
On Wed, 28 Aug 2024 15:31:08 -0700 Jacob Keller wrote:
Somewhat unrelated but you could cleanup some of the confusion by using
__free(kfree) annotation from <linux/cleanup.h> to avoid needing to
manually free ctr in error paths, and just use return_ptr() return the
value at the end.
Please don't send people towards __free(). In general, but especially as
part of random cleanups.
Could you explain why or point to a discussion about it?
It was discussed multiple times on the list and various community calls,
someone was supposed to document it but didn't. So I guess I should...


I have seen your quick reaction with the cleanup.h guidance patch.

Honestly, I have never been comfortable with some of the automatic cleanup approaches ...


Thank you!