]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: pcs: drop unneeded pointer cast 24310/head
authorJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 20 Jul 2026 06:52:05 +0000 (06:52 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 20 Jul 2026 13:45:54 +0000 (15:45 +0200)
The return value of device_get_match_data was still explicitly casted to
the driver-internal type. However, since this function returns 'const
void *' and in C void pointers are automatically casted, this isn't
needed. Thus, drop it.

Link: https://github.com/openwrt/openwrt/pull/24310
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c

index 5b3643364ba5bf05d8466e34f76ff7a8c7026e42..538829bace57a98bde57b34a9d50a5d1b4713fbf 100644 (file)
@@ -4119,7 +4119,7 @@ static int rtpcs_probe(struct platform_device *pdev)
        mutex_init(&ctrl->lock);
 
        ctrl->dev = dev;
-       ctrl->cfg = (const struct rtpcs_config *)device_get_match_data(ctrl->dev);
+       ctrl->cfg = device_get_match_data(ctrl->dev);
        ctrl->map = syscon_node_to_regmap(np->parent);
        if (IS_ERR(ctrl->map))
                return PTR_ERR(ctrl->map);