From: Geert Uytterhoeven Date: Fri, 28 Nov 2025 09:11:27 +0000 (+0100) Subject: mfd: core: Improve compile coverage of mfd_match_of_node_to_dev() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=360bc3ae0d3fdcf5b234e8141ada93ecfb8b2a51;p=thirdparty%2Flinux.git mfd: core: Improve compile coverage of mfd_match_of_node_to_dev() As of commit c7fe3bbfd622b5ee ('mfd: core: Use of_property_read_reg() to parse "reg"'), all code in mfd_match_of_node_to_dev() compiles fine when CONFIG_OF is disabled. As the sole caller of this function is protected by IS_ENABLED(CONFIG_OF), the #ifdef inside the function can be removed to increase build coverage, without impacting code size. Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/7b9a4a355c5da3fe812ead663285d05b64b84857.1764320964.git.geert+renesas@glider.be Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 7d14a1e7631e..6925bedddc80 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c @@ -100,7 +100,6 @@ static int mfd_match_of_node_to_dev(struct platform_device *pdev, struct device_node *np, const struct mfd_cell *cell) { -#if IS_ENABLED(CONFIG_OF) struct mfd_of_node_entry *of_entry; u64 of_node_addr; @@ -133,7 +132,6 @@ allocate_of_node: of_node_get(np); device_set_node(&pdev->dev, of_fwnode_handle(np)); -#endif return 0; }