Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4866583imm; Tue, 18 Sep 2018 00:01:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZs5Frpp7FU3mSyAIx+/KHA+hfPRgNKpYAbuKX85Oo+AF+hRvYvSiJ21Ypqiy7u4aHjwYVi X-Received: by 2002:a63:5815:: with SMTP id m21-v6mr26388823pgb.78.1537254067134; Tue, 18 Sep 2018 00:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537254067; cv=none; d=google.com; s=arc-20160816; b=iXF3P+rWe5CS0UkRr9FB4VVcrgZOA5ZTkm2GnBdshfp7C11fBQJNz3t4Cgly7+pZg+ 7wNC1Tis0O4KF5rPVVe2uO6qYGojFJNQKN1J67K5TDYCsoutIOcY1TYfUVHz1dkyGu9A Qc0hecW/eV1QtFvBlDEC01kmXtOd0T9SfAD0E5boMT/zlqBV71WCG/9m+UeLNNd0HMfP n2XI+uqNWPqWj6GOa7u2jle3OGnp+z7jusb9RlR6aZeMmtKhn8sZY73tU49DDv9kMf1D s4BMZ5swFRIB59NuVzd9tLI+xH/7uMr3q8Skm0yQ+AsKW6YR2j3AP76T+x8jMvpiLajC qmbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=8bZpez9iR5+zJFpEyTgrvcGtVjuJobh/h9kB/47jYm0=; b=DFbBo3mXBrfhZZWHd9so65JaMbwZrPk2iSH+/aM77zIqivwdWuPSOg3x+0i5aMjWqX mznqjaSfhV2eG2m4zY9htopnzv9cRn2ARvUjNapOwDnkg+cEJ/GmA1faSw6LMYMIGAEW 5UW+ARuxPJzGjRVmFwDDakjmZ/KcVwzaC0uumR7Nxqc768stRAecy1lFa9Wv9UKxzdza UY0CUUEBMPPOYRiQGRTiXv/cQIPoHMUB9vxSG8Kj/lqNZPwasU/rNi5JZNbOji3MqxKb RaL38a3lerRJ3XXQdCh2sLd4QM87TkbZUOM2RRWW+HKFfQ1Wh0JDi6wYgdfqACWhg96G Vd6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n18-v6si2822373pgf.529.2018.09.18.00.00.51; Tue, 18 Sep 2018 00:01:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728936AbeIRMbT (ORCPT + 99 others); Tue, 18 Sep 2018 08:31:19 -0400 Received: from mail.bootlin.com ([62.4.15.54]:59888 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727585AbeIRMbT (ORCPT ); Tue, 18 Sep 2018 08:31:19 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id A3B312071D; Tue, 18 Sep 2018 09:00:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (AAubervilliers-681-1-99-10.w90-88.abo.wanadoo.fr [90.88.4.10]) by mail.bootlin.com (Postfix) with ESMTPSA id E4C7320703; Tue, 18 Sep 2018 09:00:02 +0200 (CEST) Date: Tue, 18 Sep 2018 09:00:02 +0200 From: Boris Brezillon To: vitor Cc: Wolfram Sang , , Greg Kroah-Hartman , Arnd Bergmann , Jonathan Corbet , , Przemyslaw Sroka , Arkadiusz Golec , Alan Douglas , Bartosz Folta , Damian Kos , "Alicja Jurasik-Urbaniak" , Cyprian Wronka , Suresh Punnoose , "Rafal Ciepiela" , Thomas Petazzoni , Nishanth Menon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , "Kumar Gala" , , , Geert Uytterhoeven , Linus Walleij , Xiang Lin , , Sekhar Nori , Przemyslaw Gaj , Peter Rosin , Mike Shettel , Stephen Boyd Subject: Re: [PATCH v7 01/10] i3c: Add core I3C infrastructure Message-ID: <20180918090002.2e4012e6@bbrezillon> In-Reply-To: References: <20180905154108.20770-1-boris.brezillon@bootlin.com> <20180905154108.20770-2-boris.brezillon@bootlin.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vitor, Sorry for the late reply, I was not at the office last week. On Tue, 11 Sep 2018 11:04:07 +0100 vitor wrote: > Hi Boris, > > On 05-09-2018 16:40, Boris Brezillon wrote: > > +i3c_master_register_new_i3c_devs(struct i3c_master_controller *master) > > +{ > > + struct i3c_dev_desc *desc; > > + int ret; > > + > > + if (!master->init_done) > > + return; > > + > If you have a hot-join and call i3c_master_do_daa this function will > return without create the i3c_device. Hm, you mean if hot-join happens when the I3C master is not yet registered? That shouldn't be a problem since all devices will be registered at the end of i3c_master_register(). Am I missing something? Is this a problem you actually face or just something you found out doing code inspection? > > > + i3c_bus_for_each_i3cdev(master->bus, desc) { > > + if (desc->dev || !desc->info.dyn_addr || desc == master->this) > > + continue; > > + > > + desc->dev = kzalloc(sizeof(*desc->dev), GFP_KERNEL); > > + if (!desc->dev) > > + continue; > > + > > + desc->dev->bus = master->bus; > > + desc->dev->desc = desc; > > + desc->dev->dev.parent = &master->bus->dev; > > + desc->dev->dev.type = &i3c_device_type; > > + desc->dev->dev.bus = &i3c_bus_type; > > + desc->dev->dev.release = i3c_device_release; > > + dev_set_name(&desc->dev->dev, "%d-%llx", master->bus->id, > > + desc->info.pid); > > + > > + if (desc->boardinfo) > > + desc->dev->dev.of_node = desc->boardinfo->of_node; > > + > > + ret = device_register(&desc->dev->dev); > > + if (ret) > > + dev_err(master->parent, > > + "Failed to add I3C device (err = %d)\n", ret); > > + } > > +} Regards, Boris