Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1806701ybe; Tue, 3 Sep 2019 03:54:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2NXL3bSpHJ12GDxaZdRr93e4cFW5EDmumsKokbffOtm6MCSS5OUn/vQqqQE88LRmZZtUn X-Received: by 2002:a17:902:ba95:: with SMTP id k21mr10296347pls.80.1567508046405; Tue, 03 Sep 2019 03:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567508046; cv=none; d=google.com; s=arc-20160816; b=I+wfgYgXHfgf8Jj2wkcMFahIWPwcude0Czm3CnRVodUkqZ2aPIEuXbKCHS6PLQmxbr 4u2WVSpvGQjHENnujXTs5/Zlw0V0geoi/diB1W2vLXnkuUHfVWxSirnKHjwKtGnH+6G6 i01BYaQo+0WIBeE812itkXV7p0rBs+Vqg5ZCpS/lnOLKzVtdaZR+mEHdTCwlWj9SYc45 vMC/AAsKTAPFUfDrUEgbxSCqIQcelFN+Qs46VjLs7qZp5wjPZ9bYV2K+jU+BfTsw24/V s2n6has2FNhedyGJnJEaaWAFP3juy67qq2SwPDx76v5/Wm2aAKfOHDT9Chx7o/hiHEKD iVyw== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=ZRlErgbXe46pLaO+KsFs7wKhqXg9vEBrVRQpNGsj7S8=; b=Lj5yQ5o1vWmxfpfH7Hm/NV00jD3blgTyXj3DqA0nz1pcUQSd9j0kmZGNQJbIPV2DZC poyrpWJIAXxbz2ni2J7l0RVwSvLwwCsPEar79DJ6WmBtpvDUfcRCsDwl+raQZUBJi4l3 CPma5si3g+p856Qj+g8YrKs1dbTq6NaFB9sOf8I5u/WTjq0QjO/mIAdU2vsEnVCOn3pK SW85OMiCtQJBowz0wflvvcf9PWUEXo4iHmLSKEzZ6gOx6ORQNzfuvqaZjmp5IEEzvSuM QQcz5eGGUzYmMCTH1UrCUEh+e/9dlihlrdT27KS0gMK5av1OqvTT9dDZ+u7RnUkwjrP0 15sg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t20si4516563pjr.88.2019.09.03.03.53.50; Tue, 03 Sep 2019 03:54:06 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728753AbfICKwm (ORCPT + 99 others); Tue, 3 Sep 2019 06:52:42 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:33222 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727005AbfICKwm (ORCPT ); Tue, 3 Sep 2019 06:52:42 -0400 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id C741F28D1C3; Tue, 3 Sep 2019 11:52:40 +0100 (BST) Date: Tue, 3 Sep 2019 12:52:37 +0200 From: Boris Brezillon To: Vitor Soares Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-i3c@lists.infradead.org, bbrezillon@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, pgaj@cadence.com, Joao.Pinto@synopsys.com Subject: Re: [PATCH v2 1/5] i3c: master: detach and free device if pre_assign_dyn_addr() fails Message-ID: <20190903125237.13a382b2@collabora.com> In-Reply-To: <105a3ac1653e9ae658056a5ec9ddc2a084a61669.1567437955.git.vitor.soares@synopsys.com> References: <105a3ac1653e9ae658056a5ec9ddc2a084a61669.1567437955.git.vitor.soares@synopsys.com> Organization: Collabora X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-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 On Tue, 3 Sep 2019 12:35:50 +0200 Vitor Soares wrote: > On pre_assing_dyn_addr() the devices that fail: > i3c_master_setdasa_locked() > i3c_master_reattach_i3c_dev() > i3c_master_retrieve_dev_info() > > are kept in memory and master->bus.devs list. This makes the i3c devices > without a dynamic address are sent on DEFSLVS CCC command. Fix this by > detaching and freeing the devices that fail on pre_assign_dyn_addr(). > > Signed-off-by: Vitor Soares > --- > Changes in v2: > - Move out detach/free the i3c_dev_desc from pre_assign_dyn_addr() So, you decided to ignore my comment about leaving the i3c_dev_desc allocated and skipping entries that don't have a dynamic address when forging the DEFSLVS frame instead of doing this allocate/free/re-allocate dance, and more importantly, you didn't even bother explaining why. I'm not willing to accept this patch unless you come up with solid reasons.