Re: [PATCH RESEND] nfc: hci: Save a few bytes of memory when registering a 'nfc_llc' engine

From: Jakub Kicinski
Date: Fri Feb 02 2024 - 14:33:27 EST


On Fri, 2 Feb 2024 20:11:56 +0100 Christophe JAILLET wrote:
> It would be slower, but it would reduce code duplication as well.
> This is just an _exit() function, so it shouldn't be called that often
> anyway, if called at all.
>
> Or, add another function with the list_del()+kfree_const()+kfree(), that
> would be called from nfc_llc_exit() and nfc_llc_unregister(), to have
> the best of the 2 worlds?

My vote is the latter - factor out the 3 calls into a new helper, call
it where appropriate.