From: Wentong Tian <tianwentong2000@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: erick.archer@outlook.com, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org,
Wentong Tian <tianwentong2000@gmail.com>
Subject: [PATCH] Input: serio - complete sizeof(*pointer) conversions
Date: Tue, 13 Jan 2026 00:27:09 +0800 [thread overview]
Message-ID: <20260112162709.89515-1-tianwentong2000@gmail.com> (raw)
Complete the sizeof(*pointer) conversion for arc_ps2, altera_ps2, and
olpc_apsp drivers. This follows the cleanup initiated in commit
06b449d7f7c3 ("Input: serio - use sizeof(*pointer) instead of sizeof(type)).
Signed-off-by: Wentong Tian <tianwentong2000@gmail.com>
---
drivers/input/serio/altera_ps2.c | 2 +-
drivers/input/serio/arc_ps2.c | 3 +--
drivers/input/serio/olpc_apsp.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c
index aa445b1941e9..761aaaa3e571 100644
--- a/drivers/input/serio/altera_ps2.c
+++ b/drivers/input/serio/altera_ps2.c
@@ -81,7 +81,7 @@ static int altera_ps2_probe(struct platform_device *pdev)
struct serio *serio;
int error, irq;
- ps2if = devm_kzalloc(&pdev->dev, sizeof(struct ps2if), GFP_KERNEL);
+ ps2if = devm_kzalloc(&pdev->dev, sizeof(*ps2if), GFP_KERNEL);
if (!ps2if)
return -ENOMEM;
diff --git a/drivers/input/serio/arc_ps2.c b/drivers/input/serio/arc_ps2.c
index e991c72296c9..29095d8804d2 100644
--- a/drivers/input/serio/arc_ps2.c
+++ b/drivers/input/serio/arc_ps2.c
@@ -189,8 +189,7 @@ static int arc_ps2_probe(struct platform_device *pdev)
if (irq < 0)
return -EINVAL;
- arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data),
- GFP_KERNEL);
+ arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(*arc_ps2), GFP_KERNEL);
if (!arc_ps2) {
dev_err(&pdev->dev, "out of memory\n");
return -ENOMEM;
diff --git a/drivers/input/serio/olpc_apsp.c b/drivers/input/serio/olpc_apsp.c
index a24324830021..c07fb8a1799d 100644
--- a/drivers/input/serio/olpc_apsp.c
+++ b/drivers/input/serio/olpc_apsp.c
@@ -171,7 +171,7 @@ static int olpc_apsp_probe(struct platform_device *pdev)
struct olpc_apsp *priv;
int error;
- priv = devm_kzalloc(&pdev->dev, sizeof(struct olpc_apsp), GFP_KERNEL);
+ priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
--
2.34.1
next reply other threads:[~2026-01-12 16:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 16:27 Wentong Tian [this message]
2026-01-20 20:49 ` [PATCH] Input: serio - complete sizeof(*pointer) conversions Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260112162709.89515-1-tianwentong2000@gmail.com \
--to=tianwentong2000@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=erick.archer@outlook.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox