linux-next: build failure after merge of the battery tree

From: Stephen Rothwell
Date: Sun Aug 20 2023 - 22:57:52 EST


Hi all,

After merging the battery tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/power/supply/rt5033_charger.c: In function 'rt5033_charger_probe':
drivers/power/supply/rt5033_charger.c:694:19: error: implicit declaration of function 'of_parse_phandle' [-Werror=implicit-function-declaration]
694 | np_conn = of_parse_phandle(pdev->dev.of_node, "richtek,usb-connector", 0);
| ^~~~~~~~~~~~~~~~
drivers/power/supply/rt5033_charger.c:694:17: error: assignment to 'struct device_node *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
694 | np_conn = of_parse_phandle(pdev->dev.of_node, "richtek,usb-connector", 0);
| ^
drivers/power/supply/rt5033_charger.c:695:19: error: implicit declaration of function 'of_get_parent'; did you mean 'kernfs_get_parent'? [-Werror=implicit-function-declaration]
695 | np_edev = of_get_parent(np_conn);
| ^~~~~~~~~~~~~
| kernfs_get_parent
drivers/power/supply/rt5033_charger.c:695:17: error: assignment to 'struct device_node *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
695 | np_edev = of_get_parent(np_conn);
| ^

Caused by commit

2ce8284c3115 ("power: Explicitly include correct DT includes")

interacting with commit

12cc585f36b8 ("power: supply: rt5033_charger: Add cable detection and USB OTG supply")

from the mfd tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Mon, 21 Aug 2023 12:50:12 +1000
Subject: [PATCH] fixup for "power: Explicitly include correct DT includes"

interacting with commit

12cc585f36b8 ("power: supply: rt5033_charger: Add cable detection and USB OTG supply")

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
drivers/power/supply/rt5033_charger.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/power/supply/rt5033_charger.c b/drivers/power/supply/rt5033_charger.c
index 4d1198d752b7..4ea769775fa5 100644
--- a/drivers/power/supply/rt5033_charger.c
+++ b/drivers/power/supply/rt5033_charger.c
@@ -11,6 +11,7 @@
#include <linux/extcon.h>
#include <linux/module.h>
#include <linux/mutex.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/regmap.h>
--
2.40.1

--
Cheers,
Stephen Rothwell

Attachment: pgpaohrYOAKSr.pgp
Description: OpenPGP digital signature