From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 5D2332DEA87 for ; Wed, 14 Jan 2026 17:08:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768410495; cv=none; b=k7t4yZiObc0Sdq9TbRjgzGhzbAo9doxOv7TfpDxKPEJXoTSWm4dpCJQNChTJ9Z2cbfeJoKfHpYKmJqF290y7WlO5LRlVJJSYyFHeocDbztid4acVaKVE9GPFOGUVA0UEyJCF3iYFXojU/68qId3rPiCqSvihcg56YIdA/9KOQYA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768410495; c=relaxed/simple; bh=BAlgHti8WV9dYXj/hS/UmNZZ0M2gcQQ+hf45WUGEcbA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=S7+Jap3pJFItuJ9t//IHT+o9i5RYdbTo8USnQ/3eiBv6r2lWErh5ryX1lpoiZqEkIMPe2Bolh9nCmV/EDfx2QvXgVr/HUVdsQZBI5XRXZjJJecNZ1l3zI4K3kiuaPUNKR52D/fnn+l0JCzxd3in2SRbDWW/GYFSFxjh+3RUS5Uo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Ef5fEguZ; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Ef5fEguZ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id B27311A2862 for ; Wed, 14 Jan 2026 17:08:10 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 8684C6074A; Wed, 14 Jan 2026 17:08:10 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 50F6110B6828F; Wed, 14 Jan 2026 18:08:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1768410490; h=from:subject:date:message-id:to:cc:mime-version:content-type: in-reply-to:references; bh=BOetR0xlsTC1WPP7X56hFWPzNxbNNujaRTmlAf4rLmM=; b=Ef5fEguZAG2Y72C94WVVZCm+a677M5snJIsR+aNNDenCITPqLvcXJBf34gLBlJrgP3VvyO m0JhPULE/SgMtbhY36nr9+EVn0HdAefDjK0eJjFkT5k0Qwk00hgQBlIyquAKlp4PwgBEF9 OnrtMS3QM8ce2J31R+vV/iBUla3p5fNgt4rZT2llKIRIXFLrnNQ2vDAwGgLb2fWF/0jg7v eOKG/akuoh4+wOqYsf+MdYqPY69hqehJH6Z1Rp1DBWQ7MiFJo/KIAdRyLkdt1tlZa1y/wj zIUEl+RIJGE+Dv8bvexbyQsMj7j+W/b+TbMUfi777B9oQnlH6+otVzfOhTnFPQ== Date: Wed, 14 Jan 2026 18:08:08 +0100 From: Alexandre Belloni To: fredrik.markstrom@est.tech Cc: Frank Li , linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, Ivar Holmqvist Subject: Re: [PATCH] i3c: master: Set the device name only after we initialize i3c_bus->id Message-ID: <20260114170808789a6861@mail.local> References: <20260113-set_i3c_master_name-v1-1-eafc5dcd1eee@est.tech> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260113-set_i3c_master_name-v1-1-eafc5dcd1eee@est.tech> X-Last-TLS-Session-Version: TLSv1.3 Hello, Thanks for the patch! the exact same one had been sent earlier so I applied it instead. On 13/01/2026 14:08:53+0100, Fredrik Markstrom via B4 Relay wrote: > 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_register") > 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); > > device_initialize(&master->dev); > - dev_set_name(&master->dev, "i3c-%d", i3cbus->id); > > master->dev.dma_mask = parent->dma_mask; > master->dev.coherent_dma_mask = parent->coherent_dma_mask; > @@ -2891,6 +2890,8 @@ int i3c_master_register(struct i3c_master_controller *master, > if (ret) > goto err_put_dev; > > + dev_set_name(&master->dev, "i3c-%d", i3cbus->id); > + > ret = of_populate_i3c_bus(master); > if (ret) > goto err_put_dev; > > --- > base-commit: 0f61b1860cc3f52aef9036d7235ed1f017632193 > change-id: 20260113-set_i3c_master_name-4fe45d589164 > > Best regards, > -- > Fredrik Markstrom > > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com