[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87cyasaz5d.ffs@tglx>
Date: Wed, 25 Jun 2025 12:33:50 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Jakub Kicinski <kuba@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Richard Cochran
<richardcochran@...il.com>, netdev@...r.kernel.org
Subject: Re: [patch 13/13] ptp: Convert ptp_open/read() to __free()
On Tue, Jun 24 2025 at 09:36, Jakub Kicinski wrote:
> On Fri, 20 Jun 2025 15:24:50 +0200 (CEST) Thomas Gleixner wrote:
>> Get rid of the kfree() and goto maze and just return error codes directly.
>
> Maybe just skip this patch? FWIW we prefer not to use __free()
> within networking code. But this is as much time as networking
> so up to you.
>
> Using device-managed and cleanup.h constructs
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> [...]
>
> Low level cleanup constructs (such as ``__free()``) can be used when building
> APIs and helpers, especially scoped iterators. However, direct use of
> ``__free()`` within networking core and drivers is discouraged.
> Similar guidance applies to declaring variables mid-function.
Interesting decision, unfortunately it lacks a rationale in that
documentation.
I reworked the patch without the __free(), which still cleans up the mix
of goto exit and return ERRCODE inconsistencies.
Let me send out V3 with that and network/ptp people can still decided to
ignore it :)
Thanks,
tglx
Powered by blists - more mailing lists