From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 5894027FD5D for ; Fri, 14 Nov 2025 14:35:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763130914; cv=none; b=rZ0ydUmsrLjwuRZ9lQtoM0AVrxBA+s+TPvDzXj9cuOqWHmPV1LgpBB+OeTLiEV8kbIrkJLX/iwXh9rN3OEqvvK8qsz6+qt+xckNsbQraZi2PgMqSpfKWhVdOkdZL1o2Ch8VBmgfCMjIqsHIOBCIsWwL0xdOmY7sO8nhoL7sB3O0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763130914; c=relaxed/simple; bh=dWXLhPsJovH76m+UWdSFM19WXCf+smwi4mOSlHBAWM0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=JEEtA7J15r8g5GGDyyuMKM0qyKgqq01FsTJuO79WywiTnIlBE1mSa0KKR3ygkDA/qE+87AA4LV6PjJ+PKg9NcuZFVg3uiouw1X6Ytn+6eKgUO5VCt+2F22/43QvzT2DNDSnEKpGmqOnF94f9cpTJhkIW9Od7ZkwJUtT31RtXAAg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=dXRAkBfS; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dXRAkBfS" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-47777000dadso15536525e9.1 for ; Fri, 14 Nov 2025 06:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763130911; x=1763735711; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dWXLhPsJovH76m+UWdSFM19WXCf+smwi4mOSlHBAWM0=; b=dXRAkBfSiyMfYZAJRzRwBxxmeM1R62eUIdzMH4Stwpo0ClJ9R+z/UCUn5ZiinRtG2d exO6qlnWDDZQe/opu4VT9ZIhdYDyevv6BI7A1i4/N0HbfsEwe/CjfBkrbW5LYMhaCsUK g0mt3tbBDDvtX/f9TJ1s55PCTluRyYLfqj7l0J2GPl9pP5bVTffdr4+i+NRUGIdVKZDJ JfiVUo1z6wZ94aAce6cbrR20ddoiRMgcKoMoai/lnGhX1CQvv1OUOiPRDSFfgu4C+EUW 13DqtGhbgr2U5gVjZ9Kr+dhsj7e8KRnppTbFBC9vGyO8KpVIb0Lv5QQe25C15xheeG2L ZQHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763130911; x=1763735711; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dWXLhPsJovH76m+UWdSFM19WXCf+smwi4mOSlHBAWM0=; b=PHhNi8+rOOvMdiLUMgR7Fj6jgh3WUJbi1WUuJ2pRVXAF/7WGv4XqnfeZ4JA3l38IJY VQ1ly5C6mFnUUP/pYYt6ibeZ2Mpzgdk3LYdWr9auAm4RNXaBP7gN+C7R2vWxBh4TW2MV F+zSfZ0crYPF1kbn1tSX+iTMnJvpaAPXLJ7xCX6UY7/wbV0CfVqjkF+rTJujkp7qYBGk PUBDrhqO8witi3K0KVwENhVgIFoexzlpt7jCD22Vz2Nm5msxO0/osmB+zde5jgIYsjuj I7jWU5V+kMK/ctBposX3s1vPNuy333CN92CSLXFZjIjUPCQniTRfMYqRwQoDzAF6YcCF Cj1A== X-Forwarded-Encrypted: i=1; AJvYcCU2018sI8B1+v1CfyRw6bUbT5vIK8TEMMLoaiXf9fiiBhi7UyYPfjOgw52LP8PJW7lV2x/riuzeamOMgIs=@vger.kernel.org X-Gm-Message-State: AOJu0YyHXlcBm649xTmnY7mSmTcjlnfUpDqcamoTSygTfKVZpoWnbdan iRRANX2XxobY0787Q+3wXT9gMSMO7zjBNy1IULB9swkZaqj3IfULKcg7cvBOmxG5Ipc= X-Gm-Gg: ASbGnctF6rTzyfILugsLgczQGVkTcCBhNvpDZNKo3dn5f8B11xeRcgbDp3uBXVCK6uZ CiZpO2M68BjM0mnbdBq3cQgjM5JlMuJ0KIgTAA7zYN9jHEKO5x6z/lxkHsaBFHpoic6EO6xn4BT ZHe/cwIRYzvnXPcTt8fx2vt5r1cjF2kbAttTOpiQIXy2f0OlcA/On7iP/MVMMGC6xZNaM0Plw+q 7AXjunTM4WlkI5brKb0+kTAzzkiX1sv68xm1K27spH19t1wylv5dLnO1/n3DwWwz+tIDYfXuOcf MCCVnioefIajSr345CL/y3Ww4Yv6XCZxFBcfMG9lxdfx/6sTuiWp6JxY0+Gnx6T/E+hYKZN4Qhy eGgbR49J9lZJ8DRWPXTMH3U1JgfgmydDmIre+9m5TndUDqkt+Owh+b5YlcbHWxK5kHljsBMK3qD 6j X-Google-Smtp-Source: AGHT+IHw5DY+d3JMXj0ehkwCi00kh1fcOQgwNxL358oZwa3xTlItactqY9kSp562T/u4HnhssT9g/A== X-Received: by 2002:a05:6000:230b:b0:42b:40b5:e681 with SMTP id ffacd0b85a97d-42b593450f3mr3355692f8f.26.1763130910639; Fri, 14 Nov 2025 06:35:10 -0800 (PST) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42b53f0b8a0sm10330771f8f.25.2025.11.14.06.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Nov 2025 06:35:09 -0800 (PST) Received: from draig (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CCE895F820; Fri, 14 Nov 2025 14:35:08 +0000 (GMT) From: =?utf-8?Q?Alex_Benn=C3=A9e?= To: Ilpo =?utf-8?Q?J=C3=A4rvinen?= Cc: Simon Richter , Lucas De Marchi , Alex Deucher , amd-gfx@lists.freedesktop.org, Bjorn Helgaas , David Airlie , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, Jani Nikula , Joonas Lahtinen , linux-pci@vger.kernel.org, Rodrigo Vivi , Simona Vetter , Tvrtko Ursulin , Christian =?utf-8?Q?K=C3=B6nig?= , Thomas =?utf-8?Q?Hellstr=C3=B6m?= , =?utf-8?Q?Micha=C5=82?= Winiarski , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 03/11] PCI: Change pci_dev variable from 'bridge' to 'dev' In-Reply-To: <20251113162628.5946-4-ilpo.jarvinen@linux.intel.com> ("Ilpo =?utf-8?Q?J=C3=A4rvinen=22's?= message of "Thu, 13 Nov 2025 18:26:20 +0200") References: <20251113162628.5946-1-ilpo.jarvinen@linux.intel.com> <20251113162628.5946-4-ilpo.jarvinen@linux.intel.com> User-Agent: mu4e 1.12.14-dev2; emacs 30.1 Date: Fri, 14 Nov 2025 14:35:08 +0000 Message-ID: <87346gptr7.fsf@draig.linaro.org> 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: quoted-printable Ilpo J=C3=A4rvinen writes: > Upcoming fix to BAR resize will store also device BAR resource in the > saved list. Change the pci_dev variable in the loop from 'bridge' to > 'dev' as the former would be misleading with non-bridges in the list. > > This is in a separate change to reduce churn in the upcoming BAR resize > fix. > > While it appears that the logic in the loop doing pci_setup_bridge() is > altered as 'bridge' variable is no longer updated, a bridge should > never appear more than once in the saved list so the if check can only > match to the first entry. As such, the code with two distinct pci_dev > variables better represents the intention of the check compared with the > old code where bridge variable was reused for a different purpose. > > Signed-off-by: Ilpo J=C3=A4rvinen Reviewed-by: Alex Benn=C3=A9e --=20 Alex Benn=C3=A9e Virtualisation Tech Lead @ Linaro