From nobody Sun Feb 8 09:27:34 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 B0EBC38F94B for ; Tue, 13 Jan 2026 13:09:10 +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=1768309750; cv=none; b=oWZgyDRlvJmI1ViPeuo07HBjsMZ9qLRSfTLbs5tqFamW7xTYQrXaL/ZcvSZcaRlGG/AkoFmqyhdVeJ9TM64oXgAbn1hyeQhj4IkhlG56D2GSyTmjA2AT1YdC9KgIuvOSNNVAa8KhL3yoRCYr1Ag8O1Sq0iy23Ga9GAfz5KZWHXE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768309750; c=relaxed/simple; bh=zsNJkZzzl3cA4QgLezh89MO+pPFtt5CMMO6jHKfOHLc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=Ny7W22tLTDQXowpos2O8QzulSD56NJkyGSX09Bkd6OS3P99y09wR4DMWj3E6R71dstb0yFgbdFWHVk7pAE/G2l7b/4yVOuvgl4MGwofdoHewyFx5hR/hTS6TimV9xHcgOQoAQ5jY6894FPaMt9B4pzqPqshszXxqe8p/2hu1pTk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jmx0opAr; 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="jmx0opAr" Received: by smtp.kernel.org (Postfix) with ESMTPS id 3E585C116C6; Tue, 13 Jan 2026 13:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768309750; bh=zsNJkZzzl3cA4QgLezh89MO+pPFtt5CMMO6jHKfOHLc=; h=From:Date:Subject:To:Cc:Reply-To:From; b=jmx0opArZL+6wesSVFZ6WMirWGWmSgytTsc9MZTXR8nWkTV4BJZErmBjqzDSXjQHk rWow+dfrdz2k28TUujd22v2xzKvssaM91kNa+wcmAOzssYQiUcGzQcUl4hdRxSeqMg bcIbNyCdlgf36ROtjf+pfY1gcbtg1cTPa8O8Z/Q8uOvK0GzFmH+fxMNvO3IXjT7uMe HyHhmJ92pza4cRiNwgMzr6J97wGYlfosntlzWSN0vLOZU702eR7fX4lu6BlRkUe/R1 fiyz3W9NSySybHRnRJvatXoJYtXac/px0SOfgLLjjZphTiWGSCdQ3KlgCeA8rxuG/f bQxB64b3A0LeA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D2BAD2D0ED; Tue, 13 Jan 2026 13:09:10 +0000 (UTC) From: Fredrik Markstrom via B4 Relay Date: Tue, 13 Jan 2026 14:08:53 +0100 Subject: [PATCH] i3c: master: Set the device name only after we initialize i3c_bus->id Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260113-set_i3c_master_name-v1-1-eafc5dcd1eee@est.tech> X-B4-Tracking: v=1; b=H4sIAORDZmkC/x3M0QpAMBSH8VfRubYyRngVaS3+OBdGO5Ja3t1y+ bv4vkiCwBDqs0gBNwsfPkHnGU2b8ysUz8lUFmVTaF0pwWW5muzu5EKw3u1QZoGp57rtdGMolWf Aws9/Hcb3/QArezuKZQAAAA== X-Change-ID: 20260113-set_i3c_master_name-4fe45d589164 To: Alexandre Belloni , Frank Li Cc: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, Fredrik Markstrom , Ivar Holmqvist X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768309749; l=1634; i=fredrik.markstrom@est.tech; s=20260113; h=from:subject:message-id; bh=Cj/PcPQgBRHLVNwxGOBxQSUcqNPrcPktOg7QDmunmp0=; b=zQP+HGju9wkWqadBVxYUs2O19SAd49QBc7kFC8efIx6zOKkv65y4yCnB5sn6NZrksufqZxLPm ZmFYHawN1iPAVRX1G+zObPMQ3D5mVCvXSuT5ntV+MwCBqpn/Y3azjVn X-Developer-Key: i=fredrik.markstrom@est.tech; a=ed25519; pk=0a8IXHEgAX55JPS8VZfTf1sDp7q/oAOf459tDQd40Eg= X-Endpoint-Received: by B4 Relay for fredrik.markstrom@est.tech/20260113 with auth_id=600 X-Original-From: Fredrik Markstrom Reply-To: fredrik.markstrom@est.tech From: Fredrik Markstrom The i3c_bus->id field is used to construct the unique name of the I3C bus device. This field is initialized and assigned its unique value within the i3c_bus_init() function. However, the existing code was referencing i3c_bus->id *before* the call to i3c_bus_init(), leading to all the masters having the same device name string. This commit moves the reference to i3c_bus->id to *after* the call to i3c_bus_init(). Fixes: 9d4f219807d5 ("i3c: fix refcount inconsistency in i3c_master_registe= r") Signed-off-by: Fredrik Markstrom Reviewed-by: Ivar Holmqvist --- drivers/i3c/master.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 7f606c871648..1bc3c9068402 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -2881,7 +2881,6 @@ int i3c_master_register(struct i3c_master_controller = *master, INIT_LIST_HEAD(&master->boardinfo.i3c); =20 device_initialize(&master->dev); - dev_set_name(&master->dev, "i3c-%d", i3cbus->id); =20 master->dev.dma_mask =3D parent->dma_mask; master->dev.coherent_dma_mask =3D parent->coherent_dma_mask; @@ -2891,6 +2890,8 @@ int i3c_master_register(struct i3c_master_controller = *master, if (ret) goto err_put_dev; =20 + dev_set_name(&master->dev, "i3c-%d", i3cbus->id); + ret =3D of_populate_i3c_bus(master); if (ret) goto err_put_dev; --- base-commit: 0f61b1860cc3f52aef9036d7235ed1f017632193 change-id: 20260113-set_i3c_master_name-4fe45d589164 Best regards, --=20 Fredrik Markstrom