Re: [PATCH net-next v1 1/1] tg3: Increase buffer size for IRQ label

From: Andy Shevchenko
Date: Wed Oct 16 2024 - 04:56:09 EST


On Tue, Oct 15, 2024 at 08:16:21AM -0700, Jakub Kicinski wrote:
> On Mon, 14 Oct 2024 13:38:10 +0300 Andy Shevchenko wrote:
> > While at it, move the respective buffer out from the structure as
> > it's used only in one caller. This also improves memory footprint
> > of struct tg3_napi.
>
> It's passed to request_irq(), I thought request_irq() dups the string
> but I can't see it now. So please include in the commit message a
> reference to the function where the strdup (or such) of name happens
> in the request_irq() internals.

Hmm... you are right, the name should be kept as long as device instance alive
(more precisely till calling free_irq() for the IRQ handler in question).

I will redo this part (currently I'm choosing between leaving the name in the
structure or using devm_kasprintf()for it, I'll check which one looks better
at the end).

--
With Best Regards,
Andy Shevchenko