]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Input: serio - complete sizeof(*pointer) conversions
authorWentong Tian <tianwentong2000@gmail.com>
Mon, 12 Jan 2026 16:27:09 +0000 (00:27 +0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 20 Jan 2026 20:47:52 +0000 (12:47 -0800)
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>
Link: https://patch.msgid.link/20260112162709.89515-1-tianwentong2000@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/serio/altera_ps2.c
drivers/input/serio/arc_ps2.c
drivers/input/serio/olpc_apsp.c

index aa445b1941e9346c169bbd57ddd1c2eb87b05ef8..761aaaa3e571427ae764292faf355afae38a1fba 100644 (file)
@@ -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;
 
index e991c72296c93f2f6608018f90e3e2b68e06ce0b..29095d8804d29f5afdb951b26afffd31820603e1 100644 (file)
@@ -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;
index a24324830021624770d665d7e389f2e014d311a1..c07fb8a1799d18d967ca8eb868493983ac8823e3 100644 (file)
@@ -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;