From nobody Mon Jun 8 08:28:38 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 BCD01349CEC; Sun, 31 May 2026 07:02:56 +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=1780210977; cv=none; b=NHRyQjH1/ZIYcfGaWiA/KJ/TiwILwBEMB27+ysjZRkiHiee03q/lE9DRPcgpyDj4Greiv/7rnXw+doQ2Qwww57ESXAhk8/9hcRUdHTyqM/7ad8An1boUeamW+uVl5LpUaSZEQOXQmhNstPCcccxNYxFcqSE/ESjgERdlPNMfoGM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780210977; c=relaxed/simple; bh=4MiRBebRs6Y5SmkFfaTp7Vg3w4xfpgK7oDddsGc5fbw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=B0LYjUZjJFNWPdptrHEDCaY4QXKVgk3qmChCb6PUbAViEDLRAghnkNfJbHAkI/EaGws0GmswGfF+7GYCm+4fcRk6/4gEwARnKLtTPO6tT3dtpe6uJJ2c2DjOVyiU1x7tC0KIyECZdtz7/8aXHQ7br5XLC+l/Q8huGUcBWuuXiDk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OZ1T1otn; 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="OZ1T1otn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E65AE1F00898; Sun, 31 May 2026 07:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780210976; bh=ta/0oVbpc6sVePm8yz332xjK9IjSZai84OyhZWx2wvY=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=OZ1T1otnLRkDs0ffpBAEw9b3XUpvTWWqBD2U38Zz4oj0D6Z2ETTgN2WT1qH705yAx B2wDGw90G5SsSh0dhUMoRty+4X67W6LncfovfyrLspv73cXJK4fYOzNpHig+1Ky/TV 0hfI+KxxFpf1v/vFljDN3c39yVsxtVee4zqoXewkKza589kJ8PztAiiKRedMOwstfJ 3IHTGJaqDjmI5EmDMpV9GBEhYy1/bika6roBH8yHZVhpj8t8l9om31jevfr0/DOHl2 gseA8oBCg5kkAl4e4q6IfLGdjYWotKZm73AArsCqJJPxtYfz8+AmceR9uXy5SksufL GcziG3wM0jWRw== From: "Mike Rapoport (Microsoft)" Date: Sun, 31 May 2026 10:02:47 +0300 Subject: [PATCH v2 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: <20260531-b4-tty-v2-1-f7149947d4ef@kernel.org> References: <20260531-b4-tty-v2-0-f7149947d4ef@kernel.org> In-Reply-To: <20260531-b4-tty-v2-0-f7149947d4ef@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 08:28:38 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 C469532B122; Sun, 31 May 2026 07:02:58 +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=1780210979; cv=none; b=FGpS+ODxcIO8SGqdkC2xz/NnLUKeSuY4YHS+KS9b9FxAwph6rgllvwYbo4UNlgj1IJ0LikovvnxlVWOiHW+61YAEEv/oX5eXPuJnc6crRPCSKOgHH17qoSMImIIK4cPr/lwKy3yVCWyMxenakDmaG44SLrgO7uUDzyAreTqpyQM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780210979; c=relaxed/simple; bh=VkqNABs6v1gE1CvlOs6Gfpl7VQbNNE60l61tqvcu6kw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=S0RqceVEShhbPyKReS7OW7a+bJF0akYt8zVKRX+2Pfia72rU3vs07Z3CvEK28EzW/AcXnb1gtIiquoMSwiql0q2Xbs1JtOvHshKM7kja3n71+CI92XHNR0zeEsSRX6Rnr8mDqW6xTtr+FJ1b5Ctpk/9KHWYSpzjB8VC1fnUZYyI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XJHQgCOk; 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="XJHQgCOk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E619C1F00893; Sun, 31 May 2026 07:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780210978; bh=Hba6xOKzIlLJw5sTi2ZReL79jUmA452phwmu2dxW8ao=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=XJHQgCOkc2ffB5Mm3D/Emh3q/0YrgxHxa/6NKeKvV3LlKHxB15du9+mG80y69j6Ie 2mGwmtRp7GEXHSwMsjCX0Mr58rNLbjH/9f5ALcz+O0MAH8ZlFfrwnkkOCVnhp2MqQE E5GTfhwaggrQygApbI2xuXFtxeKQeG0y+2lZSUVZsVPNGhhZ/1dOCAZc14IAvDoXXs UqDHyA4/nqjb3dLxqquM/+PEbehMuwQtCYl4vH5insW3WxwxVk/IOjGctF0PQO8Oig gMm+t418m9nOHIX+b2TXBX+sq2KgOiRur4HxHomiEstv6DHcnN+Nyughee2W4q0bU+ ltDJcwrEEcb5g== From: "Mike Rapoport (Microsoft)" Date: Sun, 31 May 2026 10:02:48 +0300 Subject: [PATCH v2 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: <20260531-b4-tty-v2-2-f7149947d4ef@kernel.org> References: <20260531-b4-tty-v2-0-f7149947d4ef@kernel.org> In-Reply-To: <20260531-b4-tty-v2-0-f7149947d4ef@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 08:28:38 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 B327F3446C7; Sun, 31 May 2026 07:03:00 +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=1780210981; cv=none; b=BZzvZC811w0ZUmPFz8Ev4Wr5ScwMi3hEm13L3Dhhum/+2iOF3G0cz8K/I35pcC+XxwxhaB0ELyhm3o9mQ6LAHfsYPkTPbnc4grV0Kv7lgi7w9pK2Y/c7Zl/SAjcZezNOPgV/A4CAGVXMXgbncSMxb9rYv8R4GQoj555o/p445FE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780210981; c=relaxed/simple; bh=5jlG1ZBa8egfg82qCqwH7qx85kPlT7tbf37Jay+e2W4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kqXl+vpzjW8cumQJgcRpgNHXiQ2OWdso9z2+i/3SEC7aT4bHpKcLZwLsXcs3BVKj4tNemkWzpQ9XQ/rc6cSqqsKzTqCsEwjMifNfAs55Q9PC2LTPTZqcd2TJWc6Sc88VewmbxqbwrTMdrSeb/pCdqAkx//C+sdDTbh8Up9SxIoI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KRX7w2WF; 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="KRX7w2WF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E59181F00898; Sun, 31 May 2026 07:02:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780210980; bh=YfIYXFpeOLT8zVHUHzuYoeYdkWWHFupYpwpzBCCce9Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=KRX7w2WFYviJBkkt8f7QmwdrnwqRcFeA2dtyjFi7ddPKVWmw5U7+XWKIbBHv+Tdlu sD18MWXVqLVjB5/yVC63MoxCGoJLNnK6HL+CPkHGqRnPIxnemNxvUvQc/3neqINWX7 TlZQ1DBU9Jcl+u0N+Io58Wrs9Z1R1uhhJTEDSfomNtETyR/CwyXC6ARxQlCuB0/9ZP 26JT09xFNOJ5Z1DFg/Cr9GiAq/OjhNkhlDNp5wf3d/t5LdQ4KPmkFlVgcxc9l+0Fj3 F9lK89f17GFToCGX16ro0It07MJdu3BiPalcxzwyOVuE2wPhyFDGLYndC8Nzd2hEXj 5xvYdZubgeg8Q== From: "Mike Rapoport (Microsoft)" Date: Sun, 31 May 2026 10:02:49 +0300 Subject: [PATCH v2 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: <20260531-b4-tty-v2-3-f7149947d4ef@kernel.org> References: <20260531-b4-tty-v2-0-f7149947d4ef@kernel.org> In-Reply-To: <20260531-b4-tty-v2-0-f7149947d4ef@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..9138fa29d301 100644 --- a/drivers/tty/serial/men_z135_uart.c +++ b/drivers/tty/serial/men_z135_uart.c @@ -16,6 +16,7 @@ #include #include #include +#include =20 #define MEN_Z135_MAX_PORTS 12 #define MEN_Z135_BASECLK 29491200 @@ -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 08:28:38 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 C82A9344D92; Sun, 31 May 2026 07:03:02 +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=1780210983; cv=none; b=eD4v03PNclwgkcA+2ofr03OSDCBK2CMqnT/0XGXJi3ysRd9QPCxQEIO37xJqdSvig6ge3pHflLu2+47184Dk9Z5JeIH+Kdfgbc6MQPRi8VT8MxXr/wsNK/3ThuO3dvmJctaVdyKhwmg17m44Kd+w0K1X3j6sJb2HyiuFNxifSj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780210983; c=relaxed/simple; bh=d1A9mqMOwj3aEO/CdtcRJwVKHqEy4iAO8L57zNBx0j8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=a47Umu2GNVqKYvTo5OGaywsSheQw/D4eB/K5zOMqSPMWr9ZDKrMONWXjyc1U3iZw+/r6K900L9uFEBAA/vDaZ6ufCWT6YGsEJ2zh6zO481wfoYRnU6HYsK6Ix/NmPsftVufLqBA2XxenwG4zhZX57EIiHWG5xka7A+ZUDB3is74= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EQ1d/NT0; 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="EQ1d/NT0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E47961F00893; Sun, 31 May 2026 07:03:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780210982; bh=aZgXT2ovXS3IZ2JxTPqBmcz8kuu7e/GyHmKzI+j+wn8=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=EQ1d/NT0ktwMqaIaxkjQ3YMSMwQ8G1/81ix0mzlqQKvoKr2wM21vdAXDQCSv9xYT5 YTgDSzC8vXNypKaBKCRHnofmeHsKAEygjKrnsoV7SS11gw6GL4i6Anp53r+H4gz/Wh ovxIg3AwVoGB/RjMcqZeEDJgg+cFKvgxD+oDNL7MQ7aPeklBmHqSdhfC3/fPP1T6cI X8y0sOtIAgmDjgkIIV4gJw1Dv2h/LF/egkayhlB/heyzQ+1v4hqT6qziZ6ErKQ2tQ3 dI+kNrXaCaLMdau40yq4Ubva1g3Q8HcsPYQCAv+bZzzwed3TvcGhJZ/gYqxztsIl8+ JFxp3hcNuC/0A== From: "Mike Rapoport (Microsoft)" Date: Sun, 31 May 2026 10:02:50 +0300 Subject: [PATCH v2 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: <20260531-b4-tty-v2-4-f7149947d4ef@kernel.org> References: <20260531-b4-tty-v2-0-f7149947d4ef@kernel.org> In-Reply-To: <20260531-b4-tty-v2-0-f7149947d4ef@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 Reviewed-by: Jiri Slaby Signed-off-by: Mike Rapoport (Microsoft) --- 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