From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (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 33CAF405C29 for ; Mon, 27 Jul 2026 12:43:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785156194; cv=none; b=L9KH7WiedSkf3CmQzGQzHbVtQ6cWDowUlZbMT3WMYPKnwDm94yTgLWUmpwoJel80eSElBPwH7QsCoR+zlWzOudvVv3/sx7EIm1Jc/vUbvQeSa6lOlPvz4XKZ0em/wpfJqAXFExvImOWHCMPFZhVYgUX0B2dkDNtWDMVG8YIcPGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785156194; c=relaxed/simple; bh=VrO0yBQQdwabPAskQcTlcwcJS7C62is/NjAMMY/StHU=; h=Message-ID:Date:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=HnpwMxnz+zhVa1F7WTmfuF1MagzNYR/aM/P1rm+fhJvTrdSNf4aN++wpwaoCM29nXHxkk4Ze4XiM6mKAnc8HrBoX8MqPhHV5j5F5TTpuu5WPGcSTBqMXaP4P8IOrw2rTTQKjqrPK+N6tFNf5JOJJyYTk6G6B7ETpI6ohdCG5EEE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=cJiFroVO; arc=none smtp.client-ip=209.85.210.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cJiFroVO" Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-8485b358552so2750901b3a.2 for ; Mon, 27 Jul 2026 05:43:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785156192; x=1785760992; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:subject:cc:to:from:date:message-id:from:to:cc:subject :date:message-id:reply-to:content-type; bh=OKrnHJ/zkmSszgdE5PzXsaOxi77PgVXbDJ7BJN7kTtE=; b=cJiFroVO/qms9CGHFXfjxPhwe+o+3KnUyhGQnNHNO8yjoLf1eMvpAoEQfPnUuL+ltr NHnJ0eEuLVXeBl0Msk6FIQJCfKdNQyrn++rNkMbc4BpY46hgwRvlWL6IZKY+6mjEXqKY LdYQLzelTDVA3b5UkUQmfs9bgGb2FI2LwqhvGeRgzeY7k3Z97QB5ZcZFhc76MbYCYDpI dLgM3ggmQ/bu/3AGMoM2FyI+MkSGVhdbTK0Q4j1nO64zkMLX4IMkJiEJLfvMT9DXl5Cc fUSweHe08PHVl3De012c1cieJG6DWeA/eeGLPxLR5VO7c8wpxn3R/ssluGvEvlMVvkg0 Trlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785156192; x=1785760992; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:subject:cc:to:from:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=OKrnHJ/zkmSszgdE5PzXsaOxi77PgVXbDJ7BJN7kTtE=; b=jMmR1CWcTvapqBjJRTQ4ogXiQs0B+JJNhha/MR/rOVkIkVBlVlulU1BuhDF/qYCC4r w1wRW0AEaGKiIL7GM/3C0tXHO9rZnNcYXPikHyca6zwzw2nn88yHO+ao1puEb0kTVXO9 gEE/XQbI3BD/841GGBZmh9/4pDeGY++NnPMmbev/NEItkM70tkhMAWIPUWM1F96B/BC6 ZwUAu73/AU5YM6OVRA4620bKSeOzpYtDwbpicQIeIUz2/ZsZU34iWuPfZ0/Rh3+BCR6i bQ89+TA7vJ7k6a0GBCcw+pjtxa97gAfeFYAi+vIi07vhWK3m3WPGcfQaalHiZrr76iZJ mbEw== X-Forwarded-Encrypted: i=1; AHgh+RoAsKOW5al/ou6WpL+YtcGODV5J36wUliXH6zFXl6NZBSN69BnxUcqkvGQfwRzmWMj/zBt4t86wZZQ3hnU=@vger.kernel.org X-Gm-Message-State: AOJu0YzP/tMKAypDQhJwwylvtaFB1xeANDoS4Pw/J7KZpEk7ud9MmMOe QDxK5wf4robe27AiClCmfo/Nft9l9KvD0/QUuEHjAr2QASsRRnPJ87HB X-Gm-Gg: AR+sD13nyioD8/8o+wQafbNHC2Ma2gQRUhEGJRiAEAMsQUcX+Bfw3hV4atuUay4CsDj doIfnDEwtNNvXrvd4raq6ko+XUF7kKlV4h1fDsAiu/L7YbR9RhmPR4rYUWUTE9w0ZhV9/y3y+MM oJVXR282HFa9kKCnjy7JAtfflQeNv5nWp6uSu/jHePiIzSuXWKhgkrHIfXILgxA+XLfAc5214Hx 3gRevh2Yth7KXuiwez24xFnFDGuVF9cnmCAuwADX4ReQfU2dUdA2mvbY7I+/qF5ok3nMcUmTHPA bTeNig3F2FWgXbYhRrlrte0ahIywhC+M28ilgBtF+1RcqItUpDVovsHeAVyqs9r8P6CUVqFvIYD dCPDtJEC1AvogHphP6l5C3GzP6kEed7oAAeIMOHSC33Dh7yRo7PsdIIgSMEsIXNBM1plom6Grm7 9b5r8vCcQM X-Received: by 2002:a05:6a00:1f12:b0:848:2d1d:836f with SMTP id d2e1a72fcca58-84e59449d00mr6615290b3a.28.1785156192339; Mon, 27 Jul 2026 05:43:12 -0700 (PDT) Received: from luca_send.eml ([101.9.192.104]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84e5341d68asm2992595b3a.46.2026.07.27.05.43.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2026 05:43:12 -0700 (PDT) Message-ID: <20260727204307.24353.alvinhuang0603@gmail.com> Date: Mon, 27 Jul 2026 20:43:07 +0800 From: Hao-Qun Huang To: Luca Ceresoli Cc: Sowjanya Komatineni , Thierry Reding , Jonathan Hunter , Mauro Carvalho Chehab , Hans Verkuil , Greg Kroah-Hartman , linux-media@vger.kernel.org, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: media: tegra-video: vi: fix probe failure on skipped last port In-Reply-To: <20260707152425.571254-1-alvinhuang0603@gmail.com> References: <20260707152425.571254-1-alvinhuang0603@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=UTF-8 Content-Transfer-Encoding: 8bit On Mon Jul 27, 2026 at 1:10 PM CEST, Luca Ceresoli wrote: > Do you have a real use case where ths failure happens? No, I found it by reading the code. I went back and checked the in-tree tegra DTs that have vi ports: lg-x3 (p880), nexus7-grouper and asus-transformer all link the port through to a CSI channel endpoint with data-lanes, which parses fine, and asus-tf600t has no remote-endpoint so it skips on the !parent path, which leaves ret alone. So no in-tree board hits this. > Also, mixing two different return values may solve a bug but makes for more > intricated. I'd rather second a fix based on moving the whole foreach loop > body into a subfunction, and make the foreach loop body as simple as > calling the subfunction and handling returned errors. This would fix the > code making it more readbale. Agreed. This one was already committed to media.git/next on Jul 18 though, so I would rather send the subfunction split as a cleanup on top than respin it, which also keeps the stable backport small. I have that version building here and can post it. If you would rather have the committed patch dropped and replaced by a v2 with the refactor, say so and I will send that instead. Thanks, Hao-Qun