From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f182.google.com (mail-dy1-f182.google.com [74.125.82.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6E8E1862A for ; Tue, 28 Apr 2026 20:33:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777408412; cv=none; b=Aj88z508vzuOyn/l7MxASoyagnPoIM0SxSCJBpfAbiagrWA1dWlgrRnWaUcrE9n7Psn/lRBvoq1eW8hP7F/Li73rt0XNfYFCojcgrRZtiJqglXf6BXMAf7PgC57ctY2AkYQh5OpkaW9WsG+xzG3Ai5aXTX76DGWuSAFylkkKHTw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777408412; c=relaxed/simple; bh=Y9qvfVyeQPXkB2+sVJbUknOCYCqukl5rxf6egNZy+ms=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RRZcJ0a67iVT4+K1jvM77WzZoN/xTGghWbMVj5KaItdvC9u5v9Lm8Q/U9KF988/E+7018RuJueNcRx//weJTBviYa+jCQzexL+/U1Vs5vFJpEqFOVjssLA6quDacSTbm7D9VdtfMQwCznzpRS808TTWgeNZP2Z/GE1R1aYKLB7w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=GFfwmM8S; arc=none smtp.client-ip=74.125.82.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="GFfwmM8S" Received: by mail-dy1-f182.google.com with SMTP id 5a478bee46e88-2c15849aa2cso15915599eec.0 for ; Tue, 28 Apr 2026 13:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1777408410; x=1778013210; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=XuGGOB9jUOQdHhCVZcWlnsJ85f+0MTkEMCpT8PJQvGA=; b=GFfwmM8STvfSgUoIJjFIau8g3EbAMD5EWK0C42/n5uVNUGT9FiNkzwLqYMJgwTh1HC KpJAWEx1lNmNXIrOXKDtvsuleplsKOBGa4hDZKyH3wZf24CcIEft+N4MsBTJVkard0KB KIxeYvqpTODktyGy7g/3jsZrKGbX/dZqwRUCI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777408410; x=1778013210; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XuGGOB9jUOQdHhCVZcWlnsJ85f+0MTkEMCpT8PJQvGA=; b=NwljMr1HV5InyAP2cLUUC5NOztW9v9gPCbjRV314F+/ZtcllPw4HoS8qRb9/TJ6fcH oberY747/3kwa1eahaytMK9HUrq4wF6s7g5ZP7H82jT3LYS7Ma3BDQoMkxCsEW2S7OSE eY2zdN92PWAWbTdd0cuwlMRSTurDQkkwgoVc8KMFahvsNz/oJ2W4BMEHSUwJp4w9wtzp tp8YMf0cJDsvZHKMoPX8CH8WIEBtFCjJWXUBdAZdKwnvJG/VIF4rWSVDt/BtOSQy3qMl 6JqkaHUdv+YkTVBKYuN0kV/ojVPLjHzM6z7TqZS6jF4IbfboUMRux+SDyFhAIovg+hIP A/Fg== X-Forwarded-Encrypted: i=1; AFNElJ+6P9wPOkeXVd1/74J6Y3ZUqUlIWQ7R8b29x5SYjXvD+/bc0k9TDRohkR1IwZkM89zNuZkDZpWaBQiLGBg=@vger.kernel.org X-Gm-Message-State: AOJu0YyP63rumhwkg4SMI+CjzrXsMs6geGr5EuxFJTyUYdmFDSe7U56x 13Or6w/kXOJIECcHyFqTWPAVxWQlaHJN3HFNErU+eG9u6nlPhvENTVZwnr+10StB+A== X-Gm-Gg: AeBDiesjiD4wlXwiAZ/vx5bnB9NGblrXn7NP/N2mmwdCQrlCvPFuijOiCv4gD1w3A9z 21CDJw/McfH+kAj7zXqz2PT9sygfW231omRy2RZ6wb/iDERbnebqNB5BdEwDpPyCizDUO+iHvy/ t5yqWqVLAvaFzxybk4VdwtTUqMx7ojuvSCquRbHPdgrcoiKw7S7huha0pijRiVFcaDrV5qp42dd 4I8vU7vzdxMrXjUdQujxQKtkgKEi6mcFqByeUG5NBCpDcj3tqykF57nVHmbnNyOwq5JCmO9vBlk VxIFhaJ3U7qo37kh2UtFrmGRw4mNPEQF8WSebZixV3pFyh28v+3hAbTj0D3vlFR2U6/zD4wAmba g8xFPRw/FfoRe5ErlCpsge22IS/YiHStzHLdh+xL1pXYCV6HFELNyDg8+XxPfv0PJ6g+fVWKkJs uW0DFjOCmnGhz5WPRPrCbnk/doOKyTNDJur4Qh2bLyGh/agUPW7yGocW7hUpq7V5qSLtq8VFQB X-Received: by 2002:a05:7300:dc98:b0:2d3:f3fc:bb6b with SMTP id 5a478bee46e88-2ed09fde238mr2090563eec.1.1777408409871; Tue, 28 Apr 2026 13:33:29 -0700 (PDT) Received: from localhost ([2a00:79e0:2e7c:8:4ff5:9607:c7e5:48f3]) by smtp.gmail.com with UTF8SMTPSA id 5a478bee46e88-2ed1bf6d391sm8879eec.6.2026.04.28.13.33.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Apr 2026 13:33:29 -0700 (PDT) Date: Tue, 28 Apr 2026 13:33:27 -0700 From: Brian Norris To: Julius Werner Cc: Titouan Ameline , tzungbi@kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] firmware: google: fix orphaned devices on partial populate failure Message-ID: References: <20260426220204.118399-1-titouan.ameline@gmail.com> 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: On Tue, Apr 28, 2026 at 12:49:35PM -0700, Julius Werner wrote: > > Given that, would the right approach be to continue the loop on > > entry-specific errors ( logging a warning), while still aborting and > > cleaning up on systemic ones like -ENOMEM? Or is the name collision > > case considered impossible here since names are derived from the > > tag/index and the table is only parsed once? > > I don't think you should hardcode behavior so specific to what the > called function does. Trying every entry doesn't really hurt even if > they all fail due to some systemic problem, so if there's any chance > that other entries might succeed, I think the best option is to just > always continue the loop and try the next one. FWIW, of_platform_populate() might be a (highly-used) analog for comparison. Aside from some top-level errors (such as, "can't even find the root to start from"), it doesn't actually return errors at all [1]. It just skips individual device failures (including -ENOMEM). Seems like an OK strategy to me. Brian [1] of_platform_bus_create() technically has some recursion-carried return codes, giving a chance to propagate a failure, but all the return codes are still 0.