[PATCH net-next 2/2] net: ti: icssg-prueth: Add ethtool RX flow classification support

Marco Crivellari marco.crivellari at suse.com
Wed Nov 25 05:14:41 PST 2026


On Wed, Nov 25, 2026 at 12:36 PM Simon Horman <horms at kernel.org> wrote:
> [...]
> Thanks Marco,
>
> That may be good general advice.
> But for networking code the explicit approach taken by this patch
> is still preferred.
>
>   Using device-managed and cleanup.h constructs
>
>   Netdev remains skeptical about promises of all “auto-cleanup” APIs,
>   including even devm_ helpers, historically. They are not the preferred
>   style of implementation, merely an acceptable one.
>
>   Use of guard() is discouraged within any function longer than 20 lines,
>   scoped_guard() is considered more readable. Using normal lock/unlock is
>   still (weakly) preferred.
>
>   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.
>
>   Link: https://docs.kernel.org/process/maintainer-netdev.html#using-device-managed-and-cleanup-h-constructs

Ah, thanks for making me note that!

-- 

Marco Crivellari

SUSE Labs



More information about the linux-arm-kernel mailing list