From nobody Fri Jun 19 09:04:58 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9165D37E2F2 for ; Fri, 24 Apr 2026 10:36:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777026977; cv=none; b=jXgBFko12geiGX1Exi9fZK6c4c9Qg7VMil9lQfbDFoIAxn3i/HO9M60KctnIOF8ILpDL53f3b78RBzQzMt8EP0vXDL6sP4pw0aN3fk4U1P+QqUtBuiD8DeWYaU+z9eg7jtmtUfzoFF5Y+cGX1WzpgR+xOgvMxcrZ9FSytk+itFY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777026977; c=relaxed/simple; bh=OpjYnvUINC0m/fERNUlL4a3+lpA8IFC0Re5p9y/suRY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nTX8zFVYzwMpd8Y61v9YSvm8929j7QXDghvyPZazyEuvblORR1/6KdPcVj86vXqqlU9m61kVSO+LSVTWByMZuuXP84KXiOBDUj3G/X59wixHOOEmUVGfMTOp7RgcLiut+DeVgig7pzSSFZv1Ck2AAC1c89V6iw0ajX9cINZuyzk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sL16H7ey; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sL16H7ey" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59B25C4AF09; Fri, 24 Apr 2026 10:36:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777026977; bh=OpjYnvUINC0m/fERNUlL4a3+lpA8IFC0Re5p9y/suRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sL16H7ey7V/GQEHl49RxmPmxt0qMuYIyx0svxOyJm+9h1kOYKKLw9BM5O/tJcdefi TywbChtKKDhRwkerWWpcn4wDAoi283d5Vbu5HLmkM+GOLJpVBih2esZPHSK/48tx5C CGAO4rl9o3e5dV9+QbsLQA2tGNFzPydSEK+9OBhFMXrl6VPZjUeawlsAPaOv/SJZ/E 8Lrw85IlKNzhwxRAByN9iZPVt349gQ3RROklPaMr1HtwhXzqWVWOWzc2pqZI55PuXh 3l8o/F/VS4cOddU52Qeo3PFccE23xjwXqGEwhXbhgeKSBtTZHqZhFH+4VbIaR+kJVW 98jdb1H3VGMuw== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1wGDtP-0000000AyiZ-0pJG; Fri, 24 Apr 2026 12:36:15 +0200 From: Johan Hovold To: Geoff Levand , Madhavan Srinivasan , Michael Ellerman Cc: Nicholas Piggin , Christophe Leroy , Greg Kroah-Hartman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 1/3] powerpc/ps3: switch to dynamic system bus root device Date: Fri, 24 Apr 2026 12:36:02 +0200 Message-ID: <20260424103604.2616657-2-johan@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260424103604.2616657-1-johan@kernel.org> References: <20260424103604.2616657-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Driver core expects devices to be dynamically allocated and will, for example, complain loudly if a device that lacks a release function is ever freed. Use root_device_register() to allocate and register the root device instead of open coding using a static device. Signed-off-by: Johan Hovold --- arch/powerpc/platforms/ps3/system-bus.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platfor= ms/ps3/system-bus.c index 0537a678a32f..4ead6ccea259 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c @@ -20,9 +20,7 @@ =20 #include "platform.h" =20 -static struct device ps3_system_bus =3D { - .init_name =3D "ps3_system", -}; +static struct device *ps3_system_bus; =20 /* FIXME: need device usage counters! */ static struct { @@ -486,8 +484,8 @@ static int __init ps3_system_bus_init(void) =20 mutex_init(&usage_hack.mutex); =20 - result =3D device_register(&ps3_system_bus); - BUG_ON(result); + ps3_system_bus =3D root_device_register("ps3_system"); + BUG_ON(IS_ERR(ps3_system_bus)); =20 result =3D bus_register(&ps3_system_bus_type); BUG_ON(result); @@ -744,7 +742,7 @@ int ps3_system_bus_device_register(struct ps3_system_bu= s_device *dev) static unsigned int dev_lpm_count; =20 if (!dev->core.parent) - dev->core.parent =3D &ps3_system_bus; + dev->core.parent =3D ps3_system_bus; dev->core.bus =3D &ps3_system_bus_type; dev->core.release =3D ps3_system_bus_release_device; =20 --=20 2.53.0 From nobody Fri Jun 19 09:04:58 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A325B37FF7A for ; Fri, 24 Apr 2026 10:36:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777026977; cv=none; b=PUpSs06s1fzmXdQmRkeoC1qzIRRAjYI1zXQLwr0eGsdv3jvLMsPhKanDYZx2Y00eIMNVdtZaIImfOfCFyyLnMTCltl0ExBAkaAndETu5g8v/eWdtCBHGJjddq2LYJBlahxSQlJRq/1SwwiZLcGdMbJ3XSl0dqm21dZUdIXSUgHY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777026977; c=relaxed/simple; bh=ZwE069RHo6hyU8LL6FzDYw0Wg1+bXUJujekvNAdWEys=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u5jFUf7e3ZXrNI9m7d6aIbYIvj0cfmK9JVVZVz5JzMK1fV8HQwFzeAmB8gA8TbH5pm+Q3Og02atsAgQN1segzPfeETO297VfwnL0CFWggqHzz05d/JxMo75Aq6F8ds6fGBNaT3WHDDJRxVPJYthOlRlbNPVjfFCA+DTcbi5fYn0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SPR35I1X; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SPR35I1X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59653C2BCB5; Fri, 24 Apr 2026 10:36:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777026977; bh=ZwE069RHo6hyU8LL6FzDYw0Wg1+bXUJujekvNAdWEys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SPR35I1XRiFR74YKSQrmPc+aOFKBUE9q3V7EgK8pKe4GjghnPqPWyQvysQg8hz7/N fpIU6UD7f4UQrANglzvxWiNlXVxuIHC57QnJPPOLhFooUVNm/LV3D1CfG4QvHFAWNG mAs1SWtzElv1BTIurhdgFod9UlXLchTVVARpqP38oJ1WR8HNh4oF5KXL3ITouA5gs4 NzHvYl6LcBncryWJ3bRsPbDzzrOW6LDEgr7Qh90vmEqJLAklHPWLYnFzgQ1auQDO00 xUiPZNbIFXkLa5yKImyi33bkcGDxXtY3xEY3dP/x5N0EfRw04S2RYd8slsCIEe2EOY 5CIu3OGt452kw== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1wGDtP-0000000Ayib-0rYe; Fri, 24 Apr 2026 12:36:15 +0200 From: Johan Hovold To: Geoff Levand , Madhavan Srinivasan , Michael Ellerman Cc: Nicholas Piggin , Christophe Leroy , Greg Kroah-Hartman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 2/3] powerpc/pseries: switch to dynamic ibmebus root device Date: Fri, 24 Apr 2026 12:36:03 +0200 Message-ID: <20260424103604.2616657-3-johan@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260424103604.2616657-1-johan@kernel.org> References: <20260424103604.2616657-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Driver core expects devices to be dynamically allocated and will, for example, complain loudly if a device that lacks a release function is ever freed. Use root_device_register() to allocate and register the root device instead of open coding using a static device. Signed-off-by: Johan Hovold --- arch/powerpc/platforms/pseries/ibmebus.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/platforms/pseries/ibmebus.c b/arch/powerpc/platfo= rms/pseries/ibmebus.c index cad2deb7e70d..e3b41e2d844f 100644 --- a/arch/powerpc/platforms/pseries/ibmebus.c +++ b/arch/powerpc/platforms/pseries/ibmebus.c @@ -51,9 +51,7 @@ #include #include =20 -static struct device ibmebus_bus_device =3D { /* fake "parent" device */ - .init_name =3D "ibmebus", -}; +static struct device *ibmebus_bus_device; /* fake "parent" device */ =20 const struct bus_type ibmebus_bus_type; =20 @@ -171,7 +169,7 @@ static int ibmebus_create_device(struct device_node *dn) struct platform_device *dev; int ret; =20 - dev =3D of_device_alloc(dn, NULL, &ibmebus_bus_device); + dev =3D of_device_alloc(dn, NULL, ibmebus_bus_device); if (!dev) return -ENOMEM; =20 @@ -458,11 +456,11 @@ static int __init ibmebus_bus_init(void) return err; } =20 - err =3D device_register(&ibmebus_bus_device); - if (err) { - printk(KERN_WARNING "%s: device_register returned %i\n", + ibmebus_bus_device =3D root_device_register("ibmebus"); + if (IS_ERR(ibmebus_bus_device)) { + err =3D PTR_ERR(ibmebus_bus_device); + printk(KERN_WARNING "%s: root_device_register returned %i\n", __func__, err); - put_device(&ibmebus_bus_device); bus_unregister(&ibmebus_bus_type); =20 return err; @@ -470,7 +468,7 @@ static int __init ibmebus_bus_init(void) =20 err =3D ibmebus_create_devices(ibmebus_matches); if (err) { - device_unregister(&ibmebus_bus_device); + root_device_unregister(ibmebus_bus_device); bus_unregister(&ibmebus_bus_type); return err; } --=20 2.53.0 From nobody Fri Jun 19 09:04:58 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 900B7366046 for ; Fri, 24 Apr 2026 10:36:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777026977; cv=none; b=KMn5rdzA5YVuSgDx+9fvi4F1EBfaBYUu4WcKK4lc787yueiw1C52CeUp2mLSDCslXm2flATkiwKZNFzxBt8uKC6ar0Nej+5FynW6qK5aJCNSMoYCV2Aqbfs3aPpVzTBJRF2VvoYZ+usq72pbWB6lWPC+01Yxrwmc94/qKaY28lk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777026977; c=relaxed/simple; bh=r7t9IjXKXmo4brGWblnNZdlBkkZXdXtKpLhAebYCUJw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QbEw0o1W8F33PfZlwyk0oGVwzzmLv7Ta4p9B5/nJglmZIpeUJZIkPooo6/797H7hWyGfdzCdGFzlkV+9BvO7fbG7WfB4oHeS4CBuYlK183NKp9+UfDzLEJtemZ1eS3XMrJqje5AyQMIaxGU7LSrWJjl6BSn/o1ZSZHGipB16VgU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uhuDpIl9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uhuDpIl9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64713C19425; Fri, 24 Apr 2026 10:36:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777026977; bh=r7t9IjXKXmo4brGWblnNZdlBkkZXdXtKpLhAebYCUJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uhuDpIl9/P8W25DmD4zGUUPjIEs4PGArX3GqU0qqG/dKcu1QBbVK620WbzuOcV0Fh mCArJVLlL4ksuM5CeqEkwLLc7LzEzeiUr6wJ0hh4guRWrl/ZcXYjoG17Lr2PVF5Gkq QyO4uEkytfkD3h1cIWYoRU/A0oA7krXkrDvNZDl4d9bh3YFHjuGFtWSmKCWRQySn3y UKQrbZs+yEKodPgcs+/hP0NRQe04fiq0qs9PeLsgPBTN0WDht3cN1HLygdra6eo4Lu NaZoehxIPU2hdr59PKcHb4x1ZIGnDetoOQBWfqO42Cu0Wo+LjZiRHqd85kApa1zRGv ZwC10VgN//vjg== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1wGDtP-0000000Ayid-0ttq; Fri, 24 Apr 2026 12:36:15 +0200 From: Johan Hovold To: Geoff Levand , Madhavan Srinivasan , Michael Ellerman Cc: Nicholas Piggin , Christophe Leroy , Greg Kroah-Hartman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 3/3] powerpc/pseries: clean up ibmebus printks Date: Fri, 24 Apr 2026 12:36:04 +0200 Message-ID: <20260424103604.2616657-4-johan@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260424103604.2616657-1-johan@kernel.org> References: <20260424103604.2616657-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Clean up the imbebus printks by switching to pr_warn() and pr_err(), adding a missing newline and making the error messages a bit more uniform. Signed-off-by: Johan Hovold --- arch/powerpc/platforms/pseries/ibmebus.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/platforms/pseries/ibmebus.c b/arch/powerpc/platfo= rms/pseries/ibmebus.c index e3b41e2d844f..8797b2137d9c 100644 --- a/arch/powerpc/platforms/pseries/ibmebus.c +++ b/arch/powerpc/platforms/pseries/ibmebus.c @@ -203,8 +203,7 @@ static int ibmebus_create_devices(const struct of_devic= e_id *matches) =20 ret =3D ibmebus_create_device(child); if (ret) { - printk(KERN_ERR "%s: failed to create device (%i)", - __func__, ret); + pr_err("%s: failed to create device: %d\n", __func__, ret); of_node_put(child); break; } @@ -282,8 +281,7 @@ static ssize_t probe_store(const struct bus_type *bus, = const char *buf, size_t c ibmebus_match_path); if (dev) { put_device(dev); - printk(KERN_WARNING "%s: %s has already been probed\n", - __func__, path); + pr_warn("%s: %s has already been probed\n", __func__, path); rc =3D -EEXIST; goto out; } @@ -292,8 +290,7 @@ static ssize_t probe_store(const struct bus_type *bus, = const char *buf, size_t c rc =3D ibmebus_create_device(dn); of_node_put(dn); } else { - printk(KERN_WARNING "%s: no such device node: %s\n", - __func__, path); + pr_warn("%s: no such device node: %s\n", __func__, path); rc =3D -ENODEV; } =20 @@ -322,8 +319,7 @@ static ssize_t remove_store(const struct bus_type *bus,= const char *buf, size_t kfree(path); return count; } else { - printk(KERN_WARNING "%s: %s not on the bus\n", - __func__, path); + pr_warn("%s: %s not on the bus\n", __func__, path); =20 kfree(path); return -ENODEV; @@ -447,20 +443,18 @@ static int __init ibmebus_bus_init(void) { int err; =20 - printk(KERN_INFO "IBM eBus Device Driver\n"); + pr_info("IBM eBus Device Driver\n"); =20 err =3D bus_register(&ibmebus_bus_type); if (err) { - printk(KERN_ERR "%s: failed to register IBM eBus.\n", - __func__); + pr_err("%s: failed to register IBM eBus\n", __func__); return err; } =20 ibmebus_bus_device =3D root_device_register("ibmebus"); if (IS_ERR(ibmebus_bus_device)) { err =3D PTR_ERR(ibmebus_bus_device); - printk(KERN_WARNING "%s: root_device_register returned %i\n", - __func__, err); + pr_err("%s: failed to register root device: %d\n", __func__, err); bus_unregister(&ibmebus_bus_type); =20 return err; --=20 2.53.0