[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZcpMLXTfc95fGTae@smile.fi.intel.com>
Date: Mon, 12 Feb 2024 18:49:49 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Robin van der Gracht <robin@...tonic.nl>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Miguel Ojeda <ojeda@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Paul Burton <paulburton@...nel.org>,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: [PATCH v1 10/15] auxdisplay: linedisp: Provide a small buffer in
the struct linedisp
On Mon, Feb 12, 2024 at 01:50:13PM +0200, Andy Shevchenko wrote:
> On Mon, Feb 12, 2024 at 09:25:00AM +0100, Robin van der Gracht wrote:
> > On Thu, 8 Feb 2024 20:48:08 +0200
> > Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
>
> > > + linedisp->num_chars = buf ? num_chars : min(num_chars, LINEDISP_DEFAULT_BUF_SZ);
> >
> > It's not a big buffer, but now it's always there even if it's not used.
> > And even if it's used, it might be only partially used.
> > Why not used a malloc instead?
>
> malloc() infra takes more than this IIRC (something like up to 32 bytes on
> 64-bit platforms) or comparable sizes. Yes, the malloc() along with the
> linedisp structure might make sense, but will require more invasive change.
>
> Do you want me to drop this one from the set?
> (I have no hard feelings about it, as I see better way and just having no
> time for taking care about, as it's not the main point of the series.)
Looking again into it, the allocation separately with linedisp structure
is indeed too much invasive. I prefer (as we save lines of code and deduplicate
the buffer at least for two drivers, including a new one) to leave this patch
for now. We may rework it later on. Do you agree?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists