Subject: Re: [RFC PATCH 1/2] net: netlink: add nla_get_*_default() accessors

From: Toke Høiland-Jørgensen <[email-masked]>
Date: Thu, 24 Oct 2024 14:51:07 +0200

Johannes Berg <[email-masked]> writes:

> From: Johannes Berg <[email-masked]>
>
> There are quite a number of places that use patterns
> such as
>
>   if (attr)
>      val = nla_get_u16(attr);
>   else
>      val = DEFAULT;
>
> Add nla_get_u16_default() and friends like that to
> not have to type this out all the time.
>
> Signed-off-by: Johannes Berg <[email-masked]>

I think this is an excellent idea! So typos/copy-paste errors aside:

Acked-by: Toke Høiland-Jørgensen <[email-masked]>