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 80368C74A5B for ; Thu, 23 Mar 2023 15:11:56 +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=OI8z84Wm91/hif+K02MyF4yoPIAlXZCSeI23LL1EF4w=; b=ejx5faVUuEY6LD 4NrXCTvLWAx/5FgybckW0Q2DW2RZ21ZFnLpXx7wW97a02RDcarirCyCZK0RCKCE0StxSGodo0XW/B IU9t+WkGoJHiLbBLSMyFDzLNcPIzzod/XjvDnJg6nux0UiVkRvrOznXs2VGLm5TIMULB04diUJnuX 2IzCVV7fuqiSZg1yFwjNyZURbMxS6r06m09roFvRmnN3NDCRAa5pxlOwqRqSfRiEg+eKbsRm+0OZt dE71/b6Xko562cvI/Caar7hKyaerRx7JS6d5L1hdy7w/kZIVTl+ziAXygp72aEpQPx0PnPClmE+Hv /bbPqmP+/UxmTlT8vdBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pfMae-002JMC-1K; Thu, 23 Mar 2023 15:10:56 +0000 Received: from mga07.intel.com ([134.134.136.100]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pfMaW-002JKn-0Z for linux-arm-kernel@lists.infradead.org; Thu, 23 Mar 2023 15:10:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679584248; x=1711120248; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=pTI3sfGhxuNt+eJ92X/zV2v4CxfKcZ1sf1RhNp36ij0=; b=PiMcO3+DzsentB1zBptRhL4kdBfg3My0edOyxavBXRDrNKFHdHHfAl33 6+nEdDH0C92RIqA6DCFzB66zwt1390YWDuj2MX3BrJ1+oWysMxoNPjNwi K1hVjng2ALycnFazJ1yVaNNSKPQMF0L+9BE6Ev0lQVc7bMb8oSM1ZBL7m OrOodg4NTxwlXuI+JMKlJOv3QS5ttSjEhtxT+na+pNJTf6yn2qhHMtQiJ yuHCNd97dqByvTU0aPZEANNuNuLUdADkYRnz9ffBgC/cultnfY7yfqr1a I4jDNbFyKK7gu7lIAAkfAxvv0RVuZz+tbGKakrcGjfJ6EYRdlxCpcaVJz w==; X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="404419886" X-IronPort-AV: E=Sophos;i="5.98,285,1673942400"; d="scan'208";a="404419886" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 08:09:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="793046100" X-IronPort-AV: E=Sophos;i="5.98,285,1673942400"; d="scan'208";a="793046100" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP; 23 Mar 2023 08:08:52 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pfMYZ-007YBs-1j; Thu, 23 Mar 2023 17:08:47 +0200 Date: Thu, 23 Mar 2023 17:08:47 +0200 From: Andy Shevchenko To: Bjorn Helgaas Cc: =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= , Mika Westerberg , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Michael Ellerman , Randy Dunlap , Arnd Bergmann , Niklas Schnelle , "Rafael J. Wysocki" , Pali =?iso-8859-1?Q?Roh=E1r?= , "Maciej W. Rozycki" , Juergen Gross , Dominik Brodowski , linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, Miguel Ojeda , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Thomas Bogendoerfer , Nicholas Piggin , Christophe Leroy , Anatolij Gustschin , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , "David S. Miller" , Bjorn Helgaas , Stefano Stabellini , Oleksandr Tyshchenko Subject: Re: [PATCH v6 1/4] PCI: Introduce pci_dev_for_each_resource() Message-ID: References: <20230323150238.GA2550157@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230323150238.GA2550157@bhelgaas> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230323_081048_259418_1D771C69 X-CRM114-Status: GOOD ( 18.09 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Mar 23, 2023 at 10:02:38AM -0500, Bjorn Helgaas wrote: > On Thu, Mar 23, 2023 at 04:30:01PM +0200, Andy Shevchenko wrote: ... > I poked around looking for similar patterns elsewhere with: > > git grep "#define.*for_each_.*_p(" > git grep "#define.*for_each_.*_idx(" > > I didn't find any other "_p" iterators and just a few "_idx" ones, so > my hope is to follow what little precedent there is, as well as > converge on the basic "*_for_each_resource()" iterators and remove the > "_idx()" versions over time by doing things like the > pci_claim_resource() change. The p is heavily used in the byte order conversion helpers. > What do you think? If it seems like excessive churn, we can do it > as-is and still try to reduce the use of the index variable over time. I think _p has a precedent as well. But I can think about it a bit, maybe we can come up with something smarter. -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel