Re: [PATCH v2 2/4] tty: amiserial: replace get_zeroed_page() with kzalloc()

From: Geert Uytterhoeven

Date: Thu Jul 09 2026 - 04:12:31 EST


On Thu, 9 Jul 2026 at 10:05, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> On Thu, 9 Jul 2026 at 10:03, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> > On Sun, 31 May 2026 at 09:04, Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx> wrote:
> > > rs_startup() allocates a transmit ring buffer that is used to buffer reads
> > > and writes from/to serial data register.
> > >
> > > This buffer can be allocated with kmalloc() as there's nothing special
> > > about it to go directly to the page allocator.
> > >
> > > kmalloc() provides a better API that does not require ugly casts and
> > > kfree() does not need to know the size of the freed object.
> > >
> > > Replace use of get_zeroed_page() with kzalloc() and free_page() with
> > > kfree().
> > >
> > > Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@xxxxxxxxxx
> > > Signed-off-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> >
> > Thanks for your patch, which is now commit d26ed502d0c7c05c ("tty:
> > amiserial: replace get_zeroed_page() with kzalloc()") in tty/tty-next
>
> Sorry, I replied to the work version: the applied patch is not this
> v2, or the even newer v3, but v1?

s/work/wrong/, where is my morning coffee?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds