From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 569BFC47BEA for ; Tue, 6 Jan 2026 11:16:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eKIycVvme71gfCO7jXsTDlhkrOgWCVXwLY1WTeUHAnA=; b=A7VwS8il/oxqnE lleCLzGcmxMHC8CjJPE4TInpTd7+XUmVJrt20xRZmnUBs2DnJQKMmWt5PP821k4F6YDoMnXUOdca4 ZDDcjK13be/fjX++l4iBk3ap+HeIV3OLpGa94xAxPd5/E52CRojCbzm7DyRMnwYaln/zgi7dzRnK4 NUzQRRK1UoJZ+B3Z7YsoPNaSymbl2xw6IXLnJ0GFOd16l0C4VRFKkW58bqpA9kjiYO8MzAfKWsbMk /y/SEoC2JKPeop80oSeni+sh/p6waON+W5SFz7EzPZMAFBRHccb6TRL3xIMkgRL0mgdJZ+ruMrc2W XBLkk1CoioFBrpeulhjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vd538-0000000CrH4-3fls; Tue, 06 Jan 2026 11:16:30 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vd536-0000000CrGK-44lZ; Tue, 06 Jan 2026 11:16:29 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 0A45060148; Tue, 6 Jan 2026 11:16:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 528DEC116C6; Tue, 6 Jan 2026 11:16:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767698187; bh=KAZTfW562W1oYvg6yLMZiwveTP/LAQQ3kkh1Vqc/32Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z1K0/H+XpY/nY87i0BbOhrc0NiRe8qTneWo9Kclay0A+/ZiYEVXM8rM2Ru8hsNf8y PxNWW770aUY0dfnswiMYnNUyiXyMopWxWKymiXrW+XiA+s5Y09ERidRRZG782OYHhD 4chf+I3fc+I8JmctmpRXqsR1iNYjVBnbR4j2HQFYpy59lZTrFG7rUnvWhWWj//5go4 LXdUEq9t2WGgtOv7/a88UHej4y9EJJGE/vb9oors6pxeMGccynmmEkVG5rYPDW4Rsq 79BH7p4Wrb3LzWNxaEbPknCyslDbxH1Y7TENlLw78noR/6XK39CD77/BuMLy05qqQB oJUN+EE7CvPnw== Date: Tue, 6 Jan 2026 12:16:16 +0100 From: Niklas Cassel To: Manivannan Sadhasivam Cc: Sumit Kumar , Bjorn Helgaas , Jingoo Han , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Krzysztof Kozlowski , Alim Akhtar , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Yue Wang , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Paul Walmsley , Greentime Hu , Samuel Holland , Chuanhua Lei , Marek Vasut , Yoshihiro Shimoda , Geert Uytterhoeven , Magnus Damm , Pratyush Anand , Thierry Reding , Jonathan Hunter , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, imx@lists.linux.dev, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH 2/2] PCI: dwc: Add multi-port controller support Message-ID: References: <20260105-dt-parser-v1-0-b11c63cb5e2c@oss.qualcomm.com> <20260105-dt-parser-v1-2-b11c63cb5e2c@oss.qualcomm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Tue, Jan 06, 2026 at 11:55:46AM +0100, Niklas Cassel wrote: > For iterating, to avoid manually traversing the array, we could do like > libata and create a simple macro, e.g. ata_qc_for_each(): > https://github.com/torvalds/linux/blob/v6.19-rc4/drivers/ata/libata-eh.c#L851-L854 > https://github.com/torvalds/linux/blob/v6.19-rc4/include/linux/libata.h#L1657-L1659 > > And at least personally, I think my brain will parse dw_pcie_port_for_each() { } > faster than it parses list_for_each_entry(port, &pcie->ports, list) { }, > since it is more unique, but perhaps I am the weird one here :) Or... for_each_dw_pcie_port() We also don't need to supply an integer to the macro, we could do like e.g. for_each_nhlt_endpoint(): https://github.com/torvalds/linux/blob/v6.19-rc4/include/acpi/nhlt.h#L63-L64 which has does "for (unsigned int __i = 0; " in the macro. Kind regards, Niklas _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv