From nobody Mon Jun 8 15:36:49 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 176E93B583C; Thu, 28 May 2026 10:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779963871; cv=none; b=Vt0ZfFO7jbYPPZ9qrkgw7pgH1h8Gh6CVVR5UqXm01+bR7Cb4kxC59wCvVof6Qqk3GPiYG2l8q71mMq8y/R4e/hZNK1r2LEW0eQBeRjBUFmTL3DprxdZ0bOFu0O4VYd8ELOdNcS8k6o/I34i3J5vNbsXXcUu3KCTSHHCsA8ayQ28= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779963871; c=relaxed/simple; bh=4MiRBebRs6Y5SmkFfaTp7Vg3w4xfpgK7oDddsGc5fbw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ssq8y3NErUMBVtkLq2/igzk4iOW4npcsiP2vPAlP/HjGpqClPloY+IQp1pjOIOi2791zHK5g/Zzn8nPieHzuvXfv/74apxNC9BlWDGCdIv5Sj1cmaFaYwbhEnRQZr5O6YmSamt+/cI6KugasS8Yl4jxADuOlU16mS0vna4weIkY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PiIv7JJk; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PiIv7JJk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A5371F00A3A; Thu, 28 May 2026 10:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779963869; bh=ta/0oVbpc6sVePm8yz332xjK9IjSZai84OyhZWx2wvY=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=PiIv7JJkOzo4JdxeU72/oRH7u/AvKNGTepqd7rEsNwqs2sEgiVotsfsPfCSl1kp4J pFv9jfRN6QLtISOs4+3nsHUhlRZqSgFl6jhnwvYWInaEI2OHUUjPLDeIauLt31M4Jd 05p6IYgNa++TupD1Pp2NDGZsxX4eaUMJYKDcI3VJ57J+wHbMdNlQM1Rh6mbh6EovKb wMKS/gH1advcKG0SDDtytjl53TmADFG502oUgAzm288kR3wxbRutTJL/FssL6tgn+6 QXYHOvf2Si4sKSeXp59dW9EmAy8fnB+zd666bOHeIiLbxWv+mDWxmpymhQCzQBbIU7 hNUcg3QIKI+Yw== From: "Mike Rapoport (Microsoft)" Date: Thu, 28 May 2026 13:24:17 +0300 Subject: [PATCH 1/4] serial: pch: replace __get_free_page() with kmalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260528-b4-tty-v1-1-9da9f7aec5f2@kernel.org> References: <20260528-b4-tty-v1-0-9da9f7aec5f2@kernel.org> In-Reply-To: <20260528-b4-tty-v1-0-9da9f7aec5f2@kernel.org> To: Greg Kroah-Hartman , Jiri Slaby Cc: Mike Rapoport , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-serial@vger.kernel.org X-Mailer: b4 0.15.2 pch_uart_init_port() allocates a staging buffer for non-DMA receive path using __get_free_page(). 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_free_page() with kmalloc() and free_page() with kfree(). Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@redh= at.com Signed-off-by: Mike Rapoport (Microsoft) --- drivers/tty/serial/pch_uart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index 6729d8e83c3c..07d8cdb58912 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c @@ -1655,7 +1655,7 @@ static struct eg20t_port *pch_uart_init_port(struct p= ci_dev *pdev, if (priv =3D=3D NULL) goto init_port_alloc_err; =20 - rxbuf =3D (unsigned char *)__get_free_page(GFP_KERNEL); + rxbuf =3D kmalloc(PAGE_SIZE, GFP_KERNEL); if (!rxbuf) goto init_port_free_txbuf; =20 @@ -1728,7 +1728,7 @@ static struct eg20t_port *pch_uart_init_port(struct p= ci_dev *pdev, #ifdef CONFIG_SERIAL_PCH_UART_CONSOLE pch_uart_ports[board->line_no] =3D NULL; #endif - free_page((unsigned long)rxbuf); + kfree(rxbuf); init_port_free_txbuf: kfree(priv); init_port_alloc_err: @@ -1743,7 +1743,7 @@ static void pch_uart_exit_port(struct eg20t_port *pri= v) snprintf(name, sizeof(name), "uart%d_regs", priv->port.line); debugfs_lookup_and_remove(name, NULL); uart_remove_one_port(&pch_uart_driver, &priv->port); - free_page((unsigned long)priv->rxbuf.buf); + kfree(priv->rxbuf.buf); } =20 static void pch_uart_pci_remove(struct pci_dev *pdev) --=20 2.53.0 From nobody Mon Jun 8 15:36:49 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 128D23B2FEB; Thu, 28 May 2026 10:24:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779963873; cv=none; b=NUqbIjgXmVwlU9GccAQH7sSeQlU2bpdmy5CBwhk1K8s7E+pgdtiTTfeiyE9Y5+kxOb1px/7ekHRNsn2i1baVPFJVHNMlHvC3oMY2vu7mml5jn11t7oVUB7zalLHobN6bDB4mBsAl89HpJTEXnGZe7xD+yue0YPOfk0f9zSDOKeg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779963873; c=relaxed/simple; bh=VkqNABs6v1gE1CvlOs6Gfpl7VQbNNE60l61tqvcu6kw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=M3UnXAfrwBjnlZWjnfVU1FQ9xejNLHGh6Jux2KYNOLXhWTOEAR6w8MIh2JWD12jgayp9yAx5IvANu3bwVyheGTaARW9jnoBJq1S5mn4CNWnI0lRvcaUXNa03+MarJED8rc88bLV5sCVh/ERTtxyarOzyXh3DMKrtdrNPp2VwHAQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aS4ISfHm; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aS4ISfHm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46EC81F000E9; Thu, 28 May 2026 10:24:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779963871; bh=Hba6xOKzIlLJw5sTi2ZReL79jUmA452phwmu2dxW8ao=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=aS4ISfHmV41rmJIm1V2p4H0CXtXm6mS+vwe1o/vDyVvf25Lp+2s2kqqwpdfIMzvSJ 6A242Q1r1N+tNodnsBU3RuqGfe2qVG2PMMkFCSqzdE334gggluKXh0MhkqDE3xsFfD yQNc6x5lbagyoG1RPvq64x8iVEZt7baX3wtzVPHkB2rj7z+fGZKRKC5/VbOn3u3peP UZbftcffX076EExKOkRtYkiJZSbEIxEbrHNDoohGyV2honUKmfoK15EN4z76Emi/DV 6Dvw2OyUGXta8L4HXAUmDblHz5c1LZSIoFhmaGpyCobr1WwfsI8nytlM46Vxmao+kO 9rjSPjLTeKXFw== From: "Mike Rapoport (Microsoft)" Date: Thu, 28 May 2026 13:24:18 +0300 Subject: [PATCH 2/4] tty: amiserial: replace get_zeroed_page() with kzalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260528-b4-tty-v1-2-9da9f7aec5f2@kernel.org> References: <20260528-b4-tty-v1-0-9da9f7aec5f2@kernel.org> In-Reply-To: <20260528-b4-tty-v1-0-9da9f7aec5f2@kernel.org> To: Greg Kroah-Hartman , Jiri Slaby Cc: Mike Rapoport , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-serial@vger.kernel.org X-Mailer: b4 0.15.2 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@redh= at.com Signed-off-by: Mike Rapoport (Microsoft) --- drivers/tty/amiserial.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index 81eaca751541..28af0fd98181 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c @@ -443,23 +443,23 @@ static int rs_startup(struct tty_struct *tty, struct = serial_state *info) struct tty_port *port =3D &info->tport; unsigned long flags; int retval=3D0; - unsigned long page; + void *buffer; =20 - page =3D get_zeroed_page(GFP_KERNEL); - if (!page) + buffer =3D kzalloc(PAGE_SIZE, GFP_KERNEL); + if (!buffer) return -ENOMEM; =20 local_irq_save(flags); =20 if (tty_port_initialized(port)) { - free_page(page); + kfree(buffer); goto errout; } =20 if (info->xmit.buf) - free_page(page); + kfree(buffer); else - info->xmit.buf =3D (unsigned char *) page; + info->xmit.buf =3D buffer; =20 #ifdef SERIAL_DEBUG_OPEN printk("starting up ttys%d ...", info->line); @@ -537,7 +537,7 @@ static void rs_shutdown(struct tty_struct *tty, struct = serial_state *info) */ free_irq(IRQ_AMIGA_VERTB, info); =20 - free_page((unsigned long)info->xmit.buf); + kfree(info->xmit.buf); info->xmit.buf =3D NULL; =20 info->IER =3D 0; --=20 2.53.0 From nobody Mon Jun 8 15:36:49 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E26E53B895F; Thu, 28 May 2026 10:24:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779963875; cv=none; b=Xi7PPfD0sLgPJctrl96vD1q55VZRXiXzDb21W+T9HWPIxqcSZvDImU7+XmyBGwyb9OpSauUv/uKU/UQm8NWun8wdwU8SfDhNwlFovFGp1iBKAnsr4ri5nCv52cvdcjIW2E3FYLdZxB+NOtACYEi2VX/0qCBN7OBNfmTb1z7V4+I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779963875; c=relaxed/simple; bh=TD9dqz1KlLDHtnCU5rXCGzTLbngGmrWaIOq73qhB628=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hLM0fgqPB7XBj5KvMfJ9GtUg2go/gh9Qt23GFRi11BshbXxZnp7C0nIjrH+2B/FQNYMYDfzvQKHNieISivgDQsdXf+ujk1CxUOyRZizG51J8AEjxxO0e1Gp+ySS2GZ+e5Co755uvjodz0PbJVak8nF2F3gQd9gzRU8GUNtpdvbc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eceMgPWs; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eceMgPWs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 340D41F00A3C; Thu, 28 May 2026 10:24:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779963873; bh=kp8FNXKpfIDXxy/obg2faB0r2hMuUh4kHDljPd1Q9rE=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=eceMgPWsU4Oc5vFuawnPCveJrzbCB+0tKN7hwo77PWnuwIDWdwAHQW15i8rQxXFLf 0VV0hnTQx1m89G8N+mk8PGg+SZLqD2YjumWnvoOp9SONohaxubtLyK+z7lpzpQEjEu 2pFPFqB0OD/Hx5i5elYXthvWtrxrwQUwuqx2WTInASpP/f6tUIN+tKrZzJ5ZHyoATu U2dpfWJsEUof2EzHCLWebkPnvWLitxizyrxLvmdZ7Nf7dCpGhVHwzj4cTb/VWO46aq rGRLfTyHvPjT2MPn8rJdnnxKy0k4YwMDEyz7Z94/wRAuy/U9CYeNlLfs2gkjQaKoJm vVpMSdE4W92iw== From: "Mike Rapoport (Microsoft)" Date: Thu, 28 May 2026 13:24:19 +0300 Subject: [PATCH 3/4] tty: serial: men_z135_uart: replace __get_free_page() with kmalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260528-b4-tty-v1-3-9da9f7aec5f2@kernel.org> References: <20260528-b4-tty-v1-0-9da9f7aec5f2@kernel.org> In-Reply-To: <20260528-b4-tty-v1-0-9da9f7aec5f2@kernel.org> To: Greg Kroah-Hartman , Jiri Slaby Cc: Mike Rapoport , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-serial@vger.kernel.org X-Mailer: b4 0.15.2 men_z135_probe() allocates a receive staging buffer filled by the CPU via memcpy_fromio() from the device MMIO region. 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_free_page() with kmalloc() and free_page() with kfree(). Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@redh= at.com Signed-off-by: Mike Rapoport (Microsoft) --- drivers/tty/serial/men_z135_uart.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/men_z135_uart.c b/drivers/tty/serial/men_z1= 35_uart.c index 6fad57fee912..9c32b01edc9e 100644 --- a/drivers/tty/serial/men_z135_uart.c +++ b/drivers/tty/serial/men_z135_uart.c @@ -17,6 +17,7 @@ #include #include =20 +#include #define MEN_Z135_MAX_PORTS 12 #define MEN_Z135_BASECLK 29491200 #define MEN_Z135_FIFO_SIZE 1024 @@ -811,7 +812,7 @@ static int men_z135_probe(struct mcb_device *mdev, if (!uart) return -ENOMEM; =20 - uart->rxbuf =3D (unsigned char *)__get_free_page(GFP_KERNEL); + uart->rxbuf =3D kmalloc(PAGE_SIZE, GFP_KERNEL); if (!uart->rxbuf) return -ENOMEM; =20 @@ -841,7 +842,7 @@ static int men_z135_probe(struct mcb_device *mdev, return 0; =20 err: - free_page((unsigned long) uart->rxbuf); + kfree(uart->rxbuf); dev_err(dev, "Failed to add UART: %d\n", err); =20 return err; @@ -858,7 +859,7 @@ static void men_z135_remove(struct mcb_device *mdev) =20 line--; uart_remove_one_port(&men_z135_driver, &uart->port); - free_page((unsigned long) uart->rxbuf); + kfree(uart->rxbuf); } =20 static const struct mcb_device_id men_z135_ids[] =3D { --=20 2.53.0 From nobody Mon Jun 8 15:36:49 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF0E33B9DAD; Thu, 28 May 2026 10:24:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779963878; cv=none; b=DG7r3eIXN0byEoPswSLX3xa81sykO98vdMYupdhILXuz9yokPqwjEKGLdJBUyBYk+FajakDJrwwfhLeXJ8aJ0wbfE87AYsKLiVr2OonPxSoPsyDGrDpA2s7Weiz3Fl2pHgoRSIUyE8kYMsBkImUXIvmx2QU8F4lRgVrlVWz66+I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779963878; c=relaxed/simple; bh=26jMB7BQtNy710o0MhospMkViyaBA5bEsLVotCFqd2E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NPHPzHWl4h08jCJ0kIz3/zJ77a71BfD3oQyslyz40joXqE/j2o5EjHooZ436HQvoE9cJQHmQunyXEsTHeXCjYsuGcgA61vXQQJ1iwe7AEjUgtmoFOmijwnR4Qk7slW/UK8xb+1e8Vkd9Zapo8PVTQ0W3I2m46rIWj52ADxzvhng= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jDLFSNtp; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jDLFSNtp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2049C1F000E9; Thu, 28 May 2026 10:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779963875; bh=d+AhWlAChbSoPeU9eNoAX+z4q2Nry8L3D0tILMGrjBs=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=jDLFSNtpWZ4SFcdq99qvcWECTH5S6J0WzXpd+KaYIl/yvHuKNiW3aEio9nYC9+2RK 4x4JWGPm+LvHELdJtX30I/kqk2y4PeDX9Ki9+JljaVcJ39Ai6WaElHwymwfd2codid UcL04/DHTGnP5xbgzH9HquhxgUra/Fo7vAyIaS+Jy40mY6StyQDvbw0grM5SeHpSSi CvI2iQSYk66M9SxrrUrDE6dbqxjJO/n7WtGTtrp4XQK3Tw2EC86lnmILQf8b2OGU0c hXK7vagS6/sY0DL5nVWKo6dnl/u0On2wLsBckqDx194Wifl95S2QxFm24qwABEfa+l bRWrVnE2bpnxg== From: "Mike Rapoport (Microsoft)" Date: Thu, 28 May 2026 13:24:20 +0300 Subject: [PATCH 4/4] vc_screen: replace __get_free_pages() with kmalloc() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260528-b4-tty-v1-4-9da9f7aec5f2@kernel.org> References: <20260528-b4-tty-v1-0-9da9f7aec5f2@kernel.org> In-Reply-To: <20260528-b4-tty-v1-0-9da9f7aec5f2@kernel.org> To: Greg Kroah-Hartman , Jiri Slaby Cc: Mike Rapoport , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-serial@vger.kernel.org X-Mailer: b4 0.15.2 vcs_read() and vcs_write() allocate staging buffers with __get_free_pages(). These buffers can be allocated with kmalloc() as there's nothing special about them to go directly to the page allocator. kmalloc() provides a better API that does not require ugly casts and it's a modern way of saying "I need a page-sized buffer" Replace use of __get_free_page() with kmalloc() and drop unused now DEFINE_FREE(free_page_ptr ...) Link: https://lore.kernel.org/all/700c5a5f-3128-4671-99aa-827ca73f5cdf@kern= el.org Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@redh= at.com Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Jiri Slaby --- drivers/tty/vt/vc_screen.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c index 4d2d46c95fef..386c80efc672 100644 --- a/drivers/tty/vt/vc_screen.c +++ b/drivers/tty/vt/vc_screen.c @@ -53,8 +53,6 @@ #define HEADER_SIZE 4u #define CON_BUF_SIZE (IS_ENABLED(CONFIG_BASE_SMALL) ? 256 : PAGE_SIZE) =20 -DEFINE_FREE(free_page_ptr, void *, if (_T) free_page((unsigned long)_T)); - /* * Our minor space: * @@ -371,7 +369,7 @@ vcs_read(struct file *file, char __user *buf, size_t co= unt, loff_t *ppos) loff_t pos; bool viewed, attr, uni_mode; =20 - char *con_buf __free(free_page_ptr) =3D (char *)__get_free_page(GFP_KERNE= L); + char *con_buf __free(kfree) =3D kmalloc(PAGE_SIZE, GFP_KERNEL); if (!con_buf) return -ENOMEM; =20 @@ -596,7 +594,7 @@ vcs_write(struct file *file, const char __user *buf, si= ze_t count, loff_t *ppos) if (use_unicode(inode)) return -EOPNOTSUPP; =20 - char *con_buf __free(free_page_ptr) =3D (char *)__get_free_page(GFP_KERNE= L); + char *con_buf __free(kfree) =3D kmalloc(PAGE_SIZE, GFP_KERNEL); if (!con_buf) return -ENOMEM; =20 --=20 2.53.0